From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by sourceware.org (Postfix) with ESMTPS id 1D21B385740D for ; Fri, 23 Sep 2022 09:35:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1D21B385740D 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-ed1-x529.google.com with SMTP id e18so17250886edj.3 for ; Fri, 23 Sep 2022 02:35:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date; bh=Sn3LQ9yGmTKik8hd/XIwsin+Yntcix1+ryDn6EZmf2A=; b=bftCcoP4j23+g6rzEdTkl/CLuz3uPisxCK/+G2frH6zhnLj5Qf6yjQk4ZxdYYd59tE CCUfn6TkmRngb4WmxF0QFK971iRCAsfb/gndT1arfh8dfsa+50rkIfWRqiYJWXzaVOiE NUqbTh/IzEmHbwo9Ihei4Wjoqjpypk7VXGhNxxP3DK9n5vjH2KYvklEMcydz50P4CYBE Hw5noOsy9pCOFLqqA6/Flk70/wkNyB3HzNXMQCW0HRpt9pY545LrGWaF6dbkqNF+VAF6 U1FjqIPvkkxIF7AP3f558BYX4DKj+Dwb3r7TblZujTdJpjNbc29ptsVyragolsq4J0RS vmLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date; bh=Sn3LQ9yGmTKik8hd/XIwsin+Yntcix1+ryDn6EZmf2A=; b=uD8XYJayqW2URyLNUYbyr3y8vS3HLfmVf0l/q/LNGv5OSmy/Ha7PAyPWkUk4vjUcl2 G/vtJnpzueR4bZyTt67oEyTsyWVKphEgEmsDgkrXiW50c3mu8UQk4KFWLahxCfSR2EHU pLvPoDEAYcVV3tzVLejrGu50PjMsaf21U8XJRKIypxTwAPGJMDlzUyja8xoOBNFTrbCU TvN4lBxWzEZfiLTobedeJRlQE/bdb7RKtfEtqaQTWvyV+3iWkXBidjZvt0jQwZSMem7w EScqpYejTmMGPOepB0SQsM6FKPJz7tOAZZzLqr1bhUT+EZtDHsHlmnxQyhB5sprP21v+ u5iw== X-Gm-Message-State: ACrzQf1k5DCl7Ct15KZ5Cyuav8LDZUFAWnqIozkw9DSluCIudsnt96UY t44sBKInbgkCdHTQJnjRrhF5wvHZS4PSfsrHgI4= X-Google-Smtp-Source: AMsMyM4/uEbGUlRkIWY/tW6v11MXV7JvWaRPBenuqcunTlCS/wjPkP9o02hWsyM5M71LcBHpdn3yWOSUSobnQ3QPOBA= X-Received: by 2002:a05:6402:2693:b0:450:a807:6c91 with SMTP id w19-20020a056402269300b00450a8076c91mr7539246edd.33.1663925751383; Fri, 23 Sep 2022 02:35:51 -0700 (PDT) MIME-Version: 1.0 References: <5696641663896903@2ifjmylsx37py6nh.sas.yp-c.yandex.net> In-Reply-To: <5696641663896903@2ifjmylsx37py6nh.sas.yp-c.yandex.net> From: Jonathan Wakely Date: Fri, 23 Sep 2022 10:35:40 +0100 Message-ID: Subject: Re: Can't I build gcc with multilib support? To: alexandre schenberg Cc: gcc-help@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,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: On Fri, 23 Sept 2022 at 02:36, alexandre schenberg via Gcc-help wrote: > > Hi. I am facing a series of error messages when trying to build it with m= ultilib. > > /usr/bin/ld: skipping incompatible /media/34GB/Arquivos-de-Programas-Linu= x/Gcc-4.9.4/lib32//libgcc_s.so when searching for -lgcc_s > /usr/bin/ld: skipping incompatible /media/34GB/Arquivos-de-Programas-Linu= x/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/li= bgcc.a when searching for -lgcc > /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/li= bgcc.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 --ena= ble-multilib. If you do not have them, and want to build a 64-bit-only comp= iler, rerun configure with --disable-multilib. > > This trying to run configure with: > > LDFLAGS=3D-L/media/34GB/Arquivos-de-Programas-Linux/Gcc-4.9.4/lib32/ ../c= onfigure --prefix=3D/media/34GB/Arquivos-de-Programas-Linux/Gcc-4.9.4 --dis= able-checking --enable-languages=3Dc,c++ --enable-multiarch --enable-multli= b --with-multilib-list=3Dm32,m64 --build=3Dx86_64-linux-gnu --host=3Dx86_64= -linux-gnu --target=3Dx86_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/li= bgcc.a when searching for -lgcc > /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/li= bgcc.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 --ena= ble-multilib. If you do not have them, and want to build a 64-bit-only comp= iler, rerun configure with --disable-multilib. > > I have Gcc 4.9.4 installed in the dir mentioned above, but have a symboli= c link to it on /usr/local/bin and a sym link to libstdc++.so.6.0.20 on /us= r/lib32. I removed the system provided Gcc 4.4.3, but apparently it left be= hind libgcc.a and other stuff. No idea about why it is complaining about in= compatible 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?