Bug#631907: libc6-dev: should add breaks for gcc without multiarch support
Package: libc6-dev
Version: 2.13-7
Hi,
It seems like libc6-dev breaks gccs without multiarch support:
$ cat t.c
#include <stdio.h>
int
main()
{
printf("'lo world\n");
return 0;
}
$ make t CC=gcc-4.4
gcc-4.4 t.c -o t
/usr/bin/ld.bfd.real: cannot find crt1.o: No such file or directory
/usr/bin/ld.bfd.real: cannot find crti.o: No such file or directory
collect2: ld returned 1 exit status
make: *** [t] Error 1
$ make t CC=gcc-4.5
gcc-4.5 t.c -o t
/usr/bin/ld.bfd.real: cannot find crt1.o: No such file or directory
/usr/bin/ld.bfd.real: cannot find crti.o: No such file or directory
collect2: ld returned 1 exit status
make: *** [t] Error 1
$ make t CC=gcc-4.6
gcc-4.6 t.c -o t
/usr/bin/ld.bfd.real: cannot find crt1.o: No such file or directory
/usr/bin/ld.bfd.real: cannot find crti.o: No such file or directory
collect2: ld returned 1 exit status
make: *** [t] Error 1
$ dpkg-query -W -f '${Package}: ${Version}\n' gcc-4.{4..6} binutils
gcc-4.4: 4.4.5-13
gcc-4.5: 4.5.2-4
gcc-4.6: 4.6.0-2
binutils: 2.21.0.20110327-2
After upgrading gcc-4.4 to 4.4.6-6 it still won't build:
$ make t CC=gcc-4.4
gcc-4.4 t.c -o t
/usr/bin/ld.bfd.real: cannot find -lgcc_s
collect2: ld returned 1 exit status
make: *** [t] Error 1
But that seems to be an issue on gcc (output edited for readability):
$ strace -f -e open make t CC=gcc-4.4 2>&1| grep gcc_s | grep 486
open("/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.4.6/libgcc_s.so", O_RDONLY|
O_LARGEFILE) = -1 ENOENT
open("/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.4.6/libgcc_s.a", O_RDONLY|
O_LARGEFILE) = -1 ENOENT
open("/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.4.6/../../../libgcc_s.so",
O_RDONLY|O_LARGEFILE) = -1 ENOENT
open("/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.4.6/../../../libgcc_s.a",
O_RDONLY|O_LARGEFILE) = -1 ENOENT
open("/usr/i486-linux-gnu/lib32/libgcc_s.so", O_RDONLY|O_LARGEFILE) = -1
ENOENT
open("/usr/i486-linux-gnu/lib32/libgcc_s.a", O_RDONLY|O_LARGEFILE) = -1 ENOENT
Another try, upgrading gcc-4.6 to 4.6.0-10 (with multiarch support):
$ make t CC=gcc-4.6
gcc-4.6 t.c -o t
$ ./t
'lo world
Please add Breaks, as appropriate.
Cheers,
--
Raphael Geissert - Debian Developer
www.debian.org - get.debian.net
Reply to: