LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 01-26-2024, 09:58 AM   #1
sarwaswa
LQ Newbie
 
Registered: Jan 2024
Posts: 1

Rep: Reputation: 0
Unhappy How do I build on Debian 12, but also use the binaries on distros that use older GLIBC symbols?


Hello.

Our team is trying to port our build environment to Debian 12 from Debian 11.

While building on Debian 12, I find that many shared object files generated contain newer GLIBC symbols.
For our products to run on older Linux distros that we support, we can’t have GLIBC symbols newer than 2.28 present. In order to achieve this, we have rebuilt GCC-12.3 sources and pinned back multiple functions to their corresponding older GLIBC symbol versions. But for certain symbols this approach hasn’t worked, and we are looking for some guidance on how we can achieve the same.

These newer symbols are not available on distros that uses older GLIBC more specifically, the __libc_single_threaded and several new symbols from <sys/stat.h> @GLIBC_2.33 and @GLIBC_2.34 are entirely new on Debian 12 and do not have a preceding version. The executables generated in turn, have another newer symbol ​__libc_start​_main @GLIBC_2.34.

We wish to use the same shared libraries and executables built on Debian 12 on distros that use older GLIBC machines as well. However, we face errors stating that these newer GLIBC symbols aren't found on my system. Consequently, we cannot run these binaries on those machines.

Certain restrictions our team have are, firstly, we cannot build these binaries on the older distros. Furthermore, we cannot necessarily use a container environment either inside those machines either. We're specifically looking for ways in which we can actually make the shared libraries and executables backwards compatible, so that despite being built on a newer Debian version, they can run them on the older versions as well without encountering these GLIBC issues.

We did have a look at several resources on the internet and it seems like certain symbols have been introduced primarily to counter this very objective. But are there ways to be able to bypass this?
 
Old 01-31-2024, 01:22 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,854

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
I don't really understand, usually libc is backward compatible, but there can be cases or exceptions.
Anyway, you can download the source of those old libs and build them on your host and use them if you wish.
 
  


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
Could anyone recommend a distro for privacy but also everyday use? Also looking for general advice on privacy. ann.ominous Linux - Newbie 14 07-15-2021 10:39 PM
Chrome binaries always work on older systems but Firefox binaries do not - what is the magic? Jason_25 Linux - Software 1 10-28-2019 11:23 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
Debugger selectively not using symbols in library with symbols Millenniumman Programming 5 03-25-2007 09:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 11:28 AM.

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
Open Source Consulting | Domain Registration