/usr/bin/ld: cannot find -lc

Ian Lance Taylor iant@google.com
Fri Feb 1 07:13:00 GMT 2013


On Thu, Jan 31, 2013 at 11:07 PM, Syed Ahsan Ali Bokhari
<ahsan.pmd@gmail.com> wrote:
> The system is RHEL5.3 x86_64
>
> folloing commands were used
>
> tar xzf gcc-4.7.2.tar.gz
>
> cd gcc-4.7.2
>
> ./contrib/download_prerequisites
>
> cd ..
>
> mkdir objdir
>
> cd objdir
>
> $PWD/../gcc-4.7.2/configure
>
> What is the package name for 32 bit c library.
> I cannot disable multilib becase shared libraries support is required

Multilib and shared libraries are two different things.  In GCC,
multilib means building additional libraries for specific compilation
parameters.  In this case, building 32-bit libraries even though you
have a 64-bit system.  The 32-bit libraries are required if you want
to be able to compile and link with the -m32 option.  If you never
want to use the -m32 option, then you could configure with
--disable-multilib.

I'm no expert on RHEL, but I think the 32-bit libraries are going to
be something like glibc-NNNN.i686 and glibc-devel-NNNN.i686.  The NNNN
should be the same as the glibc RPM's you have installed already.

Ian



More information about the Gcc-help mailing list