Problem compiling with gcc 3.3 on 2.6.14 (Debian)
Dear List,
I recently upgraded to Linux 2.6.14 (as compiled as a 686 Debian package), and found that this distribution, too, has switched to GCC 4 for kernel.
I tried to recompile a plain vanilla qemu 0.7.2 tarball : I switched to gcc 3.3 for this (in /usr/bin : ln -sf gcc-3.3 gcc ; ln -sf gccbug-3.3 gccbug ; ln -sf cpp-3.3 cpp ), planning to switch back to GCC 4 for recompilation of the kqemu subdirectory. This failed.
./configure works OK, compilation starts OK too, but the linking fails :
charpent@yod:~/qemu-source/qemu-0.7.2$ ./configure Install prefix /usr/local BIOS directory /usr/local/share/qemu binary directory /usr/local/bin Manual directory /usr/local/share/man ELF interp prefix /usr/gnemul/qemu-%M Source path /home/charpent/qemu-source/qemu-0.7.2 C compiler gcc Host C compiler gcc make make host CPU i386 host big endian no target list i386-user arm-user armeb-user sparc-user ppc-user i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu mips-softmmu gprof enabled no static build no SDL support yes SDL static link no mingw32 support no Adlib support no FMOD support no kqemu support yes
KQEMU Linux module configuration:
kernel sources /lib/modules/2.6.14-2-686/build
kbuild type 2.6
charpent@yod:~/qemu-source/qemu-0.7.2$ gcc --version gcc (GCC) 3.3.6 (Debian 1:3.3.6-10) Copyright (C) 2003 Free Software Foundation, Inc. Ce logiciel est libre; voir les sources pour les conditions de copie. Il n'y a PAS GARANTIE; ni implicite pour le MARCHANDAGE ou pour un BUT PARTICULIER.
charpent@yod:~/qemu-source/qemu-0.7.2$ make
gcc -Wall -O2 -g -fno-strict-aliasing -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -o dyngen dyngen.c
gcc -DQEMU_TOOL -Wall -O2 -g -fno-strict-aliasing -g -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -o qemu-img qemu-img.c block.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c block-vpc.c block-vvfat.c -lz
for d in i386-user arm-user armeb-user sparc-user ppc-user i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu mips-softmmu; do \
make -C $d all || exit 1 ; \
done
make[1]: Entering directory `/home/charpent/qemu-source/qemu-0.7.2/i386-user'
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I/home/charpent/qemu-source/qemu-0.7.2/target-i386 -I/home/charpent/qemu-source/qemu-0.7.2 -I/home/charpent/qemu-source/qemu-0.7.2/linux-user -I/home/charpent/qemu-source/qemu-0.7.2/linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/charpent/qemu-source/qemu-0.7.2/fpu -I/home/charpent/qemu-source/qemu-0.7.2/slirp -c -o elfload.o /home/charpent/qemu-source/qemu-0.7.2/linux-user/elfload.c
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I/home/charpent/qemu-source/qemu-0.7.2/target-i386 -I/home/charpent/qemu-source/qemu-0.7.2 -I/home/charpent/qemu-source/qemu-0.7.2/linux-user -I/home/charpent/qemu-source/qemu-0.7.2/linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/charpent/qemu-source/qemu-0.7.2/fpu -I/home/charpent/qemu-source/qemu-0.7.2/slirp -c -o main.o /home/charpent/qemu-source/qemu-0.7.2/linux-user/main.c
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I/home/charpent/qemu-source/qemu-0.7.2/target-i386 -I/home/charpent/qemu-source/qemu-0.7.2 -I/home/charpent/qemu-source/qemu-0.7.2/linux-user -I/home/charpent/qemu-source/qemu-0.7.2/linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/charpent/qemu-source/qemu-0.7.2/fpu -I/home/charpent/qemu-source/qemu-0.7.2/slirp -c -o syscall.o /home/charpent/qemu-source/qemu-0.7.2/linux-user/syscall.c
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I/home/charpent/qemu-source/qemu-0.7.2/target-i386 -I/home/charpent/qemu-source/qemu-0.7.2 -I/home/charpent/qemu-source/qemu-0.7.2/linux-user -I/home/charpent/qemu-source/qemu-0.7.2/linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/charpent/qemu-source/qemu-0.7.2/fpu -I/home/charpent/qemu-source/qemu-0.7.2/slirp -c -o mmap.o /home/charpent/qemu-source/qemu-0.7.2/linux-user/mmap.c
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I/home/charpent/qemu-source/qemu-0.7.2/target-i386 -I/home/charpent/qemu-source/qemu-0.7.2 -I/home/charpent/qemu-source/qemu-0.7.2/linux-user -I/home/charpent/qemu-source/qemu-0.7.2/linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/charpent/qemu-source/qemu-0.7.2/fpu -I/home/charpent/qemu-source/qemu-0.7.2/slirp -c -o signal.o /home/charpent/qemu-source/qemu-0.7.2/linux-user/signal.c
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I/home/charpent/qemu-source/qemu-0.7.2/target-i386 -I/home/charpent/qemu-source/qemu-0.7.2 -I/home/charpent/qemu-source/qemu-0.7.2/linux-user -I/home/charpent/qemu-source/qemu-0.7.2/linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/charpent/qemu-source/qemu-0.7.2/fpu -I/home/charpent/qemu-source/qemu-0.7.2/slirp -c -o path.o /home/charpent/qemu-source/qemu-0.7.2/linux-user/path.c
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I/home/charpent/qemu-source/qemu-0.7.2/target-i386 -I/home/charpent/qemu-source/qemu-0.7.2 -I/home/charpent/qemu-source/qemu-0.7.2/linux-user -I/home/charpent/qemu-source/qemu-0.7.2/linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/charpent/qemu-source/qemu-0.7.2/fpu -I/home/charpent/qemu-source/qemu-0.7.2/slirp -c -o osdep.o /home/charpent/qemu-source/qemu-0.7.2/osdep.c
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I/home/charpent/qemu-source/qemu-0.7.2/target-i386 -I/home/charpent/qemu-source/qemu-0.7.2 -I/home/charpent/qemu-source/qemu-0.7.2/linux-user -I/home/charpent/qemu-source/qemu-0.7.2/linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/charpent/qemu-source/qemu-0.7.2/fpu -I/home/charpent/qemu-source/qemu-0.7.2/slirp -c -o thunk.o /home/charpent/qemu-source/qemu-0.7.2/thunk.c
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I/home/charpent/qemu-source/qemu-0.7.2/target-i386 -I/home/charpent/qemu-source/qemu-0.7.2 -I/home/charpent/qemu-source/qemu-0.7.2/linux-user -I/home/charpent/qemu-source/qemu-0.7.2/linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/charpent/qemu-source/qemu-0.7.2/fpu -I/home/charpent/qemu-source/qemu-0.7.2/slirp -c -o vm86.o /home/charpent/qemu-source/qemu-0.7.2/linux-user/vm86.c
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I/home/charpent/qemu-source/qemu-0.7.2/target-i386 -I/home/charpent/qemu-source/qemu-0.7.2 -I/home/charpent/qemu-source/qemu-0.7.2/linux-user -I/home/charpent/qemu-source/qemu-0.7.2/linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/charpent/qemu-source/qemu-0.7.2/fpu -I/home/charpent/qemu-source/qemu-0.7.2/slirp -c -o exec.o /home/charpent/qemu-source/qemu-0.7.2/exec.c
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I/home/charpent/qemu-source/qemu-0.7.2/target-i386 -I/home/charpent/qemu-source/qemu-0.7.2 -I/home/charpent/qemu-source/qemu-0.7.2/linux-user -I/home/charpent/qemu-source/qemu-0.7.2/linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/charpent/qemu-source/qemu-0.7.2/fpu -I/home/charpent/qemu-source/qemu-0.7.2/slirp -c -o kqemu.o /home/charpent/qemu-source/qemu-0.7.2/kqemu.c
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -mpreferred-stack-boundary=2 -falign-functions=0 -fno-gcse -fno-reorder-blocks -fno-optimize-sibling-calls -I. -I/home/charpent/qemu-source/qemu-0.7.2/target-i386 -I/home/charpent/qemu-source/qemu-0.7.2 -I/home/charpent/qemu-source/qemu-0.7.2/linux-user -I/home/charpent/qemu-source/qemu-0.7.2/linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/charpent/qemu-source/qemu-0.7.2/fpu -I/home/charpent/qemu-source/qemu-0.7.2/slirp -c -o op.o /home/charpent/qemu-source/qemu-0.7.2/target-i386/op.c
../dyngen -o op.h op.o
../dyngen -c -o opc.h op.o
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I/home/charpent/qemu-source/qemu-0.7.2/target-i386 -I/home/charpent/qemu-source/qemu-0.7.2 -I/home/charpent/qemu-source/qemu-0.7.2/linux-user -I/home/charpent/qemu-source/qemu-0.7.2/linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/charpent/qemu-source/qemu-0.7.2/fpu -I/home/charpent/qemu-source/qemu-0.7.2/slirp -c -o translate-op.o /home/charpent/qemu-source/qemu-0.7.2/translate-op.c
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I/home/charpent/qemu-source/qemu-0.7.2/target-i386 -I/home/charpent/qemu-source/qemu-0.7.2 -I/home/charpent/qemu-source/qemu-0.7.2/linux-user -I/home/charpent/qemu-source/qemu-0.7.2/linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/charpent/qemu-source/qemu-0.7.2/fpu -I/home/charpent/qemu-source/qemu-0.7.2/slirp -c -o translate-all.o /home/charpent/qemu-source/qemu-0.7.2/translate-all.c
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I/home/charpent/qemu-source/qemu-0.7.2/target-i386 -I/home/charpent/qemu-source/qemu-0.7.2 -I/home/charpent/qemu-source/qemu-0.7.2/linux-user -I/home/charpent/qemu-source/qemu-0.7.2/linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/charpent/qemu-source/qemu-0.7.2/fpu -I/home/charpent/qemu-source/qemu-0.7.2/slirp -c -o cpu-exec.o /home/charpent/qemu-source/qemu-0.7.2/cpu-exec.c
../dyngen -g -o gen-op.h op.o
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I/home/charpent/qemu-source/qemu-0.7.2/target-i386 -I/home/charpent/qemu-source/qemu-0.7.2 -I/home/charpent/qemu-source/qemu-0.7.2/linux-user -I/home/charpent/qemu-source/qemu-0.7.2/linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/charpent/qemu-source/qemu-0.7.2/fpu -I/home/charpent/qemu-source/qemu-0.7.2/slirp -c -o translate.o /home/charpent/qemu-source/qemu-0.7.2/target-i386/translate.c
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I/home/charpent/qemu-source/qemu-0.7.2/target-i386 -I/home/charpent/qemu-source/qemu-0.7.2 -I/home/charpent/qemu-source/qemu-0.7.2/linux-user -I/home/charpent/qemu-source/qemu-0.7.2/linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/charpent/qemu-source/qemu-0.7.2/fpu -I/home/charpent/qemu-source/qemu-0.7.2/slirp -c -o fpu/softfloat-native.o /home/charpent/qemu-source/qemu-0.7.2/fpu/softfloat-native.c
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I/home/charpent/qemu-source/qemu-0.7.2/target-i386 -I/home/charpent/qemu-source/qemu-0.7.2 -I/home/charpent/qemu-source/qemu-0.7.2/linux-user -I/home/charpent/qemu-source/qemu-0.7.2/linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/charpent/qemu-source/qemu-0.7.2/fpu -I/home/charpent/qemu-source/qemu-0.7.2/slirp -c -o helper.o /home/charpent/qemu-source/qemu-0.7.2/target-i386/helper.c
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I/home/charpent/qemu-source/qemu-0.7.2/target-i386 -I/home/charpent/qemu-source/qemu-0.7.2 -I/home/charpent/qemu-source/qemu-0.7.2/linux-user -I/home/charpent/qemu-source/qemu-0.7.2/linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/charpent/qemu-source/qemu-0.7.2/fpu -I/home/charpent/qemu-source/qemu-0.7.2/slirp -c -o helper2.o /home/charpent/qemu-source/qemu-0.7.2/target-i386/helper2.c
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I/home/charpent/qemu-source/qemu-0.7.2/target-i386 -I/home/charpent/qemu-source/qemu-0.7.2 -I/home/charpent/qemu-source/qemu-0.7.2/linux-user -I/home/charpent/qemu-source/qemu-0.7.2/linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/charpent/qemu-source/qemu-0.7.2/fpu -I/home/charpent/qemu-source/qemu-0.7.2/slirp -c -o translate-copy.o /home/charpent/qemu-source/qemu-0.7.2/target-i386/translate-copy.c
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I/home/charpent/qemu-source/qemu-0.7.2/target-i386 -I/home/charpent/qemu-source/qemu-0.7.2 -I/home/charpent/qemu-source/qemu-0.7.2/linux-user -I/home/charpent/qemu-source/qemu-0.7.2/linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/charpent/qemu-source/qemu-0.7.2/fpu -I/home/charpent/qemu-source/qemu-0.7.2/slirp -c -o disas.o /home/charpent/qemu-source/qemu-0.7.2/disas.c
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I/home/charpent/qemu-source/qemu-0.7.2/target-i386 -I/home/charpent/qemu-source/qemu-0.7.2 -I/home/charpent/qemu-source/qemu-0.7.2/linux-user -I/home/charpent/qemu-source/qemu-0.7.2/linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/charpent/qemu-source/qemu-0.7.2/fpu -I/home/charpent/qemu-source/qemu-0.7.2/slirp -c -o i386-dis.o /home/charpent/qemu-source/qemu-0.7.2/i386-dis.c
rm -f libqemu.a
ar rcs libqemu.a exec.o kqemu.o translate-op.o translate-all.o cpu-exec.o translate.o op.o fpu/softfloat-native.o helper.o helper2.o translate-copy.o disas.o i386-dis.o
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I/home/charpent/qemu-source/qemu-0.7.2/target-i386 -I/home/charpent/qemu-source/qemu-0.7.2 -I/home/charpent/qemu-source/qemu-0.7.2/linux-user -I/home/charpent/qemu-source/qemu-0.7.2/linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/charpent/qemu-source/qemu-0.7.2/fpu -I/home/charpent/qemu-source/qemu-0.7.2/slirp -c -o gdbstub.o /home/charpent/qemu-source/qemu-0.7.2/gdbstub.c
gcc -g -Wl,-shared -o qemu-i386 elfload.o main.o syscall.o mmap.o signal.o path.o osdep.o thunk.o vm86.o libqemu.a gdbstub.o -lm
/usr/bin/ld: section .note.ABI-tag [0000000000000468 -> 0000000000000487] chevauche la section .hash [0000000000000114 -> 00000000000027d3]
/usr/bin/ld: qemu-i386: Not enough room for program headers (allocated 8, need 9)
/usr/bin/ld: édition de lien finale en échec: Mauvaise valeur
collect2: ld a retourné 1 code d'état d'exécution
make[1]: *** [qemu-i386] Erreur 1
make[1]: Leaving directory `/home/charpent/qemu-source/qemu-0.7.2/i386-user'
make: *** [all] Erreur 1
charpent@yod:~/qemu-source/qemu-0.7.2$I'm stymied ...
Emmanuel Charpentier
Quoted 11 lines · Emmanuel Charpentier
Dear List,
I recently upgraded to Linux 2.6.14 (as compiled as a 686 Debian package), and found that this distribution, too, has switched to GCC 4 for kernel.
I tried to recompile a plain vanilla qemu 0.7.2 tarball : I switched to gcc 3.3 for this (in
/usr/bin: ln -sf gcc-3.3 gcc ; ln -sf gccbug-3.3 gccbug ; ln -sf cpp-3.3 cpp ), planning to switch back to GCC 4 for recompilation of the kqemu subdirectory. This failed.
Strange. Haven't heard of this one before.
Compiling the kqemu module should use the same compiler that the kernel uses anyways. It doesn't use the same one that qemu uses, but the one in the kernel's Makefile.
I also notice that your error seems to be with qemu-i386. This binary doesn't use kqemu at all, so either don't use kqemu (if all you care about is i386-user) or compile i386-softmmu only (if you want to use kqemu and don't care aboui i386-user).
It is hard to make out the problem when the error messages aren't in english, btw.
Signature · 2 lines
Infinite complexity begets infinite beauty. Infinite precision begets infinite perfection.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Just, I think, it is trying to link with libm.a, that is compiled using GCC 4.0, so, the fail.
Doesn't your distro have a gcc_select?
I use it in MacOS X to change between GCC 3.3 and GCC 4.0 and it also changes default library locations so statically they never get linked with different ABIs.
Quoted 19 lines · Jim C. Brown
Quoted 11 lines · Emmanuel Charpentier
Dear List,
I recently upgraded to Linux 2.6.14 (as compiled as a 686 Debian package), and found that this distribution, too, has switched to GCC 4 for kernel.
I tried to recompile a plain vanilla qemu 0.7.2 tarball : I switched to gcc 3.3 for this (in
/usr/bin: ln -sf gcc-3.3 gcc ; ln -sf gccbug-3.3 gccbug ; ln -sf cpp-3.3 cpp ), planning to switch back to GCC 4 for recompilation of the kqemu subdirectory. This failed.Strange. Haven't heard of this one before.
Compiling the kqemu module should use the same compiler that the kernel uses anyways. It doesn't use the same one that qemu uses, but the one in the kernel's
Makefile.
Quoted 16 lines
I also notice that your error seems to be with qemu-i386. This binary doesn't use kqemu at all, so either don't use kqemu (if all you care about is i386-user) or compile i386-softmmu only (if you want to use kqemu and don't care aboui i386-user).
It is hard to make out the problem when the error messages aren't in english, btw.
Signature · 8 lines
Infinite complexity begets infinite beauty. Infinite precision begets infinite perfection. _______________________________________________ Qemu-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/qemu-devel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
iD8DBQFDi11ySOHwOb87puQRAo39AKCMHYdlR4Gw2Z5+yQdH7goYK0frBACfZzsw Fp5c0p5BIhHIfwjVh65KGqI=
=Esmf
-----END PGP SIGNATURE-----
[Qemu-devel] Debian blues (Re: Problem compiling with gcc 3.3 on 2.6.14 (Debian))
Quoted 6 lines · Natalia Portillo
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Just, I think, it is trying to link with libm.a, that is compiled using GCC 4.0, so, the fail.
Doesn't your distro have a
gcc_select?
<rant>
Nope. That's Debian for you : Debian users are supposed to be big hunks of programmers, and not to flinch on such petty details (the epitome of "Real men don't write in Pascal" mentality...). At least, that's the impression you get reading postings of some Ordained Debian Developpers (TM) on some Debian mailing lists. The simple notion of Debian end-users totally overwhelms them...
Curiously, Debian has such a mechanism for handling "default" choices about equivalent programs : the "/etc/alternatives" directory. But some ODD (TM) decided, in his (according to himself) infinite wisdom that such an easy way to swich gccs was too easy for common users, and that it might twarth some obscure utterly Debianish hack.
So you're supposed to "ln -s /usr/bin/gcc-3.3 /usr/bin/gcc # etc ...) ad nauseam...
BTW : it would not be fair to pick at Debianers and spare the GCC hackers : the whole madness could have been spared with a bit more reflection about linking *before* launching GCC4...
</rant>
Ah. If only Debian wasn't the best programming distro of the lot for non-system programmers... <Sigh !>
Emmanuel Charpentier
Re: [Qemu-devel] Debian blues (Re: Problem compiling with gcc 3.3 on 2.6.14 (Debian))
Quoted 6 lines · Emmanuel Charpentier
Quoted 5 lines · Natalia Portillo
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Just, I think, it is trying to link with libm.a, that is compiled using GCC 4.0, so, the fail.
I didn't read the original message, but this is a non-issue. It doesn't matter what compiler was used for libm.a
[Completely incorrect rant snipped]
Quoted 2 lines
So you're supposed to "ln -s
/usr/bin/gcc-3.3/usr/bin/gcc# etc ...) ad nauseam...
No, you're bloody well not. You're supposed to configure applications to use the correct compiler if they need a particular version. For qemu that's --cc. Not so hard, was it?
Signature · 2 lines
Daniel Jacobowitz CodeSourcery, LLC
[Qemu-devel] Re: Debian blues (Re: Problem compiling with gcc 3.3 on 2.6.14 (Debian))
Daniel Jacobowitz wrote:
[ Snip ... ]
Quoted 1 line
[Completely incorrect rant snipped]
I wish you were right... Alas, I stand by my words : the attitude of a minority of Debian developpers is on the line of "If it was hard to write, it should be hard to use". Unfortunately, this minority has a serious overlap with the *very good and active* category...
Case in point : I distinctly reember reading a convoluted thread in one of the Debian lists about this /etc/alternative issue for gcc... Was I drunk ? Or what ?
Quoted 6 lines
Quoted 1 line
So you're supposed to "ln -s
/usr/bin/gcc-3.3/usr/bin/gcc# etc ...) ad nauseam...No, you're bloody well not. You're supposed to configure applications to use the correct compiler if they need a particular version. For qemu that's --cc. Not so hard, was it?
Didn't work last time I tried : you may do that at *configure* step. In the case of a GCC4 kernel, you have to :
- configure and make with gcc 3.3 (--cc=gcc-3.3 goes into config-host.mak. What the host-cc does is fairly well obscur to me (got lost in the Makefile/source code), and was undocumented last time I pored over Fabrice's pages).
- make clean in the kemu directory
- re-make with GCC 4 : this recompiles only the kqemu part.
If you can suggest a more steamlined way, I'd be happy to hear from it, and even more happy to read it on Fabrice's pages or somewhere in the documentation...
Emmanuel Charpentier
Re: [Qemu-devel] Re: Debian blues (Re: Problem compiling with gcc 3.3 on 2.6.14 (Debian))
Hi,
Quoted 3 lines
Case in point : I distinctly reember reading a convoluted thread in one of the Debian lists about this
/etc/alternativeissue for gcc... Was I drunk ? Or what ?
I don't know what all this rant is about but it's always best to keep the system compiler as chosen by the distributor. If you want to use alternatives, use CC overrides or other configure option.
Quoted 3 lines
If you can suggest a more steamlined way, I'd be happy to hear from it, and even more happy to read it on Fabrice's pages or somewhere in the documentation...
Use DKMS for kqemu modules?
Re: [Qemu-devel] Re: Debian blues (Re: Problem compiling with gcc 3.3 on 2.6.14 (Debian))
Quoted 4 lines
From: Gwenole Beauchesne <[email protected]>
Use DKMS for kqemu modules?
I would like to try this way on my Mandrake 10.0, but I'm not been able to find a DKMS RPM for this version (seems like DKMS has been introduced with the 10.1 release of Mdk), so the Pterjean's RPMs of kqemu for Mdk 10.0 seems useless.
Can you give me some hint on how to proceed?
Thank you
Carlo
__________________________________________________________________
TISCALI ADSL
Solo con Tiscali Adsl navighi senza limiti e telefoni senza canone Telecom a partire da 19,95 Euro/mese.
Attivala subito, I PRIMI DUE MESI SONO GRATIS! CLICCA QUI:
http://abbonati.tiscali.it/adsl/sa/1e25flat_tc/
Re: [Qemu-devel] Re: Debian blues (Re: Problem compiling with gcc 3.3 on 2.6.14 (Debian))
Quoted 10 lines · On 11/29/05, [email protected] <[email protected]> wrote:
Quoted 4 lines
From: Gwenole Beauchesne <[email protected]>
Use DKMS for kqemu modules?
I would like to try this way on my Mandrake 10.0, but I'm not been able to find a DKMS RPM for this version (seems like DKMS has been introduced with the 10.1 release of Mdk), so the Pterjean's RPMs of kqemu for Mdk 10.0 seems useless.
In fact dkms is not available on 10.0 but only on Corporate 3.0 Development CD which is based on 10.0, and as I usually do not use real 10.0 I did not notice this before.
I'll package it another way as soon as I find time...
Re: [Qemu-devel] Re: Debian blues (Re: Problem compiling with gcc 3.3 on 2.6.14 (Debian))
Quoted 8 lines
Date: Tue, 29 Nov 2005 23:41:16 +0100
From: Pascal Terjan <[email protected]>In fact dkms is not available on 10.0 but only on Corporate 3.0 Development CD which is based on 10.0, and as I usually do not use real 10.0 I did not notice this before.
I'll package it another way as soon as I find time...
Thank you very much
Carlo
__________________________________________________________________
TISCALI ADSL
Solo con Tiscali Adsl navighi senza limiti e telefoni senza canone Telecom a partire da 19,95 Euro/mese.
Attivala subito, I PRIMI DUE MESI SONO GRATIS! CLICCA QUI:
http://abbonati.tiscali.it/adsl/sa/1e25flat_tc/
[Qemu-devel] Re: Debian blues (Re: Problem compiling with gcc 3.3 on 2.6.14 (Debian))
In reply to Gwenole BeauchesneQuoted 7 lines · Gwenole Beauchesne
Hi,
Quoted 1 line
Case in point : I distinctly reember reading a convoluted thread in one of the Debian lists about this
/etc/alternativeissue for gcc... Was I drunk ? Or what ?I don't know what all this rant is about
The idiocy of having a system perfectly able to handle alternative packages ... except when it isn't, for reasons too obscure to be understood by a 31-year computer user (yes, I wrote my first Fortran program in 1974..) when he isnt a dedicated system maintainer. I *use* computers, dammit, I have not too much time to play system administrator....
Quoted 2 lines
but it's always best to keep the
system compiler as chosen by the distributor.
That's exactly what I was trying to do. Debian has switched to GCC 4 for kernels. But (parts of) QEMU) need gcc 3.4. Hence the raindance..
Quoted 2 lines
If you want to use
alternatives, use CC overrides or other configure option.
I missed the doc-"howto" for these options. Last time I tried, I ended up with "Incorrect module format" errores and/or bad compilations errors. I gave up and learned to change compilers...
Quoted 4 lines
Quoted 1 line
If you can suggest a more steamlined way, I'd be happy to hear from it, and even more happy to read it on Fabrice's pages or somewhere in the documentation...
Use DKMS for kqemu modules?
No such thing on Debian. They have a (supposedly) nice system ("module-assistant") for compilong out-of-tree modules... which I never quite figured out. When I need an out-oft-tree kernel (which is rare nowadays), I still roll my own kernel, à la Neanderthal...
Emmanuel Charpentier
2nd answer : news below.
Quoted 12 lines · Jim C. Brown
Quoted 6 lines · Emmanuel Charpentier
Dear List,
I recently upgraded to Linux 2.6.14 (as compiled as a 686 Debian package), and found that this distribution, too, has switched to GCC 4 for kernel.
I tried to recompile a plain vanilla qemu 0.7.2 tarball : I switched to gcc 3.3 for this (in
/usr/bin: ln -sf gcc-3.3 gcc ; ln -sf gccbug-3.3 gccbug ; ln -sf cpp-3.3 cpp ), planning to switch back to GCC 4 for recompilation of the kqemu subdirectory. This failed.Strange. Haven't heard of this one before.
Quoted 7 lines
Compiling the kqemu module should use the same compiler that the kernel uses anyways. It doesn't use the same one that qemu uses, but the one in the kernel's
Makefile.I also notice that your error seems to be with qemu-i386. This binary doesn't use kqemu at all, so either don't use kqemu (if all you care about is i386-user) or compile i386-softmmu only (if you want to use kqemu and don't care aboui i386-user).
Compiling i386-softmmu works (and the resulting executable works well indeed, at least with kqemu). Compiling x86_64-softmmu gives a $#!+load of errors (I'll send a logif someone needs it).
This does not allow to undrstand why the compilation of i386-user fails...
Emmanuel Charpentier
Quoted 10 lines · Jim C. Brown
Quoted 6 lines · Emmanuel Charpentier
Dear List,
I recently upgraded to Linux 2.6.14 (as compiled as a 686 Debian package), and found that this distribution, too, has switched to GCC 4 for kernel.
I tried to recompile a plain vanilla qemu 0.7.2 tarball : I switched to gcc 3.3 for this (in
/usr/bin: ln -sf gcc-3.3 gcc ; ln -sf gccbug-3.3 gccbug ; ln -sf cpp-3.3 cpp ), planning to switch back to GCC 4 for recompilation of the kqemu subdirectory. This failed.
Quoted 5 lines
Strange. Haven't heard of this one before.
Compiling the kqemu module should use the same compiler that the kernel uses anyways. It doesn't use the same one that qemu uses, but the one in the kernel's
Makefile.
I knew that ; that's whi I switched back to gcc 3.3 for compilation of the main package, planning to go back to GCC 4 for kqemu. but comiling this one needs a correctly configured qemu tree.
Quoted 3 lines
I also notice that your error seems to be with qemu-i386. This binary doesn't use kqemu at all, so either don't use kqemu (if all you care about is i386-user) or compile i386-softmmu only (if you want to use kqemu and don't care aboui i386-user).
I''l try that. But the point isn't here. That's the first time I saw such a problem with qemu. Since what has changed is the kernel (and probably parts of the compilation system, BTW : Debian instable is ... well ... somewhat unstable...)
Quoted 1 line
It is hard to make out the problem when the error messages aren't in english, btw.
OK : I'll translate the error messages :
All is fine and dandy up to the "compilation" (linking, in fact) of qemu-i386 :
Quoted 6 lines
gcc -g -Wl,-shared -o qemu-i386 elfload.o main.o syscall.o mmap.o
signal.o path.o osdep.o thunk.o vm86.o libqemu.a gdbstub.o -lm >/usr/bin/ld: section .note.ABI-tag [0000000000000468 ->
0000000000000487] chevauche la section .hash [0000000000000114 ->00000000000027d3]/usr/bin/ld: qemu-i386: Not enough room for program headers (allocated > 8, need 9)/usr/bin/ld: édition de lien finale en échec: Mauvaise valeur
/usr/bin/ld: final linking failed: bad value
Quoted 1 line
collect2: ld a retourné 1 code d'état d'exécution
collect2 returned 1 return value
Quoted 5 lines
make[1]: *** [qemu-i386] Erreur 1
make[1]: *** [qemu-i386] Error 1
make[1]: Leaving directory
`/home/charpent/qemu-source/qemu-0.7.2/i386-user'
make: *** [all] Erreur 1
make: *** [all] Error 1
Hoping this helps...
Emmanuel Charpentier
I ran into the same problem: I was able to resolve it by backleveling binutils from 2.16.1cvs20051117-1 to 2.1.15.x and gcc to 3.4.5
HTH,
Brad Watson
__________________________________
Start your day with Yahoo! - Make it your home page!
http://www.yahoo.com/r/hs
I ran into the same problem: I was able to resolve it by backleveling binutils from 2.16.1cvs20051117-1 to 2.1.15.x and gcc to 3.4.5
HTH,
Brad Watson
__________________________________
Yahoo! Music Unlimited
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/
why not run LANG=en_US <your_make_program> instead ?
Quoted 4 lines · --- Emmanuel Charpentier
Quoted 1 line
It is hard to make out the problem when the error messages aren't in english, btw.
OK : I'll translate the error messages :
Kind regards,
Sylvain Petreolle (aka Usurp)
--- --- --- --- --- --- --- --- --- --- --- --- --- Tired of a proprietary Windows on your computer ? Use free ReactOS instead ( http://www.reactos.org )
Quoted 1 line · Sylvain Petreolle
why not run LANG=en_US <
your_make_program> instead ?
'cause I'm a) French, and b) lazy. I happen to understand French error messages, which are the default on my system...
Emmanuel Charpentier
Quoted 15 lines
Quoted 4 lines · --- Emmanuel Charpentier
Quoted 1 line
It is hard to make out the problem when the error messages aren't in english, btw.
OK : I'll translate the error messages :
Kind regards,
Sylvain Petreolle (aka Usurp)
--- --- --- --- --- --- --- --- --- --- --- --- --- Tired of a proprietary Windows on your computer ? Use free ReactOS instead ( http://www.reactos.org )
Re: [Qemu-devel] Problem compiling with gcc 3.3 on 2.6.14
Quoted 4 lines · Emmanuel Charpentier
Quoted 1 line · Sylvain Petreolle
why not run LANG=en_US <
your_make_program> instead ?'cause I'm a) French, and b) lazy. I happen to understand French error messages, which are the default on my system...
He meant before posting the error message to an international list. (Plus, it's less work than having to translate the errors back to English).
Signature · 4 lines
< Jernej Simoncic ><><><><>< http://deepthought.ena.si/ >
Any sufficiently advanced technology is indistinguishable from magic.
-- A. C. Clarke's Third Law