On Thu, Apr 12, 2012 at 02:19:57PM +0200, Nicolas Chauvet wrote: > 2012/4/12 Jim Meyering <jim@xxxxxxxxxxxx>: > > I built another x86_64 rawhide VM yesterday and was surprised > > to find that its gcc was unusable: > > > > $ printf 'int main(){return 0;}' > k.c; gcc k.c > > /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.7.0/../../../libc.so when searching for -lc > > /usr/bin/ld: skipping incompatible /lib/libc.so when searching for -lc > > /usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc > > /usr/bin/ld: cannot find -lc > > collect2: error: ld returned 1 exit status > > [Exit 1] > > > > How strange. > > strace (after enabling that) showed that since there was no > > /lib64/libc.{so,a}, it was finding/rejecting the i686 libraries. > > > > That led me to the realization that gcc is usable only > > after you've also installed the glibc-devel package, since > > That's because your usage of the compiler suppose that you are using > the host glibc. > > But one would use the compiler to compile for any target system > including another glibc or ulibc or dietlibc whatever, without any > chance for the produced binaries to be linked with anything from the > host system. (without having glibc-devel installed). But compiling Jim's trivial program into an a.out is virtually the simplest and most obvious use of gcc. What I don't understand is what has changed. It's unusual that Jim would be the first person to find this, so probably a dependency (indirect?) has been dropped somewhere along the line. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v -- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel