Re: Glibc build fail

"Bruce Dubbs" ([email protected] via lfs-support Mailing List) <[email protected]>
Newsgroups gmane.linux.lfs.support
Message-ID <[email protected]>
On 11/7/24 13:24, Bruce Dubbs wrote:
> On 11/7/24 13:08, "kevadesu" ([email protected] via lfs-support Mailing List) wrote:
>> Hi, sorry to intrude and disturb everyone with this post, but I'm having some
>> issues with compiling Glibc 2.40 in Chapter 5.5
>> Book is Linux From Scratch - Version 12.2-systemd
>> The following error appears:
>>
>>
>> x86_64-lfs-linux-gnu-gcc -Wl,-rpath-link=/mnt/lfs/sources/glibc/build:/mnt/
>> lfs/sources/glibc/build/math:/mnt/lfs/sources/glibc/build/elf:/mnt/lfs/
>> sources/glibc/build/dlfcn:/mnt/lfs/sources/glibc/build/nss:/mnt/lfs/sources/
>> glibc/build/nis:/mnt/lfs/sources/glibc/build/rt:/mnt/lfs/sources/glibc/build/
>> resolv:/mnt/lfs/sources/glibc/build/mathvec:/mnt/lfs/sources/glibc/build/
>> support:/mnt/lfs/sources/glibc/build/nptl -o /mnt/lfs/sources/glibc/build/
>> support/links-dso-program -pie -Wl,-z,pack-relative-relocs -Wl,-O1 -nostdlib -
>> nostartfiles -Wl,-z,mark-plt   -Wl,-z,relro  /mnt/lfs/sources/glibc/build/csu/
>> Scrt1.o /mnt/lfs/sources/glibc/build/csu/crti.o `x86_64-lfs-linux-gnu-gcc -
>> Wl,-z,mark-plt --print-file-name=crtbeginS.o` /mnt/lfs/sources/glibc/build/
>> support/links-dso-program.o -lstdc++ -lgcc -lgcc_s  -Wl,-dynamic-linker=/usr/
>> lib/ld-linux-x86-64.so.2  /mnt/lfs/sources/glibc/build/libc.so.6 /mnt/lfs/
>> sources/glibc/build/libc_nonshared.a -Wl,--as-needed /mnt/lfs/sources/glibc/
>> build/elf/ld.so -Wl,--no-as-needed -lgcc  `x86_64-lfs-linux-gnu-gcc -Wl,-
>> z,mark-plt --print-file-name=crtendS.o` /mnt/lfs/sources/glibc/build/csu/
>> crtn.o
>> /mnt/lfs/tools/lib/gcc/x86_64-lfs-linux-gnu/14.2.0/../../../../x86_64-lfs-
>> linux-gnu/bin/ld: cannot find -lgcc_s: No such file or directory
>> collect2: error: ld returned 1 exit status
>> make[2]: *** [../Rules:229: /mnt/lfs/sources/glibc/build/support/links-dso-
>> program] Error 1
>> make[2]: *** Waiting for unfinished jobs....
>> make[2]: Leaving directory '/mnt/lfs/sources/glibc/support'
>> make[1]: *** [Makefile:484: support/others] Error 2
>> make[1]: Leaving directory '/mnt/lfs/sources/glibc'
>> make: *** [Makefile:9: all] Error 2
>>
>>
>> I have installed Binutils, GCC and Linux API headers according to guide,
>> Can anyone help me please? I genuinely don't know if there's a small detail I
>> skipped in the guide.
>> The host system passes the version check and all of the md5sums are correct
>> for the downloaded packages
> 
> The error is "cannot find -lgcc_s: No such file or directory".  That strikes me as 
> something wrong with the environment as long as binutils and gcc wer installed 
> correctly.  We are using cross-compiler techniques here so details matter.
> 
> Are you sure you initialed the lfs user's environment properly?  Did you properly 
> become user lfs as in Section 4.3?
> 
> You are not very far into the system, so I suggest starting over at Chapter 4 and 
> follow the instructions very closely.

On second thought, go back to Section 2.6 and be careful of the Caution when you are 
the root user.

   -- Bruce

-- 
http://lists.linuxfromscratch.org/sympa/info/lfs-support
Unsubscribe: See the above information page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.