Re: issue with creating toolchain with lfs versions

"Ramesh GK" ([email protected] via lfs-support Mailing List) <[email protected]> Wed, 7 Jan 2026 10:28:19 +0000
Newsgroups gmane.linux.lfs.support
Message-ID <CY5PR20MB47225CDDAC5BE0DFAF7D11CBED84A@CY5PR20MB4722.namprd20.prod.outlook.com>
Seems to have figured out one issue partially using a separate script as recommended than the build system and thought of sharing this.

I was using x86_64-pc-linux-gnu where it is failing at below error but the error is gone if using x86_64-lfs-linux-gnu. Change is from pc to lfs.

This was the error in gcc-pass-1
> configure:2634: error: in `/tmp/work_debian12/0000_toolchain/src/gcc-pass-1/
> build/intl':
> configure:2636: error: C compiler cannot create executables


Thanks
Ramesh GK


________________________________
From: Ramesh GK <[email protected]>
Sent: Friday, December 19, 2025 1:04 AM
To: LFS Support List <[email protected]>; [email protected] <[email protected]>
Subject: Re: [lfs-support] issue with creating toolchain with lfs versions

Apologize for top posting. Saw the email address was missing and added it.

My challenge is I had to use crux's pkgutils's pkgmk as the build system and unfortunately cannot go out of it.

Will try to rerun the scenario and check.

Thanks
Ramesh GK



________________________________
From: [email protected] <[email protected]> on behalf of Bruce Dubbs <[email protected]>
Sent: Friday, December 19, 2025 12:36 AM
To: LFS Support List <[email protected]>
Subject: Re: [lfs-support] issue with creating toolchain with lfs versions

On 12/18/25 10:50 PM, Ramesh GK wrote:
> Hi bruce,
>
> Please find the latest output from lfs-12.0
>
> OK:    Coreutils 9.6    >= 7.0
> OK:    Bash      5.2.37 >= 3.2
> OK:    Binutils  2.43.1 >= 2.13.1
> OK:    Bison     3.8.2  >= 2.7
> OK:    Diffutils 3.10   >= 2.8.1
> OK:    Findutils 4.10.0 >= 4.2.31
> OK:    Gawk      5.3.1  >= 4.0.1
> OK:    GCC       14.2.1 >= 5.1
> OK:    GCC (C++) 14.2.1 >= 5.1
> OK:    Grep      3.11   >= 2.5.1a
> OK:    Gzip      1.13   >= 1.3.12
> OK:    M4        1.4.19 >= 1.4.10
> OK:    Make      4.4.1  >= 4.0
> OK:    Patch     2.8    >= 2.5.4
> OK:    Perl      5.40.1 >= 5.8.8
> OK:    Python    3.13.1 >= 3.4
> OK:    Sed       4.9    >= 4.1.5
> OK:    Tar       1.35   >= 1.22
> OK:    Texinfo   7.2    >= 5.0
> OK:    Xz        5.6.4  >= 5.0.0
> OK:    Linux Kernel 6.12.10 >= 4.14
> OK:    Linux Kernel supports UNIX 98 PTY
> Aliases:
> OK:    awk  is GNU
> OK:    yacc is Bison
> OK:    sh   is Bash
> Compiler check:
> OK:    g++ works
>
> The issue still persists
> Configuring stage 2 in ./intl
> configure: creating cache ./config.cache
> checking for x86_64-pc-linux-gnu-gcc...  /tmp/work_arch_2025.02.01/0000_toolchain/
> src/gcc-pass-1/build/./prev-gcc/xgcc -B/tmp/work_arch_2025.02.01/0000_toolchain/src/
> gcc-pass-1/build/./prev-gcc/ -B/tmp/work_arch_2025.02.01/0000_toolchain/pkg/tools120/
> x86_64-pc-linux-gnu/bin/ -B/tmp/work_arch_2025.02.01/0000_toolchain/pkg/tools120/
> x86_64-pc-linux-gnu/bin/ -B/tmp/work_arch_2025.02.01/0000_toolchain/pkg/tools120/
> x86_64-pc-linux-gnu/lib/ -isystem /tmp/work_arch_2025.02.01/0000_toolchain/pkg/
> tools120/x86_64-pc-linux-gnu/include -isystem /tmp/
> work_arch_2025.02.01/0000_toolchain/pkg/tools120/x86_64-pc-linux-gnu/sys-include   -
> fno-checking
> checking whether the C compiler works... no
> configure: error: in `/tmp/work_arch_2025.02.01/0000_toolchain/src/gcc-pass-1/build/
> intl':
> configure: error: C compiler cannot create executables
> See `config.log' for more details
> make[2]: *** [Makefile:9269: configure-stage2-intl] Error 77
> make[2]: Leaving directory '/tmp/work_arch_2025.02.01/0000_toolchain/src/gcc-pass-1/
> build'
> make[1]: *** [Makefile:24346: stage2-bubble] Error 2
> make[1]: Leaving directory '/tmp/work_arch_2025.02.01/0000_toolchain/src/gcc-pass-1/
> build'
> make: *** [Makefile:1033: all] Error 2
>

> I had to go to older versions just because I am not able to automate the build
> process of lfs in the script
>
> I am using crux's pkgutils's pkgmk as the main script for building packages with
> slackware's pkgtools with slackdesc to package them.
>
> My thought process is to build the toolchain (with tools, glibc, adjusting the
> toolchain as it was in lfs-9.1) as a package and then build all individual packages
> normally and once everything is built in lfs then remove the toolchain as a package
> which completes a transition from lfs build process to individual packages build
> process so I can continue normally from there onwards.

First, stop top posting.  On mailing lists we post of the bottom to maintain context.
We also trim off non relevant portions of prior posts.

For your problem.  LFS-12.0 should be OK to act as a host system.

I think you should stop trying to use a package manager.  Just start over and build
by hand watching each command to see that it works properly.

1. Start at Section 2.5 Creating a File System on the Partition.
2. Use LFS-14.4 stable.
3. Carefully copy each command and paste it into the terminal where you have placed
    the sources, but see Section iii. General Compilation Instructions.
    Read the 2nd Important note (twice).  Make sure you understand it.
4. Copy each command from the html version of the book and paste it to the
    location of the expansion of the current package tarball. Check that it
    is doing the right thing.

If you find a problem report it.  Also add the output of "free -h' and
'lscpu | head -n 18'

   -- Bruce

-- 
http://lists.linuxfromscratch.org/sympa/info/lfs-support
Unsubscribe: See the above information page