LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles 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 10-28-2016, 05:21 AM   #1
coltson
Member
 
Registered: Oct 2010
Posts: 149

Rep: Reputation: 3
Running new binary into older distro


Hi, I have a program (amule) from a newer distro that I would like to run into a older distribution. I had successfully done the opposite before (running older binary into newer distro) and didn't know when I begin that forward compatibility was a problem in Linux. I started by copying all the dynamic libs that the binary depend upon to a special directory together with the executable file. Then I added that directory to ld.conf.so and executed ldconfig. Finally I tried to run it with ./exec_name. And received
Quote:
./amule
./amule: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.11' not found (required by ./amule)
./amule: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.15' not found (required by /media/34GB/Arquivos-de-Programas-Linux/Amule/libcrypto++.so.9)
./amule: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.11' not found (required by /media/34GB/Arquivos-de-Programas-Linux/Amule/libcrypto++.so.9)
./amule: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.15' not found (required by /media/34GB/Arquivos-de-Programas-Linux/Amule/libwx_gtk2u_adv-2.8.so.0)
./amule: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.11' not found (required by /media/34GB/Arquivos-de-Programas-Linux/Amule/libwx_gtk2u_core-2.8.so.0)
./amule: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.15' not found (required by /media/34GB/Arquivos-de-Programas-Linux/Amule/libwx_baseu_net-2.8.so.0)
./amule: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.15' not found (required by /media/34GB/Arquivos-de-Programas-Linux/Amule/libwx_baseu-2.8.so.0)
All that even with the copy of libc.so.6 being from the system where I copied the binary.

Trying to run ./lib.so.6 give me this message
Quote:
./libc.so.6: error while loading shared libraries: unexpected PLT reloc type 0x2a
.

I trowed these two error message in a engine search and found that you need to use the ld-linux.so.2 from the buiding system. So I copied ld-2.15.so from the newer distro to the directory where the amule binary and the other libraries are and created an ld-linux.so.2 symbolic link to it. Finally I tried
Quote:
./ld-linux.so.2 amule
but I received
Quote:
amule: error while loading shared libraries: amule: cannot open shared object file: No such file or directory
So how I should proceed, what did I wrong, should I manipulate some library environment variable?

P.S: I was also receiving
Quote:
./amule: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by ./amule)
, which I solved by copying the libstdc++ from the newer distro to the new directory and then calling ldconfig, but when I do that, no program from the old distro that was written in c++ could work, so I need a solution with ld-linux.so.2

Thanks for any help.
 
Old 10-28-2016, 10:11 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,292

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
You are in for major suffering trying to do it that way.

I would recommend trying the old binary in a chroot. That way, you could have 2 versions of glibc installed one in the chroot, one for the base system. The chroot cannot access / on the system.

Linuxfromscratch uses a chroot, and you could benefit by reviewing chapters 4 - 6 in the book
http://www.linuxfromscratch.org/lfs/view/stable/

They cope with the opposite problem - the base system may have an older incompatible glibc than the one being built, but the isolation is the same. You will need a chroot with old glibc and anything else required. This will be a major pain to create and a greater issue to maintain going forward, so if there are options I'd consider them.
 
2 members found this post helpful.
Old 10-28-2016, 01:05 PM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
thhat said, i hink there are one or two programs that create this environment for you, sortof like the old "portable" approach.
if only i could remember the name...
i remember i once managed to use a newer gimp version on debian stable with that.
fairly easy to do, but somewhat clunky.
i think one would need to create that container first on a system where amule works.


Quote:
Originally Posted by coltson View Post
All that even with the copy of libc.so.6 being from the system where I copied the binary.
you mean you actually replaced your libc file with an older version???


on a sidenote, amule's filesharing protocol is a zombie. 99% (i guess) of all filesharing happens over bittorrent protocol.
 
  


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
which distro for a little older pc tanoatlq Linux - Distributions 7 02-13-2008 05:38 PM
Need Older Distro's Poneyboy Linux - Distributions 5 01-06-2007 10:03 AM
Best distro for older PC trademac Linux - Newbie 21 08-23-2005 10:18 AM
Distro: Less scripting. Looking for mainly Elf binary based distro Z505 Linux - General 1 04-02-2005 11:33 PM
Best distro for older pc? MuckSavage Linux - Newbie 7 08-19-2004 10:03 PM

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

All times are GMT -5. The time now is 12:17 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