On 11/26/2010 06:35 PM, Mr Dash Four wrote: > Apologies if this is the wrong mailing list, but I could not find a > Fedora-specific one for gcc (as my problem seems to be specific to the > Fedora build of gcc 4.4.5 - at least that is what I think anyway)! > > The reason I'd like to build gcc from source is so that I could enable > multilib allowing me to compile code for both i686 and x86_64 > architectures (my machine is x86_64). The 'standard' Fedora distribution > rpm does not allow me to do that - when I try "gcc -o hello -m32 > hello.c" or "gcc -o hello -march=i686 hello.c" I get the following errors: > > /usr/bin/ld: skipping incompatible > /usr/lib/gcc/x86_64-redhat-linux/4.4.5/libgcc_s.so when searching for > -lgcc_s > /usr/bin/ld: skipping incompatible > /usr/lib/gcc/x86_64-redhat-linux/4.4.5/libgcc_s.so when searching for > -lgcc_s > /usr/bin/ld: cannot find -lgcc_s > collect2: ld returned 1 exit status Maybe the libgcc-4.4.5-2.fc13.i686 package isn't installed. sudo yum install libgcc.i686 > and > > hello.c:1: error: CPU you selected does not support x86-64 instruction set > > So I downloaded the source rpm and tried to build a binary rpm by > running "rpmbuild -bb gcc.spec". > > I've got a lot of errors and had to hack into this VERY POORLY designed > file to disable the languages I do not need (gcc-java, fortran to name a > few), but still no go! You shouldn't get any errors. Are you sure all the dependencies are installed? sudo yum-builddep gcc Andrew.