public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: alexandre schenberg <ale.schenberg@yandex.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Can't I build gcc with multilib support?
Date: Fri, 23 Sep 2022 10:35:40 +0100	[thread overview]
Message-ID: <CAH6eHdTZTjGkHY9ae3ax=5c6XiTwX2XFUy-8HffSwOL_MYdoKg@mail.gmail.com> (raw)
In-Reply-To: <5696641663896903@2ifjmylsx37py6nh.sas.yp-c.yandex.net>

On Fri, 23 Sept 2022 at 02:36, alexandre schenberg via Gcc-help
<gcc-help@gcc.gnu.org> 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?

  reply	other threads:[~2022-09-23  9:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-23  1:35 alexandre schenberg
2022-09-23  9:35 ` Jonathan Wakely [this message]
2022-09-24  1:03   ` alexandre schenberg
2022-09-24 10:18     ` Can't " Jonathan Wakely
2022-09-24 10:19       ` Jonathan Wakely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH6eHdTZTjGkHY9ae3ax=5c6XiTwX2XFUy-8HffSwOL_MYdoKg@mail.gmail.com' \
    --to=jwakely.gcc@gmail.com \
    --cc=ale.schenberg@yandex.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).