Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Not completed in Arch Linux #1932

Closed
MOHAMED19OS opened this issue Mar 29, 2023 · 7 comments
Closed

Build Not completed in Arch Linux #1932

MOHAMED19OS opened this issue Mar 29, 2023 · 7 comments

Comments

@MOHAMED19OS
Copy link

  • crosstool-NG version: the lest in GitHub
  • host OS and its version:
    OS: Arch Linux x86_64
    Kernel: 6.2.8
    DE: Plasma 5.27.3
  • any test for build stop

[INFO ] Performing some trivial sanity checks [WARN ] Number of open files 1024 may not be sufficient to build the toolchain; increasing to 2048 [INFO ] Build started 20230329.050451 [INFO ] Building environment variables [WARN ] Directory '/home/mohamed/src' does not exist. [WARN ] Will not save downloaded tarballs to local storage. [EXTRA] Preparing working directories [EXTRA] Installing user-supplied crosstool-NG configuration [EXTRA] ================================================================= [EXTRA] Dumping internal crosstool-NG configuration [EXTRA] Building a toolchain for: [EXTRA] build = x86_64-pc-linux-gnu [EXTRA] host = x86_64-pc-linux-gnu [EXTRA] target = armv7-vuduo4k-linux-gnueabihf [EXTRA] Dumping internal crosstool-NG configuration: done in 0.07s (at 00:02) [INFO ] ================================================================= [INFO ] Retrieving needed toolchain components' tarballs [EXTRA] Retrieving 'linux-6.1.13' [EXTRA] Verifying SHA512 checksum for 'linux-6.1.13.tar.xz' [EXTRA] Retrieving 'zlib-1.2.13' [EXTRA] Verifying SHA512 checksum for 'zlib-1.2.13.tar.xz' [EXTRA] Retrieving 'zstd-1.5.2' [EXTRA] Verifying SHA512 checksum for 'zstd-1.5.2.tar.gz' [EXTRA] Retrieving 'gmp-6.2.1' [EXTRA] Verifying SHA512 checksum for 'gmp-6.2.1.tar.xz' [EXTRA] Retrieving 'mpfr-4.1.0' [EXTRA] Verifying SHA512 checksum for 'mpfr-4.1.0.tar.xz' [EXTRA] Retrieving 'isl-0.25' [EXTRA] Verifying SHA512 checksum for 'isl-0.25.tar.xz' [EXTRA] Retrieving 'mpc-1.2.1' [EXTRA] Verifying SHA512 checksum for 'mpc-1.2.1.tar.gz' [EXTRA] Retrieving 'ncurses-6.2' [EXTRA] Verifying SHA512 checksum for 'ncurses-6.2.tar.gz' [EXTRA] Retrieving 'libiconv-1.16' [EXTRA] Verifying SHA512 checksum for 'libiconv-1.16.tar.gz' [EXTRA] Retrieving 'gettext-0.21' [EXTRA] Verifying SHA512 checksum for 'gettext-0.21.tar.xz' [EXTRA] Retrieving 'binutils-2.40' [EXTRA] Verifying SHA512 checksum for 'binutils-2.40.tar.xz' [EXTRA] Retrieving 'gcc-12.2.0' [EXTRA] Verifying SHA512 checksum for 'gcc-12.2.0.tar.xz' [EXTRA] Retrieving 'glibc-2.25' [EXTRA] Verifying SHA512 checksum for 'glibc-2.25.tar.xz' [INFO ] Retrieving needed toolchain components' tarballs: done in 186.81s (at 03:09) [INFO ] ================================================================= [INFO ] Extracting and patching toolchain components [EXTRA] Extracting linux-6.1.13 [EXTRA] Patching linux-6.1.13 [EXTRA] Extracting zlib-1.2.13 [EXTRA] Patching zlib-1.2.13 [EXTRA] Extracting zstd-1.5.2 [EXTRA] Patching zstd-1.5.2 [EXTRA] Extracting gmp-6.2.1 [EXTRA] Patching gmp-6.2.1 [EXTRA] Extracting mpfr-4.1.0 [EXTRA] Patching mpfr-4.1.0 [EXTRA] Extracting isl-0.25 [EXTRA] Patching isl-0.25 [EXTRA] Extracting mpc-1.2.1 [EXTRA] Patching mpc-1.2.1 [EXTRA] Extracting ncurses-6.2 [EXTRA] Patching ncurses-6.2 [EXTRA] Extracting libiconv-1.16 [EXTRA] Patching libiconv-1.16 [EXTRA] Extracting gettext-0.21 [EXTRA] Patching gettext-0.21 [EXTRA] Extracting binutils-2.40 [EXTRA] Patching binutils-2.40 [EXTRA] Extracting gcc-12.2.0 [EXTRA] Patching gcc-12.2.0 [EXTRA] Extracting glibc-2.25 [EXTRA] Patching glibc-2.25 [INFO ] Extracting and patching toolchain components: done in 65.96s (at 04:15) [INFO ] ================================================================= [INFO ] Installing ncurses for build [EXTRA] Configuring ncurses [EXTRA] Building ncurses [EXTRA] Installing ncurses [INFO ] Installing ncurses for build: done in 25.08s (at 04:40) [INFO ] ================================================================= [INFO ] Installing zlib for host [EXTRA] Configuring zlib [EXTRA] Building zlib [EXTRA] Installing zlib [INFO ] Installing zlib for host: done in 2.17s (at 04:42) [INFO ] ================================================================= [INFO ] Installing zstd for host [EXTRA] Building zstd [EXTRA] Installing zstd [INFO ] Installing zstd for host: done in 9.03s (at 04:51) [INFO ] ================================================================= [INFO ] Installing GMP for host [EXTRA] Configuring GMP [EXTRA] Building GMP [EXTRA] Installing GMP [INFO ] Installing GMP for host: done in 35.06s (at 05:26) [INFO ] ================================================================= [INFO ] Installing MPFR for host [EXTRA] Configuring MPFR [EXTRA] Building MPFR [EXTRA] Installing MPFR [INFO ] Installing MPFR for host: done in 16.72s (at 05:43) [INFO ] ================================================================= [INFO ] Installing ISL for host [EXTRA] Configuring ISL [EXTRA] Building ISL [EXTRA] Installing ISL [INFO ] Installing ISL for host: done in 25.41s (at 06:08) [INFO ] ================================================================= [INFO ] Installing MPC for host [EXTRA] Configuring MPC [EXTRA] Building MPC [EXTRA] Installing MPC [INFO ] Installing MPC for host: done in 8.23s (at 06:17) [INFO ] ================================================================= [INFO ] Installing ncurses for host [EXTRA] Configuring ncurses [EXTRA] Building ncurses [EXTRA] Installing ncurses [INFO ] Installing ncurses for host: done in 23.74s (at 06:40) [INFO ] ================================================================= [INFO ] Installing libiconv for host [EXTRA] Skipping (included in GNU C library) [INFO ] Installing libiconv for host: done in 0.04s (at 06:41) [INFO ] ================================================================= [INFO ] Installing gettext for host [EXTRA] Skipping (included in GNU C library) [INFO ] Installing gettext for host: done in 0.01s (at 06:41) [INFO ] ================================================================= [INFO ] Installing binutils for host [EXTRA] Configuring binutils [EXTRA] Building binutils [EXTRA] Installing binutils [EXTRA] Installing ld wrapper [INFO ] Installing binutils for host: done in 130.06s (at 08:51) [INFO ] ================================================================= [INFO ] Installing kernel headers [EXTRA] Installing kernel headers [INFO ] Installing kernel headers: done in 15.82s (at 09:06) [INFO ] ================================================================= [INFO ] Installing core C gcc compiler [EXTRA] Configuring core C gcc compiler [EXTRA] Building gcc [EXTRA] Installing gcc [EXTRA] Housekeeping for core gcc compiler [EXTRA] '' --> lib (gcc) lib (os) [INFO ] Installing core C gcc compiler: done in 381.60s (at 15:28) [INFO ] ================================================================= [INFO ] Installing C library [INFO ] ================================================================= [INFO ] Building for multilib 1/1: '' [EXTRA] Configuring C library [EXTRA] Building C library [16:43] \

build.zip
config.zip

@cpackham
Copy link
Contributor

Hmm there's no actual error in the build.log. Did it fail or did you stop it with CTRL-C?

@MOHAMED19OS
Copy link
Author

I stop use CTRL-C

@cpackham
Copy link
Contributor

There's no failure in the build.log. It seemed to be still running when you killed it. There may just be a miss match between your expectation of how long the build should take vs the reality of how long it actually does take.

You could bump up the log level or watch the build using tail -f build.log in another shell. Just to distinguish the build locking up vs just taking a really long time.

You're not the first to report a lockup but so far on-one has been able to demonstrate one repeatably.

@staticfloat
Copy link
Contributor

staticfloat commented Apr 28, 2023

I think I can help narrow this one down. I believe the issue is make v4.4+. There appears to be an infinite loop that glibc 2.19-2.25 exhibits on make v4.4+. If you build a newer glibc (specifically, one after this change) you won't run into the hang. Equivalently, if you use make v4.3 or earlier, you won't run into the hang either. I tried to see if there is a self-contained backport possible from that change, but as far as I can tell it's just that the make graph is perturbed, masking whatever true error is occurring.

I'm not sure if ct-ng is going to be able to fix this for us, other than warning if the user provides a make version that is known to have an issue with this version of glibc.

To reproduce the error, it was sufficient for me to do the following in the glibc-2.19 checkout:

git reset --hard
rm -rf build
mkdir build
cd build
../configure --prefix=$(pwd)/prefix
make -j30 lib

If you run with make -d you can see that make gets into a loop re-executing itself while trying to remake build/bits/stdio_lim.d.

@antekone
Copy link

antekone commented Jun 7, 2023

@staticfloat thanks, I had the same issue although with glibc 2.17. Downgraded make to 4.3 and the process finished successfully.

@merlinblack
Copy link

merlinblack commented Jun 30, 2023

Seeing this exact problem too - with glibc-2.31 and make 4.4 (Fedora38), when trying to build for raspberry pi running bullseye.

cpackham added a commit to cpackham/crosstool-ng that referenced this issue Jul 15, 2023
Versions of GNU make newer than 4.4 trigger a hang in versions of glibc
older than 2.31. As distros update to the newer GNU make version we'll
start seeing more and more reports of this hang. Fortunately we already
carry GNU make as a comp tool so all we need to do is select the right
version when needed.

Fixes crosstool-ng#1946, crosstool-ng#1932, crosstool-ng#1975
Signed-off-by: Chris Packham <judge.packham@gmail.com>
cpackham added a commit that referenced this issue Jul 21, 2023
Versions of GNU make newer than 4.4 trigger a hang in versions of glibc
older than 2.31. As distros update to the newer GNU make version we'll
start seeing more and more reports of this hang. Fortunately we already
carry GNU make as a comp tool so all we need to do is select the right
version when needed.

Fixes #1946, #1932, #1975
Signed-off-by: Chris Packham <judge.packham@gmail.com>
@cpackham
Copy link
Contributor

Hopefully #1990 has provided a workaround for this. Closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants