From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: alexandre schenberg <ale.schenberg@yandex.com>
Cc: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: Can't I build gcc with multilib support?
Date: Sat, 24 Sep 2022 11:18:20 +0100 [thread overview]
Message-ID: <CAH6eHdTcPQEgqNPNhKBpwuDNv=Hhk=G7L2uLdm1nv387UjxYWA@mail.gmail.com> (raw)
In-Reply-To: <498751663981402@m5q2bgqovkelfrov.myt.yp-c.yandex.net>
[-- Attachment #1: Type: text/plain, Size: 2363 bytes --]
On Sat, 24 Sep 2022, 02:03 alexandre schenberg, <ale.schenberg@yandex.com>
wrote:
> Yes, I am trying to build 4.9.4, again. I built it first with multilib
> support (probably with the help of 32bit libraries installed through the
> package manager).
>
Firstly, why do you even want such an ancient version?
> However when I try to run any c++ 32bit program (c programs works fine),
> it ends with segmentation fault. I believe that is due to a conflict
> between the 4.9.4 gcc/g++ and libstdc++.so.6.0.20 with the old libraries
> from gcc 4.4.3 on /usr/lib/...
>
Secondly, have you tried to debug it? It seems like you're making a guess
and then doing a lot of (maybe unnecessary) work based on that guess.
It should not be possible for any conflict between libstdc++ versions to
cause **any** C++ program to crash. Something is very wrong, you should
figure out what it is, not just install things and remove the system
compiler based on hunches and hope.
> Finally, I am not sure that only reinstall gcc 4.4.3 would solve it.
> Reinstall ia32 libs might do it, but first I have a few things to try.
>
> To check Gcc configure.ac and look for the above error messages. Plus, I
> might created a backup copy of /usr/lib/gcc/x86_64-linux-gnu/4.4.3/ and
> replace it with /usr/lib/gcc/x86_64-linux-gnu/4.9.4.
I don't think that will help. Your GCC 4.9.4 isn't going to just start
looking in random directories. It knows where to find its libraries already.
If that works, I won't even need to do a system wide 4.9.4 install, neither
> reinstall anything from the package manager (that I would have to uninstall
> again latter)
>
Installing and reinstalling some packages doesn't seem so hard. I would go
back to a known-good state using packages from the package manager, then
start from scratch.
If you won't do that, I would figure out why the libraries in
/usr/libx86_64-linux-gnu/4.4.3 are even being considered by the linker.
That's not a standard system path, so GCC 4.9.4 should not be looking in
there.
Compile with -v and -Wl,v -Wl,t to see wht paths are being passed to the
linker, and which files the linker is looking at. Try that when compiling a
C program, and when compiling a C++ program. Check that the 'gcc' nd 'g++'
binaries are consistent. It sounds to me like you might have created some
kind of hybrid of GCC 4.4.2 and 4.9.4!
next prev parent reply other threads:[~2022-09-24 10:18 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
2022-09-24 1:03 ` alexandre schenberg
2022-09-24 10:18 ` Jonathan Wakely [this message]
2022-09-24 10:19 ` Can't " 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='CAH6eHdTcPQEgqNPNhKBpwuDNv=Hhk=G7L2uLdm1nv387UjxYWA@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).