why is compiling source programs under linux such a headache?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
why is compiling source programs under linux such a headache?
hi all,
i spent the whole of last night trying to find and install a good p2p client for my linux box...and i went through hell. it was such a nightmare just a week ago, i removed windows <completely> from my computer, thinking that linux could do all that windows did, and more, and in a <much> better way. but after last night's frustrating experience, i really begin to wonder if linux will get a strong user-base if it gets so cryptic, and hardly ever works. i agree, i'm not a linux guru or something, i'm quite new to linux, but i do know how to find my way around, and yet, all that linux does is gets me frustrated.
i downloaded the source for gtk-gnutella 0.95 (as they didnt have a binary for mandrake). ./Configure runs ok, but when i "make", i get crazy errors that i've gotten used to :
main.c: At top level:
./lib/prop.h:60: warning: array 'prop_type_str' assumed to have one element
core/sockets.h:105: error: storage size of `wio' isn't known
./if/core/downloads.h:95: error: storage size of `parq_version' isn't known
core/matching.h:77: error: storage size of `all_entries' isn't known
core/nodes.h:105: error: storage size of `header' isn't known
make[2]: *** [main.o] Error 1
what should i do here? should i edit the nodes.h file?! what i want to know is, how come installing apps in ms windows such a breeze, and quite contrary in linux? is it possible to make installation as simple? i installed the devel sources for my distro (mandrake 10.1), and still i get such errors. out of 20 apps i try compiling in linux, if i'm lucky, one will compile ok.
last night, i downloaded and "tried" to install about 10 p2p clients.....until, 12 hours later, i <finally> got one to work - phex. but i wanted to get this issue straight - why dont 99% of them compile?!
one of the other apps i tried to install was gnut 0.4.28. ./configure runs ok, "make" gives me this:
cli.c:453: error: initializer element is not constant
cli.c:453: error: (near initialization for `commands[6]')
cli.c:454: error: initializer element is not constant
cli.c:454: error: (near initialization for `commands[7]')
make[2]: *** [cli.o] Error 1
make[2]: Leaving directory `/home/test/progs/gnut/gnut-0.4.28/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/test/progs/gnut/gnut-0.4.28/src'
make: *** [all-recursive] Error 1
whats going on?? is my distro screwed or something? i'm really desperate. someone pls advise...
first, you need to show a little more of the error messages, errors tend to have a snowball effect ( you will get multiple errors from one error).
The way I like to install my system is a base slackware, then I compile everything from there ( I'm very picky about where and how things are installed ). Once you get some experience, compiling and installing is a breeze. But I know where you are coming from, back when I first started learning linux, I used to get so pissed trying to compile. It seemed like no matter what tutorial or how-to I followed, everything would just bail on me. But after awhile, once you learn the way things should be done and how to do them, it's not an issue.
make sure you have a complete development environment available and also don't forget that mandrake splits it's packages, so any dependencies of your programs make sure you have -devel packages of that dependency.
One last thing, it's "./configure --help, ./configure <options>, make, make install" -- ALWAYS look at the options you have when running configure. sometimes there aren't any you need to specify, sometimes there are options but they are not required ( only for feature X or to turn off feature X etc...) and sometimes options are required to get the thing to compile at all...
phewww thanx so much J for those inputs....atleast someone understands how frustrating things can get i will keep in mind those options to pass to "configure"...and hopefully, i can ask for more help if i need to, right here.
I think, that all linux needs completely new way of installing programs, because every time when I'm compiling something I'm afraid of having errors :-O. And also I afraid of broken dependencies and so on
all that stuff is psychological:
mandrake has a big developers base, so if gtk-gnutella-0.95 is not in mdk repositories, it's because they are having the same problems at compilation. Consider that a package declared stable for his authors doesn't mean that it's stable inside a distribution.
Solution for compile hell: if it isn't packaged, pretend that it doesn't exist. Use an older version or take the risk.
excuse my english.
P.S.: if you compiled gtk-gnutella outside rpm system, when you upgrade, it will be ignored.
You (OP) ask why installing programs on linux is so hard.
The answer is: it doesn't have to be. I'm sorry that you find it hard to install programs with Mandrake. I must also admit that, although I think I'm a l33t h4x0r, I have difficulties compiling programs I haven't written myself (and sometimes them too ).
However, I haven't had any problems installing binaries provided by my distro. I haven't had to suffer from dependency hell.
It might be because there are a lot of utterly clueless newbies out there--but I don't think it's the case. I think it's because debian's package management system is really good.
for instance:
# apt-get install gtk-gnutella
Reading Package Lists...
Building Dependency Tree...
Suggested packages:
gv html2ps imagemagick t1-cyrillic acroread
Recommended packages:
lpr cupsys-client psutils wdiff
The following NEW packages will be installed:
a2ps
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 719kB of archives.
After unpacking 3170kB of additional disk space will be used.
Get:1 ftp://ftp.belnet.be testing/main a2ps 1:4.13b-4.3 [719kB]
Fetched 719kB in 9s (75.0kB/s)
Selecting previously deselected package a2ps.
(Reading database ... 105952 files and directories currently installed.)
Unpacking a2ps (from .../a2ps_1%3a4.13b-4.3_i386.deb) ...
Setting up a2ps (4.13b-4.3) ...
install/a2ps: Handling install for emacsen flavor emacs21
#
what the example didn't show is that if a2ps had any unresolved dependencies, apt-get would automatically (and recursively(!)) find out which, and prompt you to install them too.
alternatively, there's synaptic, a GUI frontend to the apt tools (apt-get, apt-cache and others). It's really easy to use.
In summation: I have never, ever, had problems installing programs by apt-get.
One of my friends, who has tried more distros than I have (and probably knows more about those he hasn't tried than I do) has come to the conclusion that only two distros provide decent package management systems: debian and gentoo (which he uses). From what I've heard, I think he's right. I've never heard about anyone having problems installing debian packages. At least not enough for me to remember.
So, switching distro may solve your problems.
hth --Jonas
PS. I didn't mean for this to be a sales pitch, though it sounds an awful lot like it. What I'm trying to do is to give you the impression that linux doesn't have to be hard. One of my favorite quotes about linux is "it's a bumpy ride, but in the end, it's all worth it."; I hope that you will agree.
Maybe not today; maybe not this week. But soon, and for the rest of your life
as I haven't investigated the precise meaning of `debian-based', I can't promise you that all use the apt/.deb; but I'd be really surprised if none did.
those who don't use .deb choose not to because they suck
To the OP: gtk-gnutella-0.95-1plf.i586.rpm *IS* available from the PLF. There is a 64-bit version too, if that is what you are running. Have you set up your urpmi repository mirrors? (See my sig.)
But why don't other distributions use that package management system if it is so good
Debian does have a good package management system, but most major distros have pretty good ones as well. Mandrake uses "urpmi", with the "rpmdrake" GUI front-end. I have never had a problem installing anything using it.
Padma: are you then saying that all the threads like this (i.e. I can't get app X working; (dependencies suck | compile error)) is because the newbies don't know how to use the excellent package management systems (=`PMS'?)?
Jonas: My experience so far makes me think that that is true for about 90% of the cases. Newbies who don't use their distro's "PMS" often break their systems, or alternatively get rid of Linux because they can't get it to work "as easily as Windows". In actuality, most distros provide a good PMS, and the major distros, at least, have many *thousands* of packages just waiting for installation.
True, these repositories may not have the "latest and greatest" version of a particular piece of software that was released yesterday, but most newbies don't really *need* that version; they need a good stable version of the software that will run on their system. The distro repositories are almost guaranteed to have *that*.
well, if you're right that 90% of the `stuck' users don't use what's given to them, this implies that either
(1) there's a bug in the documentation, which should be fixed.
(2) they didn't read it
... in which case I feel no remorse. At all.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.