dynamic-linker and readline across ubuntu versions

Mike Marchywka marchywka at hotmail.com
Sat Sep 12 16:00:45 UTC 2020


I'm making a bit of a bastard application using email for data exchange and hope to deploy
on a laptop acting as a server. I'm developing on 16.04 and trying to deploy on 18.04
( Beaver is on the lap top). Rather than copy around a bunch of shared objects, I tried to 
do as much static linking as possible and I finally got an executable that runs on
both machines but I had to copy over readline.so as it absolutely required 6 although
5 and 7 were in the 18.04 repo. With some stackoverflow help, I did find the dynamic-linker
I wanted although it was not clear how to really know which to pick. The solution
I came up with for my particular app is the command below but I could find no
solution for readline other than to copy it over to where it may not seem to belong.
One clue was that it was using different dynamic linkers for working results and
I just copied that over, ( just as I was doubting that naming the result something other
than a.out could work :) )  How the heck does the compiler pick a dynamic linker? 

file a.out
a.out: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=c97a251e0d90ff7040635805b6f443de575b3c76, not stripped




Thanks.

g++ -Wl,--dynamic-linker=/lib64/ld-linux-x86-64.so.2 -static -std=gnu++11 -DTEST_mikemail__ -DxxUSE_HCACHE -DxxLINE_LOCK_MM_ERR -DHAVE_MIKE_MUTT_SERVER -gdwarf-3 -O0 -I. -I/home/documents/cpp/mjm/hlib/ -I/home/documents/cpp/mjm/num -I/home/documents/cpp/mjm/include -I/home/documents/cpp/pkg/include -I/home/documents/cpp/pkg -I/home/ubuntu/dev/libetpan/libetpan/include -I/home/ubuntu/dev/neomutt/neomutt-20200501 -Wall -Wno-unused-variable -Wno-unused-function -Wno-sign-compare -Wno-non-template-friend -Wno-misleading-indentation -x c++ ./mikemail.h -o mikemail.out -L /usr/lib/x86_64-linux-gnu -L /home/ubuntu/dev/libetpan/libetpan/src/.libs -L /home/ubuntu/dev/neomutt/neomutt-20200501 -L/usr/lib -L/usr/lib/x86_64-linux-gnu/mit-krb5 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -letpan -letpan -lz -lxml2 -ltidy -lctemplate -Wl,-Bdynamic -lpthread -Wl,-Bstatic -luuid -licudata -licui18n -licuio -liculx -licutest -licutu -licuuc -lssl -letpan -letpan -lz -lxml2 -ltidy -lctemplate -Wl,-Bdynamic -lpthread -Wl,-Bstatic -luuid -licudata -licui18n -licuio -liculx -licutest -licutu -licuuc -lssl -lboost_filesystem -lboost_system -lneomutt -lneomutt -lmutt -Wl,-Bdynamic -Wl,-Bsymbolic-functions -Wl,-z,relro -lcrypto -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -Wl,-Bstatic -ltokyocabinet -Wl,-Bdynamic -Wl,-z,relro -lcrypto -lgssapi_krb5 -lkrb5 -lk5crypto -lglib-2.0 -Wl,-Bstatic -Wl,-Bdynamic -Wl,-z,relro -lcrypto -lgssapi_krb5 -lkrb5 -lk5crypto -lglib-2.0 -Wl,-Bstatic -Wl,-Bdynamic -lreadline -lidn -lgnutls -lncursesw -ltinfo -lsasl2 -lgpgme -lanl -lgpgme -lassuan -lgpg-error -lgpg-error -Wl,-Bstatic -lneomutt -Wl,-Bdynamic


note new address
 Mike Marchywka 306 Charles Cox Drive Canton, GA 30115
 2295 Collinworth  Drive Marietta GA 30062.  formerly 487 Salem Woods Drive Marietta GA 30067 404-788-1216 (C)<- leave message 989-348-4796 (P)<- emergency




More information about the ubuntu-users mailing list