Click to See Complete Forum and Search --> : RPM --rebuild error: C compiler cannot create executables
Wallex
10-15-2002, 08:34 PM
What gives... I've been compiling programs from source my whole Linux life.. but as soon as I try to use a .src.rpm the gcc fails on me!? This is the scenario:
rpm --rebuild red-carpet-1.4.0-1.ximian.1.src.rpm
some stuff shows up as if I had ./configured it... and then
checking for C compiler default output... configure: error: C compiler cannot create executables
Why? I have tested the compiler on my own programs and through the installation of tar.gz files and it worked fine.... gee, the more I try to use rpms the more I hate them. This time I went a little further into researching unto this matter and it seems I need to install some package... either that or.... I am trying to do what this quote tells me:
"This is no surprise: A C++ compiler is not required for kernel
compilation. Please put the text
int main()
{}
into a file (say, hello.cc), and then compile it with
g++ -o hello hello.cc
if that gives you any error message, you probably need to install the
C++ compiler. If that works, you need to look at config.log to see
what the error was.
"
It all sounds ok... except that I don't know what config.log file this is referring to. Suggestions?
Wallex
10-15-2002, 10:35 PM
Oh well... I've been reading dozens of threads on this matter, and none gives a very good result... I am gonna try installing some libraries like glibc to see if I turn out lucky... altough it sounds very odd that my rpm didn't come with --rebuild support... I am thinking I might as well updated my rpm system. Hey can I use red-carpet or one of those programs to automatically download de dependencies and update the rpm system itself?
PD: the more I try to use src and rpms.. the more they collide, it is almost as if rpms did not like source files... gee, I know this only happens to me, but it really seems like rpms are source are like Linux versus windows... and rpm is not playing the role of the good guys.
JohnT
10-15-2002, 10:50 PM
Don't forget, there have been some problems with the gcc build 2.95 (I think it was). If this is the newest red carpet, possibly it was compiled with gcc 3.2. Just shooting in the dark for a possible.
bwkaz
10-15-2002, 10:58 PM
No, you're right, RPMs don't like source files, because when you install from source, the process doesn't update rpm's database of what's installed.
I believe you can rpm -ivh a srpm, and it will decompress the source for whichever package it is somewhere under /usr/src. Change to whichever directory it is, and run configure manually. If you still get the same error, then check the config.log file in that directory. config.log is a transcript of everything that configure tried to do. The relevant error will be near the end, probably. If you fix that error, then blow away whatever directory the srpm created, and retry rpmbuild --rebuild or whatever you were trying originally.
Wallex
10-16-2002, 09:47 AM
Originally posted by bwkaz
...
I believe you can rpm -ivh a srpm, and it will decompress the source for whichever package it is somewhere under /usr/src. ...
Hey that was some useful information. Hmm.. altough it's odd, when I tried compiling the source, it gave me a different error... it was asking for gnome (which I am still in the process of getting it installed), but... it did not have any configure option to disable gnome use? Weird.. because I downloaded the i386 rpm and it worked fine. I guess I'll never understand rpms.
bwkaz
10-16-2002, 01:31 PM
Red Carpet is part of Ximian, which uses Gnome (right? I think so anyway). So I'm pretty sure you would need to have Gnome installed before you can install Red Carpet.
This is SuSE, right? Aren't there Gnome and Gnome-devel packages on your SuSE CDs? I'd look into installing those.
JohnT
10-16-2002, 03:22 PM
I've always installed the basic Gnome pkg. as there are too many third-party apps Ilike to use that depend on it's .libs
Wallex
10-16-2002, 03:43 PM
Hmm.... go back to my cd's and install from there? Sounds interesting... I haven't gone back to those cds ever since I broke Yast2 down. It's weird how the whole mess I got myself into was because I wanted to try out Galeon which asked me to install Gnome, which started this whole mess... and since the day I installed Suse, I had the option to install Gnome and Galeon... is my whole mess for nothing? Well the cd's I got are pretty outdated... like from a year ago, and I'll probably learn something from all this... hopefully. Currently I am understanding dependencies on rpms...
rpm -Uvh --test glibc-2.3-2.i686.rpm
libdb.so.2 is needed by "insert a couple hundred programs here"
how do I get around this issue? And why exacly is this error message showing up? Will installing the next glibc delete that libdb.so.2? Or will it replace it? or what? I feel like just force installing all rpms until my system explodes.
mdwatts
10-16-2002, 05:50 PM
C compiler cannot create executables
Rings a bell (ding) and I seem to remember from previous threads here at LNO that you need to install a development package. Probably glibc-devel.
Wallex
10-16-2002, 07:42 PM
Originally posted by mdwatts
Rings a bell (ding) and I seem to remember from previous threads here at LNO that you need to install a development package. Probably glibc-devel.
I am currently in the middle of dependency hell while trying to get rpm updated (and trying to install uprmi as well), once I am through these I'll 'hopefully' never have to suffer from dependency issues again. I'll remember to install glibc-devel, right now I am trying to upgrade glibc anyway.
bwkaz
10-16-2002, 11:34 PM
Upgrading glibc is an all-around PITA anyway, I think.
What program requires glibc 2.3? Would 2.2.5 work? (that way, you almost assuredly keep compatibility up to 2.2, the minor version)
Could you instead install an older version of that program, that would work with your current version of glibc? (BTW, you can find out which version of glibc you have right now by directly executing your glibc library -- just run /lib/libc.so, amazingly enough, this works).
Would it be possible to upgrade to SuSE 8.1, or whatever their latest version is? The newer SuSE would have a newer glibc packaged with it, plus that would give you a chance to use the installer's dependency resolver to get everything else you need. Although it may not be feasible, if you've got a bunch of files you need to keep and don't have another partition to put them on.
Wallex
10-17-2002, 12:41 AM
Error.. I was starting to notice that updating glibc is a bit too 'core' into my system and doing so would quite send me into hell.
And all this because I wanted to use checkinstall... but checkinstall uses the binary 'rpm-build' which is the new way rpm build packages instead of rpm -t (I think?). Because of this, I wanted to update my rpm system... and I being the fool I am, thought that updating to the 'latest' rpm version would be the best.. and that's what got me into this whole mess.
I'll just have to search and see which is the lowest rpm version that uses rpm-build (or would doing an alias rpm-build rpm -t work?), hopefully I won't have to update glibc this time...
EDIT: Oops... from what I read, rpmbuild is there to replace rpm -ba, so ... perhaps an alias would be enough to 'simulate' rpmbuild?
mdwatts
10-17-2002, 06:44 AM
For checkinstall I just install either the binary rpm or rebuild the source rpm and then it works.
Of course you know what's coming next. :D
:cool: Caldera OpenLinux Workstation 3.1.1 :cool:
Wallex
10-17-2002, 08:16 AM
I've made up my mind... I quit rpms. They just cause me troubles and more troubles. Conflicts upon conflicts... when I install from source it never complains. Well.. I guess it's because I've been installing packages from source ever since I installed this system, and now the rpm database is all 'outdated' and I have to pay the consequences since all packes throw dependencies that I already meet back at me. And red-carpet has not been of much help since it just mysteriously 'broke' down so that it never 'finds' the dependencies I need to download.
Somehow source feels much easier to install. Now if I just had a site like rpmfind.net to find all my source files... or course, I could download the source rpm, rpm -ivh and then use the source tarball obtained.
bwkaz
10-17-2002, 10:26 AM
Gentoo's pretty good at finding source packages for you... :D
If you seriously want to install from source, check out either Gentoo or LFS. With LFS, you get the whole system for an 80MB (or so) download and a bunch of time following the LFS book. From there, you can install Gentoo's portage system as well (from its source), so you still get the benefits of not having to look for stuff. Of course, you can install either one of Gentoo or LFS on a separate partition (LFS actually pretty much requires it) from your current SuSE partition.
Wallex
10-17-2002, 11:46 AM
I already have plans to move on to Gentoo, just need to
1. Get a real modem and trash my winmodem.
2. Get the CD's.
In my country it seems impossible to get a real modem, so I am depending on my brother to get me one by christmas, so I'll also ask him to bring me the Gentoo cd's since it's gonna be quicker for him to download them. Ah wonder if someday I'll enjoy the benefits of broadband...