From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by sourceware.org (Postfix) with ESMTPS id 9976D3858D28 for ; Thu, 2 Dec 2021 09:20:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9976D3858D28 Received: by mail-ed1-x52d.google.com with SMTP id e3so113340839edu.4 for ; Thu, 02 Dec 2021 01:20:19 -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=9nMcmFBV4zqSyBsRAJXz/XnvLBrEFJRv2yFDBQHiZHc=; b=EFU6AeHhXop/xPkg63MWUpi8tCKPS1ij2r7qeDq3wWvf88vL3xE5t13flS79nvQlpC mCcUDxd5SLhhihG9OUrfQXNrWrEz/6nGnM2fYI0AAQjP03ouFaF+LGD1f3f2ocQNvNGp YHnftXDKUyPpsF06b3MVdH/RF5m8taDazfvk1kX5dyumANJJ+cisUSKlZFy27aXoNMuG RJLFEXnp4GMHKdfVSgdf+SuL3tfOqsZGXmC8i3N9LsWEiXB96ky/ehGexcllb/kt460h 2Ymce/7CQu4VGx2nV4rDvJes4YekFoS3Q9OS6rCTQIaejNkxshn1Um6ucwXoPnWjq6WZ J2qA== X-Gm-Message-State: AOAM532cXA7mrIvdD4VkG/uwzZNVZ4wJjagUlVQtP9ARgKpssLRsr342 1dm5kgrMbtMeiFHValSh4hT60d1ltdfBPyOZsSPW6Aw+o3Y= X-Google-Smtp-Source: ABdhPJy7TBUyCRdUJcZWWLTLgP4IkTPGjP06/a1FUTAG4YKMSerglOr+eXyNBDceBKRPTTGwONaB5t9XD/xA/yiTbAI= X-Received: by 2002:a05:6402:4c4:: with SMTP id n4mr16756436edw.30.1638436818544; Thu, 02 Dec 2021 01:20:18 -0800 (PST) MIME-Version: 1.0 References: <02bd01d7e51b$3abf6b20$b03e4160$@franke.ms> <9VZBa3MyrFzUObuozFYwjOZXPHDQw0ZJr-_NUah9O8ni49Zfx48rRhGh8i_mhlHQegO51-9DiojH4onhYtqsYEc-_gQz8O73M2TLb7rRuMI=@protonmail.com> In-Reply-To: <9VZBa3MyrFzUObuozFYwjOZXPHDQw0ZJr-_NUah9O8ni49Zfx48rRhGh8i_mhlHQegO51-9DiojH4onhYtqsYEc-_gQz8O73M2TLb7rRuMI=@protonmail.com> From: Stefan Ring Date: Thu, 2 Dec 2021 10:20:07 +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=-1.0 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 09:20:21 -0000 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 to = compile and I am out of ideas as to why libgcc is not picking up the enviro= nment variables, I decided to share the chroot I am trying to build from. > > The file can be found here: https://mega.nz/file/qqBB2QKZ#mQVV3Vqyre6MYtd= GJlx2rNq7el8Aiimr6uv4aTZR97g > > When I chroot I firstly run the command to populate the environment varia= bles: > > . /opt/webos-sdk-x86_64/1.0.g/environment-setup-armv7a-neon-webos-linux-g= nueabi > > 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-a= bi=3Dsoftfp --sysroot=3D/opt/webos-sdk-x86_64/1.0.g/sysroots/armv7a-neon-we= bos-linux-gnueabi" CXX=3D"arm-webos-linux-gnueabi-g++ -march=3Darmv7-a -mfp= u=3Dneon -mfloat-abi=3Dsoftfp --sysroot=3D/opt/webos-sdk-x86_64/1.0.g/sysro= ots/armv7a-neon-webos-linux-gnueabi" ../gcc-6.2.0/configure --prefix=3D/opt= /webos-sdk-x86_64/1.0.g/sysroots/armv7a-neon-webos-linux-gnueabi --with-mpf= r=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_6= 4-linux-gnu > > make -j8 > > Right now, the folder contains a state where it fails with stdio.h no suc= h file or directory. If you skip the configure part and run make -j8 direct= ly after setting the env vars, you can see what's going on. > > I appreciate any feedback! > > Thanks I tried it and also arrived at the missing . I built a few cross-native compilers a few years ago; I will look up how I did it. But I seem to remember that you need to use --with-sysroot somewhere because the problem is that in the build process, when the newly built compiler is used to build libgcc, it does not know where to look for the platform includes. Or at least use a different environment variable for injecting the --sysroot argument. When I did it, I looked at how crosstool-ng did it by looking at its build logs and adapting them for building a native compiler. I am a bit puzzled why you are running an x86_64 toolchain inside an i686 chroot. But that is not the source of your problem, at least for now.