LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-15-2004, 03:50 PM   #1
hyper guy
Member
 
Registered: Feb 2004
Location: A State of Bliss (Ontario, Canada)
Distribution: Vector-Slackware + Dropline
Posts: 43

Rep: Reputation: 15
How does compiling from source stop dependency hell


I've been up late (late) the last few daze trying to sort out a few things. My latest thing is trying to figure out this rpm/dependency hell stuff. Now, i'm not speaking of simply having to chase all over creation to find libraries and wot not that your program X may need. I assume most pkg mgrs can at least handle that part.

More specifically, the problem i'm trying to figure out is this (taken from this essay on "RPM Hell" ) :

"Eventually, if you're lucky, you get the software installed. More commonly, you've broken some other piece of your system -- "A" depends on "B" version 2, but "C" depends on "B" version 1, and there isn't a newer version of "C" that is happy with "B" version 2. You have to choose between "A" and "C". Even more commonly, you find yourself installing software that you never wanted or needed, but is a required install because of a bad dependency tree. "A", a purely text-based application, depends on "B", which depends on "C", which depends on "D", which depends on X11. "

What I've been able to gather is that somehow, someway compiling from source does away with this problem of dependency hell. I'm quite sure it's due to my appaling ignorance of how OSes work, but I don't get it. If I'm compiling a program, will it not still have (at least usually) the same dependencies?? How do the source-based distros get around this problem?

Is the only way for binary-based distros to get around it is to allow for multiple versions (not that I have a deep problem with that)

Optional Blather:
I know there are a few threads in here started by some folk who're quite frustrated by this (and related) phenomena. Seems like there've been a _lot_ of ppl who've skipped joyfully into Linux land and after a period of time, mebbe 6mths, mebbe a year or two, find themselves utterly frustrated by conundrums that by and large were rare(r) problems in M$ land.

Now, don't get me wrong, I'm committed to sticking it out (ok, i kinda hafta at this point as i've completely wiped win98 off my sys), but i'm trying to look ahead and, where i can, dodge PITA issues way in advance.

Anyway, my eyes are growing dim with all this reading (and rereading). Probably overthinking myself into these knots, but I'm pretty sure (knock wood) this' the last major issue I'll deal with before I finally settle on my distro-for-the-first-year.

Last edited by hyper guy; 03-15-2004 at 03:53 PM.
 
Old 03-15-2004, 03:56 PM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Mandrake has urpmi
RedHat/Fedora have apt-get and yum
Slackware has swaret and slapt-get
Debian oses have apt-get

These package managers all resolve dependencies when they download the package and you don't have to switch distros (the essay mentions portage which afaik isn't a Mandrake or RedHat package manager).
 
Old 03-15-2004, 03:58 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
What I've been able to gather is that somehow, someway compiling from source does away with this problem of dependency hell. I'm quite sure it's due to my appaling ignorance of how OSes work, but I don't get it. If I'm compiling a program, will it not still have (at least usually) the same dependencies?? How do the source-based distros get around this problem?
They do, but to a lesser extent... chances are that,
for instance, a program will be just as happy with
openssl-0.9.7.3c as it was with 0.9.7.1, but RPM
will be a bitch and insist on the EXACT version.
Sure, you can override that, but then you have
"broken dependencies" by the truckload.

There are (and probably always will be) things that
are impossible to solve, but you will have to resolve
that manually ...


Cheers,
Tink
 
Old 03-15-2004, 04:29 PM   #4
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
yes, like tink said, binary formats are expecting an environment exactly like it was when it was compiled, so if versions arnt exact, they will not work.

i don't use package manages, and just compile form source only (cause i want it made for my system), and iv never had dependency issues like those. at worst is a program depends on another program that depends on this, usually tho other programs also use the same dependencies, and these are all part of any distro (like m4, and if it has a GUI, then the xlibs),

almost any dependency issue with source code is easily fixed as its only a matter of getting the missing lib or program and compiling that, and looking at the requirement's page (if there is one) when you download source codes..

altho there are some hard to find packages (actually they are easy to find if you want .rpm , but a pain to find the sources to them)
 
Old 03-15-2004, 04:30 PM   #5
hyper guy
Member
 
Registered: Feb 2004
Location: A State of Bliss (Ontario, Canada)
Distribution: Vector-Slackware + Dropline
Posts: 43

Original Poster
Rep: Reputation: 15
Thanks Tink and Xavier -- I _think_ wot you're saying is that the terms "rpm hell" and "dependency hell" are interchangeable? That is, you only get dependency hell if you use only rpm pkgs (w/o a pkg mgr). Is that right?

My bad. I thought you could/did still run into dependency hell issues even using apt-get et al. Well that's all a big relief.

Ok, well that makes things tuffer then cuz instead of cutting off one side or the other (source-based vs. binary-based), i have the whole smorgasboard of distros from which to choose.

Ah, now, which iso...which iso...?
 
Old 03-15-2004, 04:34 PM   #6
hyper guy
Member
 
Registered: Feb 2004
Location: A State of Bliss (Ontario, Canada)
Distribution: Vector-Slackware + Dropline
Posts: 43

Original Poster
Rep: Reputation: 15
Lightbulb satori!

Quote:
Originally posted by SciYro
yes, like tink said, binary formats are expecting an environment exactly like it was when it was compiled, so if versions arnt exact, they will not work.
SciYro, thank you so very much. that one sentence made it all clear as day for me now.

