Message ID | 20220204164748.315559-1-michael.tremer@ipfire.org |
---|---|
State | Accepted |
Commit | 7c6bf38c05fb9ccf0d8d4e34f3448575f2b82899 |
Headers |
Return-Path: <development-bounces@lists.ipfire.org> Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4Jr1gL6zJkz3wsl for <patchwork@web04.haj.ipfire.org>; Fri, 4 Feb 2022 16:47:58 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4Jr1gK1lrNz4YJ; Fri, 4 Feb 2022 16:47:57 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Jr1gJ6zN8z323f; Fri, 4 Feb 2022 16:47:56 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Jr1gH4gy8z2xK9 for <development@lists.ipfire.org>; Fri, 4 Feb 2022 16:47:55 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4Jr1gG6pt3z80; Fri, 4 Feb 2022 16:47:54 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1643993275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=GDkjABpCJScp95pF1GxjnK/BmbI+0My58MkMDbpNAW0=; b=WM/7cuaS+j2iihBN/IMlf7x7nV5oChs7jUV28CMccCDAI2RrCpIV0AY80HmB0xis8914cR kIsGURtpaYEJtWAA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1643993275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=GDkjABpCJScp95pF1GxjnK/BmbI+0My58MkMDbpNAW0=; b=SiXL+vO3KRbFiIgWQHgBUDTk4TBuYBsjvCWOrZeWfBbfLDyEFXzvKwy8Alr4BZWLADJ1QY 2D3C7PuKZctrTEXOk3hXgrTyCMvY2kigTk+vr6MfXT0YeOq22L319tDD6WKQgdxdF+/yjc rm+v2W8RfPFBTTqlKmZIeq/cEo4ObvpoFk+OmdTRnQiaFiBQa33zUm8ixZc1lR4nCo+XJB VFik93wohMeJzW0X7I7z6L/ly2iQJmeDCCD3e9qS0lGRd2mxtaBIX282o1V0LmtQqDNrXa bja3Ul3ZDOc+BtJklLVZwuOhpBmC6HH9+1M0qB7pVcht/okodSYyE8WNU1c2Ew== From: Michael Tremer <michael.tremer@ipfire.org> To: development@lists.ipfire.org Subject: [PATCH 01/28] gcc: toolchain stage 2: Set sysroot to /tools_${arch} Date: Fri, 4 Feb 2022 16:47:21 +0000 Message-Id: <20220204164748.315559-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk <development.lists.ipfire.org> List-Unsubscribe: <https://lists.ipfire.org/mailman/options/development>, <mailto:development-request@lists.ipfire.org?subject=unsubscribe> List-Archive: <http://lists.ipfire.org/pipermail/development/> List-Post: <mailto:development@lists.ipfire.org> List-Help: <mailto:development-request@lists.ipfire.org?subject=help> List-Subscribe: <https://lists.ipfire.org/mailman/listinfo/development>, <mailto:development-request@lists.ipfire.org?subject=subscribe> Cc: Michael Tremer <michael.tremer@ipfire.org> Errors-To: development-bounces@lists.ipfire.org Sender: "Development" <development-bounces@lists.ipfire.org> |
Series |
[01/28] gcc: toolchain stage 2: Set sysroot to /tools_${arch}
|
|
Commit Message
Michael Tremer
Feb. 4, 2022, 4:47 p.m. UTC
The stage 2 compiler was looking for libraries outside the bootstrapped
toolchain environment which causes that linked programs cannot be
executied because the runtime linker only looks for libraries inside the
toolchain environment.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
lfs/gcc | 1 +
1 file changed, 1 insertion(+)
Comments
Hello Michael, trying to compile the new toolchain on my workstation (running openSUSE Leap 15.3, kernel 5.3.18-150300.59.43-default, GCC 11 installed), gcc fails to build: > Checking for necessary space on disk [ DONE ] > chroot: failed to run command 'env': No such file or directory > Toolchain compilation (x86_64) > stage1 [ DONE ] > binutils (2.37) PASS=1[ 37 ][ DONE ] > gcc (11.1.0) PASS=1[ 4:52 ][ FAIL ] > > checking for sys/auxv.h... no > checking for sys/mman.h... no > checking for grep that handles long lines and -e... /bin/grep > checking for egrep... /bin/grep -E > checking for ANSI C header files... no > checking whether decimal floating point is supported... no > checking whether fixed-point is supported... no > checking whether the compiler is configured for setjmp/longjmp exceptions... no > checking for CET support... yes > checking if the linker (/home/pmu/IPFire-development/ipfire-2.x/build/usr/src/gcc-build/./gcc/collect-ld) is GNU ld... yes > checking for thread model used by GCC... single > checking whether assembler supports CFI directives... yes > checking for target glibc version... 2.11 > 2.11 > checking for __attribute__((visibility("hidden")))... yes > checking for .cfi_sections .debug_frame... yes > checking whether the target assembler supports thread-local storage... yes > checking whether the thread-local storage support is from emutls... no > checking if the assembler supports AVX... yes > checking for init priority support... yes > configure: updating cache ./config.cache > configure: creating ./config.status > config.status: creating Makefile > config.status: creating auto-target.h > config.status: executing default commands > /home/pmu/IPFire-development/ipfire-2.x/build/usr/src/gcc-11.1.0/libgcc/../config-ml.in: line 133: enable_libstdc++_v3=no: command not found > make[2]: Leaving directory '/home/pmu/IPFire-development/ipfire-2.x/build/usr/src/gcc-build' > make[1]: *** [Makefile:947: all] Error 2 > make[1]: Leaving directory '/home/pmu/IPFire-development/ipfire-2.x/build/usr/src/gcc-build' > make: *** [gcc:251: /home/pmu/IPFire-development/ipfire-2.x/log/gcc-11.1.0-tools1] Error 2 > > ERROR: Building gcc PASS=1 [ FAIL ] > Check /home/pmu/IPFire-development/ipfire-2.x/log/_build.toolchain.log for errors if applicable [ FAIL ] In the logs, I also noticed this: > make[4]: Entering directory '/home/pmu/IPFire-development/ipfire-2.x/build/usr/src/gcc-build/libcc1' > /bin/sh ./libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I/home/pmu/IPFire-development/ipfire-2.x/build/usr/src/gcc-11.1.0/libcc1 -I /home/pmu/IPFire-development/ipfire-2.x/build/usr/src/gcc-11.1.0/libcc1/.. > /include -I /home/pmu/IPFire-development/ipfire-2.x/build/usr/src/gcc-11.1.0/libcc1/../libgcc -I ../gcc -I/home/pmu/IPFire-development/ipfire-2.x/build/usr/src/gcc-11.1.0/libcc1/../gcc -I/home/pmu/IPFire-developme > nt/ipfire-2.x/build/usr/src/gcc-build/./gmp -I/home/pmu/IPFire-development/ipfire-2.x/build/usr/src/gcc-11.1.0/gmp -I/home/pmu/IPFire-development/ipfire-2.x/build/usr/src/gcc-build/./mpfr/src -I/home/pmu/IPFire-dev > elopment/ipfire-2.x/build/usr/src/gcc-11.1.0/mpfr/src -I/home/pmu/IPFire-development/ipfire-2.x/build/usr/src/gcc-11.1.0/mpc/src -W -Wall -fvisibility=hidden -fcf-protection -O2 -pipe -Wall -fPIC -m64 -MT findcomp.lo -MD -MP - > MF .deps/findcomp.Tpo -c -o findcomp.lo /home/pmu/IPFire-development/ipfire-2.x/build/usr/src/gcc-11.1.0/libcc1/findcomp.cc > libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/home/pmu/IPFire-development/ipfire-2.x/build/usr/src/gcc-11.1.0/libcc1 -I /home/pmu/IPFire-development/ipfire-2.x/build/usr/src/gcc-11.1.0/libcc1/../include -I /home/fluke/deve > l/IPFire-development/ipfire-2.x/build/usr/src/gcc-11.1.0/libcc1/../libgcc -I ../gcc -I/home/pmu/IPFire-development/ipfire-2.x/build/usr/src/gcc-11.1.0/libcc1/../gcc -I/home/pmu/IPFire-development/ipfire-2.x/build/usr/src/g > cc-build/./gmp -I/home/pmu/IPFire-development/ipfire-2.x/build/usr/src/gcc-11.1.0/gmp -I/home/pmu/IPFire-development/ipfire-2.x/build/usr/src/gcc-build/./mpfr/src -I/home/pmu/IPFire-development/ipfire-2.x/build/usr > /src/gcc-11.1.0/mpfr/src -I/home/pmu/IPFire-development/ipfire-2.x/build/usr/src/gcc-11.1.0/mpc/src -W -Wall -fvisibility=hidden -fcf-protection -O2 -pipe -Wall -fPIC -m64 -MT findcomp.lo -MD -MP -MF .deps/findcomp.Tpo -c /home/fl > uke/devel/IPFire-development/ipfire-2.x/build/usr/src/gcc-11.1.0/libcc1/findcomp.cc -fPIC -DPIC -o .libs/findcomp.o > g++: error: unrecognized command line option '-fcf-protection'; did you mean '-fstack-protector'? > make[4]: *** [Makefile:604: findcomp.lo] Error 1 > make[4]: Leaving directory '/home/pmu/IPFire-development/ipfire-2.x/build/usr/src/gcc-build/libcc1' > make[3]: *** [Makefile:441: all] Error 2 > make[3]: Leaving directory '/home/pmu/IPFire-development/ipfire-2.x/build/usr/src/gcc-build/libcc1' > make[2]: *** [Makefile:12396: all-libcc1] Error 2 > make[2]: *** Waiting for unfinished jobs.... This leaves me a bit puzzled, as I thought "-fcf-protection" used to work before. What am I doing wrong? :-) Thanks, and best regards, Peter Müller
Hello Michael, oh well. :-( openSuSE Leap 15.3 ships GCC 7 by default, and while I installed GCC 11, stupid me forgot to change _another_ symlink which still pointed to the GCC 7 binary. Please excuse the noise. Thanks, and best regards, Peter Müller
Hello, This is exactly why we are pre-building the toolchain. Not only to save time, but because it is quite fragile. I built this for all architectures on Debian 11 and this worked fine. I am very surprised to say this, but Debian seems to be really up to date :) I would totally recommend changing your distribution. -Michael > On 6 Feb 2022, at 10:39, Peter Müller <peter.mueller@ipfire.org> wrote: > > Hello Michael, > > oh well. :-( > > openSuSE Leap 15.3 ships GCC 7 by default, and while I installed GCC 11, stupid me > forgot to change _another_ symlink which still pointed to the GCC 7 binary. > > Please excuse the noise. > > Thanks, and best regards, > Peter Müller
diff --git a/lfs/gcc b/lfs/gcc index ade02dcda..96e58ddae 100644 --- a/lfs/gcc +++ b/lfs/gcc @@ -116,6 +116,7 @@ ifeq "$(PASS)" "2" EXTRA_CONFIG = \ --build=$(BUILDTARGET) \ --prefix=$(TOOLS_DIR) \ + --with-sysroot=$(ROOT) \ --with-local-prefix=$(TOOLS_DIR) \ --with-native-system-header-dir=$(TOOLS_DIR)/include \ --enable-languages=c,c++ \