LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-27-2025, 05:05 PM   #1
nuc
LQ Newbie
 
Registered: Jul 2025
Distribution: GoboLinux
Posts: 1

Rep: Reputation: 0
Exclamation Installation of Glibc >= 2.34 errors out on format.lds


Hi guys!

I am trying to package a newer Glibc version the the distro GoboLinux.

At the moment we are on Glibc 2.30. I was able to sucessfuly compile and install Glibc up until version 2.33.

But starting from Glibc 2.34 I am getting various issue, which a second user of our community confirmed (so I don't think it is hardware related).


But version 2.34 and 2.35 both fail on the install step with "stack smashing detected" on format.lds:
Code:
/System/Index/bin/install -c /Data/Compile/Sources/glibc-2.34/_build/libc.so /lib/libc.so.6.new
hi_IN.UTF-8...mv -f /lib/libc.so.6.new /lib/libc.so.6
gcc   -shared -nostdlib -nostartfiles \
      -x assembler /dev/null -o /Data/Compile/Sources/glibc-2.34/_build/format.lds.so
*** stack smashing detected ***: terminated
make[1]: *** [Makerules:1043: /Data/Compile/Sources/glibc-2.34/_build/format.lds] Aborted
No output in dmesg!


With Glibc version 2.36 to 2.39 I am getting a segmentation fault on format.lds:
Code:
/System/Index/bin/install -c /Data/Compile/Sources/glibc-2.36/_build/libc.so /lib/libc.so.6.new
ca_IT.ISO-8859-15...mv -f /lib/libc.so.6.new /lib/libc.so.6
gcc   -shared -nostdlib -nostartfiles \
      -x assembler /dev/null -o /Data/Compile/Sources/glibc-2.36/_build/format.lds.so
make[1]: *** [Makerules:1033: /Data/Compile/Sources/glibc-2.36/_build/format.lds] Segmentation fault
with the following dmesg output:
Code:
[ 3020.173994] gcc[12326]: segfault at 1d9560 ip 00007f7d019feb12 sp 00007ffcfb9d91d8 error 4 in libc.so.6[35b12,7f7d019ef000+15c000] likely on CPU 2 (core 2, socket 0)
[ 3020.174011] Code: 48 03 04 25 00 00 00 00 c3 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 8b 05 39 24 1a 00 48 8b 0d ba 22 1a 00 64 48 8b 00 <48> 8b 00 48 8b 70 38 48 8d 96 00 01 00 00 64 48 89 11 48 8b 78 40
[ 3020.176455] sh[12327]: segfault at 1d9560 ip 00007f2a9f5abb12 sp 00007fffbef43b38 error 4 in libc.so.6[35b12,7f2a9f59c000+15c000] likely on CPU 2 (core 2, socket 0)
[ 3020.176466] Code: 48 03 04 25 00 00 00 00 c3 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 8b 05 39 24 1a 00 48 8b 0d ba 22 1a 00 64 48 8b 00 <48> 8b 00 48 8b 70 38 48 8d 96 00 01 00 00 64 48 89 11 48 8b 78 40


I am unable to install Glibc 2.40 and above due to:
Code:
/System/Index/bin/install -c /Data/Compile/Sources/glibc-2.40/_build/libc.so /lib/libc.so.6.new
mv -f /lib/libc.so.6.new /lib/libc.so.6
gcc   -shared -nostdlib -nostartfiles \
      -x assembler /dev/null -o /Data/Compile/Sources/glibc-2.40/_build/format.lds.so
gcc: /lib64/ld-linux-x86-64.so.2: version `GLIBC_2.35' not found (required by /System/Index/lib64/libc.so.6)
make[1]: *** [Makerules:994: /Data/Compile/Sources/glibc-2.40/_build/format.lds] Error 1
Nothing in dmesg.
Maybe they depend on Glibc 2.35 to be installed first first (?). But note that again it errors out on format.lds.so..... looks like the same issue.



For reference, I am attempting all of my builds with GCC 14.3.0 and Binutils v2.44.

My GCC 14.3.0 build options

Code:
 --libexecdir="${target}/lib"
 --with-cpp-install-dir="lib"
 --enable-shared
 --enable-threads="posix"
 --enable-__cxa_atexit
 --enable-clocale="gnu"
 --enable-default-ssp
 --with-system-zlib
 --disable-bootstrap
 --enable-lto
 --enable-plugin
 --enable-install-libiberty
 --disable-fixincludes
 --enable-languages="c,c++,fortran,objc"
I have tried to compile with -j1 but same results.
CPU: AMD Ryzen 7 3700X 8-Core



TL;DR:

Starting from Glibc 2.34 all builds fail on the install step on format.lds. The errror messages vary slightly, but it looks like there's a common thread!
... Any ideas? I am really out of them at this point.

I am trying to compile a recent Glibc at least since November... my system is fully up to date, so that can't be an issue.


Thanks in advance!!

Last edited by nuc; 07-27-2025 at 07:44 PM.
 
Old 07-28-2025, 12:58 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 26,460

Rep: Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608
compilations like this will never use dmesg.
It looks like you need to prepare a new system where you compile everything using the same glibc and compiler. You cannot easily replace glibc on a running system (on the fly).

here you can find some ideas: https://stackoverflow.com/questions/...rce-and-use-it
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] "Make" error: /usr/bin/lds cannot find -lxt dlfallen Linux - Newbie 10 08-04-2020 10:26 PM
[SOLVED] 6.9. Glibc-2.23 / 6.9.1. Installation of Glibc newuser21 Linux From Scratch 6 06-16-2016 08:46 AM
Some one got know how to write a lds(linker script) file? Richard.Yang Programming 2 10-14-2010 02:30 AM
RH 9.0 glibc rpm says it needs glibc-common, but glibc-common is installed whitshade Red Hat 2 04-28-2007 05:49 PM
kconfig & module.lds Barq Linux - General 0 03-23-2006 04:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:14 PM.

Contact Us - Advertising Info - Rules - Privacy - Donations - Contributing Member - LQ Sitemap - "Weather apps tell you it'll rain. Wyndo tells you when to go."
Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions