PDA

View Full Version : RPM compiling


karlg100
23rd December 2004, 07:18 PM
This simple task is turning out to be not so simple.

I'm trying to [re]build stock .src rpms from Core3 on an x86_64 install.

i run:
rpmbuild -bb [--target x86_64] bash.spec
or:
rpmbuild -bb --target i686 bash.spec

and get similar (but not the same) problems with gcc not being able to compile. Looking at the config.log in the build directory i have the below error messages. I see a few posts from people having trouble compiling 32bit binaries, but can't seem to find a single one on building a 64bit binary. What am i missing/doing wrong here? :confused:

for --target x86_64 (or no --target) attempt:
configure:2423: checking for C compiler default output file name
configure:2426: gcc -O2 -g -pipe -m64 conftest.c >&5
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../libc.a when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
/usr/bin/ld: cannot find -lc


for --target i386 attempt:
gcc -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"x86_64"' -DCONF_OSTYPE='"linux-gnu"' -DCONF_MACHTYPE='"x86_64-redhat-linux-gnu"' -DCONF_VENDOR='"redhat"' -DLOCALEDIR='"/usr/share/locale"' -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -g -o mksyntax ./mksyntax.c
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../libc.a when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
/usr/bin/ld: cannot find -lc

kacprey
26th December 2004, 01:10 AM
I have the same problem, and it is related with "ld" program call.
Try executing "ld -lc" in shell and you get exactly this error.
I cannot compile, because almost every .configure script executes it.
This libc* files are from "glibc-devel" rpm on from distribution.
I'm not alone with this problem, and on the net I couldn't find any sensible aid.
Thanks for any comment or help.

karlg100
17th January 2005, 08:43 PM
Finally found the problem... with a bit of help from the #fedora-devel guys, we are missing the glibc-devel.x86_64 rpm. I installed, and everything works great for building 64 bit rpms. Apperently, [according to #fedora-devel] you can't build i386/i686 binaries on x86_64.

Karl

kacprey
20th January 2005, 10:12 PM
Ok, but where did You get this rpm. It would be nice if you post a link...

Monterrey Photos - Copenhagen - Mississauga -