Cheers!
 
Old 03-15-2004, 04:46 PM   #7
hyper guy
Member
 
Registered: Feb 2004
Location: A State of Bliss (Ontario, Canada)
Distribution: Vector-Slackware + Dropline
Posts: 43

Original Poster
Rep: Reputation: 15
Oh, waitaminit. I got ahead of myself. Though SciYro's reply clears up a lot for me, I'm still not sure it solves the catch-22 dilema posed originally.

I get that usually you can get by with the existing libraries already installed (or that often the new version is backwards compatible), but isn't it simply one way or the other -- ie. either A depends or B or it doesn't? Isn't the binary just saving me the step of compiling the code? In other words, isn't it set up somewhere in the source code that A requires B?

And another thing: Do these apt-get etc managers solve those issues for you by creating diff versions automatically then?
 
Old 03-15-2004, 04:54 PM   #8
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
the various apt-gets and their siblings will download and install the packages, they also do a dependency check and resolve the dependencies for you.
 
Old 03-15-2004, 07:44 PM   #9
heema
Senior Member
 
Registered: Sep 2003
Location: Egypt
Distribution: Arch
Posts: 1,528

Rep: Reputation: 47
yeah from the moment i installed libranet 2.8 which is based on debian i forgot about dependency hell and all of that.

when i want to install a program i just enter apt-get install <program name> then it will download it and install it for me and if there are dependency then it tells me that it will download or upgrade other packages.
 
Old 03-16-2004, 06:24 AM   #10
hyper guy
Member
 
Registered: Feb 2004
Location: A State of Bliss (Ontario, Canada)
Distribution: Vector-Slackware + Dropline
Posts: 43

Original Poster
Rep: Reputation: 15
Ok, thanks guys. I think my brain just overheated. I let it cool down. I will trust and obey ;-)

Cheers!
 
Old 03-16-2004, 08:44 AM   #11
dslboy
Member
 
Registered: Aug 2003
Location: Norway
Distribution: Slackware -current
Posts: 157

Rep: Reputation: 30
I'm running slackware with swaret, and it's working like magic medisin to my system.
Just hit swaret --update, and it will check my entire system and do the nesseccary updates.
 
Old 03-16-2004, 10:08 AM   #12
Nytehawk
LQ Newbie
 
Registered: Mar 2004
Location: Northern Virginia
Distribution: Fedora Core 2
Posts: 29

Rep: Reputation: 15
If you are talking rpm's, try using the --aid switch. It might be old, but it still works. It will check for dependancies and install the right stuff.
 
Old 03-16-2004, 11:13 AM   #13
hyper guy
Member
 
Registered: Feb 2004
Location: A State of Bliss (Ontario, Canada)
Distribution: Vector-Slackware + Dropline
Posts: 43

Original Poster
Rep: Reputation: 15
Well, remember folks, that the heart of this particular bug-bear wasn't so much the ability of a pkg mgr to find/install/track the dependencies for you, so much as resolving potential conflicts.

like, if the new version of pkg Y (which pkg X, wot you're really after, requires) breaks already pre-existing pkg Z (which uses the old version of pkg Y), then wot?

i will assume from all you guys are saying (and mainly cuz i'm tired of thinking aobut this now ;-)) is that these nifty smart pkg mgrs will figure out all that mess for you. n'est pas?

Last edited by hyper guy; 03-16-2004 at 11:15 AM.
 
Old 03-16-2004, 11:54 AM   #14
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Quote:
Like, if the new version of pkg Y (which pkg X, wot you're really after, requires) breaks already pre-existing pkg Z (which uses the old version of pkg Y), then wot?
If you stick with packages provided by one vendor then this is very unlikely to happen. If the situation you describe above occurs then the package manager will complain that the older version of Y is required by Z, and it'll probably either remove Z or hold back X.
This is where a source based distro, such as Gentoo, comes in handy. Chances are package Z will work properly when its compiled against the new version of Y. If it does not, usually what I do is I go check out Gentoo bugzilla and forums, you'll probably find half a dozen people having the same problem and if you're lucky, someone will provide a solution (like a patch or workaround).

Last edited by Demonbane; 03-16-2004 at 12:23 PM.
 
Old 03-16-2004, 12:22 PM   #15
hyper guy
Member
 
Registered: Feb 2004
Location: A State of Bliss (Ontario, Canada)
Distribution: Vector-Slackware + Dropline
Posts: 43

Original Poster
Rep: Reputation: 15
Thanks muchly Demonbane. You've explained this in a way that I can unnerstand it (i think). So my next question is, is it possible to have two versions of Z on my sys at the same time? Can I have two versions of Y on my system at the same time?

That is, I'd have the (pre)existing Z, then I might compile Z fresh against the new Y (somehow?). If the compiled Z worked fine, then I could delete the original and the old Y. THEN I could go ahead and install X, no prob.

Is that possible to do? Is it super unadvisable to do (something akin to logging in as root by default)?

Cheers again
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
please help me I'm in dependency hell baronsam Linux - Software 5 11-05-2004 09:33 PM
dependency hell riseringseeker Linux - Newbie 3 09-22-2004 01:57 PM
Dependency Hell :-( AMMullan Linux - Software 5 03-27-2004 10:51 PM
Is this what they mean by dependency hell? john_walsh54 Linux - Software 1 10-10-2003 07:52 AM
Dependency hell !!! lub0 Linux - Software 5 09-26-2003 08:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration