On Sat, 24 Sep 2022, 02:03 alexandre schenberg, <ale.schenberg@xxxxxxxxxx> 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!