From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by sourceware.org (Postfix) with ESMTPS id 67CAE3858003 for ; Thu, 2 Dec 2021 21:23:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 67CAE3858003 Received: by mail-ed1-x52e.google.com with SMTP id g14so3193546edb.8 for ; Thu, 02 Dec 2021 13:23:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=tiL/Xiah18mgYHrGYo0MEJYcGIpf61FnVMKavoiLwRc=; b=HNChhW2OQdrOo6lFxCvfN9gAt6coh/aMW6hj6uLUANwmcGLqLka0hcCbY94GVYyrio UeFe7hG8eV+peEH5M9owAo6U1D4scN9RxipoP3L0cBm1wSVmI1z6jQajJHdpqLl89O8I 9GUPgAfMPpGJDlqVpJzOjWBELskfkk3cSWrDS1vDSsA3jQV+oL9TSEczUtpv6csdb6Y7 /+fabG1tnYuNjOoW2FOqRkHg9bZ4W7JAcju6K/g2cHRlM2AzkjhYM8EVhI4m2CO+n+OJ E+P/axTrQiF2W5rw7QCGJkO3WoE4UAoIpsULcURphvXFF0TWJ4Z06c7slVlLYe1waLNC L5wA== X-Gm-Message-State: AOAM531kjVefWGHQ4aaxL4jGuFNgz3t56hIYoz+xmE9zEETLY2wcosFA a55rWgOCc2P6HMwIdPDY3HKV5QsZJQi7kXEF+E8t6zUBdEMqYw== X-Google-Smtp-Source: ABdhPJzjpIJ7K+83BDkX85beu4knhH85W2LX6uKXOosHMazsKc0pTYbjrBSV+YzRkAjgHcMYPu7k/w5kfgysI1Z2VQE= X-Received: by 2002:a05:6402:40c7:: with SMTP id z7mr20868122edb.255.1638480180213; Thu, 02 Dec 2021 13:23:00 -0800 (PST) MIME-Version: 1.0 References: <02bd01d7e51b$3abf6b20$b03e4160$@franke.ms> <9VZBa3MyrFzUObuozFYwjOZXPHDQw0ZJr-_NUah9O8ni49Zfx48rRhGh8i_mhlHQegO51-9DiojH4onhYtqsYEc-_gQz8O73M2TLb7rRuMI=@protonmail.com> In-Reply-To: From: Stefan Ring Date: Thu, 2 Dec 2021 22:22:49 +0100 Message-ID: Subject: Re: Gcc build fails with test_real_width is negative To: gcc-help Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Dec 2021 21:23:06 -0000 On Thu, Dec 2, 2021 at 10:20 AM Stefan Ring wrote: > > On Mon, Nov 29, 2021 at 8:40 PM Mr Dini via Gcc-help > wrote: > > > > I am sure this is not a common practice, but since I couldn't get gcc t= o compile and I am out of ideas as to why libgcc is not picking up the envi= ronment variables, I decided to share the chroot I am trying to build from. > > > > The file can be found here: https://mega.nz/file/qqBB2QKZ#mQVV3Vqyre6MY= tdGJlx2rNq7el8Aiimr6uv4aTZR97g > > > > When I chroot I firstly run the command to populate the environment var= iables: > > > > . /opt/webos-sdk-x86_64/1.0.g/environment-setup-armv7a-neon-webos-linux= -gnueabi > > > > Then execute the following commands to start the build process: > > > > cd /root/gcc-build > > > > CC=3D"arm-webos-linux-gnueabi-gcc -march=3Darmv7-a -mfpu=3Dneon -mfloat= -abi=3Dsoftfp --sysroot=3D/opt/webos-sdk-x86_64/1.0.g/sysroots/armv7a-neon-= webos-linux-gnueabi" CXX=3D"arm-webos-linux-gnueabi-g++ -march=3Darmv7-a -m= fpu=3Dneon -mfloat-abi=3Dsoftfp --sysroot=3D/opt/webos-sdk-x86_64/1.0.g/sys= roots/armv7a-neon-webos-linux-gnueabi" ../gcc-6.2.0/configure --prefix=3D/o= pt/webos-sdk-x86_64/1.0.g/sysroots/armv7a-neon-webos-linux-gnueabi --with-m= pfr=3D/opt/webos-sdk-x86_64/1.0.g/sysroots/armv7a-neon-webos-linux-gnueabi = --host=3Darmv7a-linux-gnueabi --target=3Darmv7a-linux-gnueabi --build=3Dx86= _64-linux-gnu > > > > make -j8 > > > > Right now, the folder contains a state where it fails with stdio.h no s= uch file or directory. If you skip the configure part and run make -j8 dire= ctly after setting the env vars, you can see what's going on. > > > > I appreciate any feedback! > > > > Thanks Running the toolchain gcc with -v reveals that it was configured with --with-sysroot=3D/not/exist. ;) So I got a little creative and used: mkdir /not ln -s /opt/webos-sdk-x86_64/1.0.g/sysroots/armv7a-neon-webos-linux-gnueabi /not/exist Then I set: export PATH=3D/opt/webos-sdk-x86_64/1.0.g/sysroots/x86_64-webossdk-linux/us= r/bin/arm-webos-linux-gnueabi:$PATH and only this. Forget about all the crap in /opt/webos-sdk-x86_64/1.0.g/environment-setup-armv7a-neon-webos-linux-gnuea= bi! Then /root/gcc-6.2.0/configure --prefix=3D/opt/webos-sdk-x86_64/1.0.g/sysroots/armv7a-neon-webos-linux-gnu= eabi --build=3D --host=3Darm-webos-linux-gnueabi --target=3Darm-webos-linux-gnueabi --with-sysroot=3D/ --with-build-sysroot=3D/opt/webos-sdk-x86_64/1.0.g/sysroots/armv7a-neon-web= os-linux-gnueabi --with-float=3Dsoftfp --with-fpu=3Dneon --with-arch=3Darmv7-a --enable-languages=3Dc,c++ --disable-multilib --with-mpfr=3D/opt/webos-sdk-x86_64/1.0.g/sysroots/armv7a-neon-webos-linux-= gnueabi make -j8 gives me a working build. At least a build running to completion. If it actually works I cannot tell because I do not own the target. The --with-build-sysroot is not strictly necessary because of the /not/exist trick, but I consider it good taste. I=E2=80=99m also not sure about the --with-sysroot=3D/. It may or may not help or hurt. Also, your --prefix is probably not the best idea. Just use something short like /usr/gcc6 or similar, and install with make install DESTDIR=3D.