From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by sourceware.org (Postfix) with ESMTPS id 890743858D3C for ; Sat, 24 Sep 2022 10:18:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 890743858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x631.google.com with SMTP id r18so5138819eja.11 for ; Sat, 24 Sep 2022 03:18:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=NMlIwpWUWwbyCr4ic+b0X80GHZPwcL4zoeyrFi/aq3o=; b=dZqjRWiDazyyCVvbAJq1ch+2fwOgNFJvKkUDOsNbpgqlvNgnNED5kkVW22dDrd2POz wZ9fnXD2dO47e6tJh81CbKB0GLxrVF4OAwLyEmi/XkduTCGvobIRV4Ze3ijWfcCAXYYX YOiZRjBJ7iKFIS0kuBtebjFKeAdnLTRbuddakmraFyBekeuutyvbh+OnynMBywyXfdCu nie3NpJYUOkfbKdrx/5zHNbhKtfXpqHg0k9Ns7HCjjcHed3XEkrLhxB44sNSFREm2ZlQ mMp2Tjob77iO0uamlYUH7Je0vdijhzKiSAsXIlC6WtNcHLHX14hgnddNXVT+lPfFqgN3 IoSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=NMlIwpWUWwbyCr4ic+b0X80GHZPwcL4zoeyrFi/aq3o=; b=HFrbTHK/4AYvqNOchhjbdxKaEMeAvPY4rkRRX8YXVPcov1TuUoAZJZQNTvi4eR2DBS Czx/oU6wjEIOiRDB7aQaBnXXx+dQTNEFQYVDuTIIKZLEE7kHBzhNlxD1OMggaaFwL1ZP V7YFdH707HRf0+0tgHhfEO8NXc0uJihhgUq+QL16k1S8cf9ugh9Vl7MaDPso2TemZmI4 zIiQpDJQU+/HDKDjJxxCKYRVA0SoSe6TbEikq14EuOo2C8doO2ulRmk3cz3AHolRhMje bLliQqjyS4Yf++qJQZ6IZUjrQ9JFTN9iUfkIf0Cn2AtYsIGuIxo4lrFukFsbM+Mk0Yhu 0EoA== X-Gm-Message-State: ACrzQf19tu3x2CneKvV2Nksu4o9PgPtIoXBDxNh3Cela+fMr3wApCGRM xa1PwpYu+1QLknzI3qzsrKAdsv/JQx4woQ0fI1s= X-Google-Smtp-Source: AMsMyM5xd7EDxPEWmHUOd7ULEX/pJjB9Vy5uELh+yWu3edd5i7AvQxnoY4wiek6rG1oqPDgpFTUkwIyD+6eM8VXqurY= X-Received: by 2002:a17:906:fd8a:b0:75d:c79a:47c8 with SMTP id xa10-20020a170906fd8a00b0075dc79a47c8mr10235099ejb.389.1664014711797; Sat, 24 Sep 2022 03:18:31 -0700 (PDT) MIME-Version: 1.0 References: <5696641663896903@2ifjmylsx37py6nh.sas.yp-c.yandex.net> <498751663981402@m5q2bgqovkelfrov.myt.yp-c.yandex.net> In-Reply-To: <498751663981402@m5q2bgqovkelfrov.myt.yp-c.yandex.net> From: Jonathan Wakely Date: Sat, 24 Sep 2022 11:18:20 +0100 Message-ID: Subject: Re: Can't I build gcc with multilib support? To: alexandre schenberg Cc: gcc-help Content-Type: multipart/alternative; boundary="000000000000cc3bf105e9699d5b" X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,NUMERIC_HTTP_ADDR,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --000000000000cc3bf105e9699d5b Content-Type: text/plain; charset="UTF-8" On Sat, 24 Sep 2022, 02:03 alexandre schenberg, 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! --000000000000cc3bf105e9699d5b--