Re: Can't I build gcc with multilib support?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 23 Sept 2022 at 02:36, alexandre schenberg via Gcc-help
<gcc-help@xxxxxxxxxxx> wrote:
>
> Hi. I am facing a series of error messages when trying to build it with multilib.
>
> /usr/bin/ld: skipping incompatible /media/34GB/Arquivos-de-Programas-Linux/Gcc-4.9.4/lib32//libgcc_s.so when searching for -lgcc_s
> /usr/bin/ld: skipping incompatible /media/34GB/Arquivos-de-Programas-Linux/Gcc-4.9.4/lib32//libgcc_s.so when searching for -lgcc_s
> checking for default BUILD_CONFIG... bootstrap-debug
> checking for --enable-vtable-verify... no
> /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/libgcc.a when searching for -lgcc
> /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/libgcc.a when searching for -lgcc
> /usr/bin/ld: cannot find -lgcc
> collect2: ld returned 1 exit status
> configure: error: I suspect your system does not have 32-bit developement libraries (libc and headers). If you have them, rerun configure with --enable-multilib. If you do not have them, and want to build a 64-bit-only compiler, rerun configure with --disable-multilib.
>
> This trying to run configure with:
>
> LDFLAGS=-L/media/34GB/Arquivos-de-Programas-Linux/Gcc-4.9.4/lib32/ ../configure --prefix=/media/34GB/Arquivos-de-Programas-Linux/Gcc-4.9.4 --disable-checking --enable-languages=c,c++ --enable-multiarch --enable-multlib --with-multilib-list=m32,m64 --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
>
> If I remove the LDFLAGS above I receive:
>
> /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/libgcc.a when searching for -lgcc
> /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/libgcc.a when searching for -lgcc
> /usr/bin/ld: cannot find -lgcc
> collect2: ld returned 1 exit status
> configure: error: I suspect your system does not have 32-bit developement libraries (libc and headers). If you have them, rerun configure with --enable-multilib. If you do not have them, and want to build a 64-bit-only compiler, rerun configure with --disable-multilib.
>
> I have Gcc 4.9.4 installed in the dir mentioned above, but have a symbolic link to it on /usr/local/bin and a sym link to libstdc++.so.6.0.20 on /usr/lib32. I removed the system provided Gcc 4.4.3, but apparently it left behind libgcc.a and other stuff. No idea about why it is complaining about incompatible libgcc_s.so.
>
> So, what needs to be done to fix it?

I'm not really sure what exactly you're doing. Which version of GCC
are you trying to build, 4.9.4? I thought you said you already have
that installed?

If you already have a multilib GCC installed correctly, it should be
able to find its own libgcc.a and libgcc_so.so without any LDFLAGS.

If you aren't using GCC 4.4.3 to build, ld should not be looking in
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/ at all.

So I would recheck your assumptions, something seems strange here.

Why not just reinstall the system provided 4.4.3 and use that to build?




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux