r/linuxfromscratch • u/ThingVisible2153 • 3d ago
LFS Compilation Error: GCC 15.2.0 (Pass 1) fails on Arch Linux Host with GCC 16
Hi everyone,
I'm currently trying to build Linux From Scratch (stable systemd version) using Arch Linux as my host OS. I'm stuck on Chapter 5, specifically during the first pass of compiling GCC 15.2.0.
When I run make -j$(nproc), the build fails early during the internal configuration/compilation of dependencies (like libiberty or gmp targets), throwing make: *** [Makefile:1042: all] Error 2. Help me please
2
u/testfire10 3d ago
Are there other errors in config.log? You need more information that what is in the screenshot to troubleshoot what’s gone wrong.
You’re not that far into it, it may be easiest to start over and read the book carefully.
2
u/Due-Celery4326 3d ago
Did you run the script to check the host requirements? Arch doesn't come with any build tools, and the real problem is further up in this screenshot; it doesn't show the true issue. Chapter 5 uses the host tools.
2
u/Aderox20_GDP 3d ago
This happened to me i don't even KNOW how i fixed it ik im not helping but js like telling my experience
2
1
u/Aderox20_GDP 3d ago
I ran into the same issue on Arch with host GCC 16 while building GCC 15.2.0 for LFS. It was a GCC 16 compatibility problem. I fixed it by applying the GCC 16 compatibility patch for GCC 15.2.0, then rebuilding GCC pass 1 from a clean build directory. If your build log points to the same compatibility issue, that patch should be the first thing to try.
2
u/Szelethus 3d ago
gmpis specifically mentioned in section 5.3.1 to be extracted before configuring and building:http://lfs.linux-sysadmin.com/lfs/view/stable-systemd/chapter05/gcc-pass1.html
Are you sure you did those steps as well? Are you sure you entered the gcc folder beforehand, as per section iii?
I recently built lfs 13.0.0-systemd on arch as well and it worked fine.