Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have an application that runs fine on a Raspberry PI that use dynamic library's.
I now compiled it for a desktop( Debian ), both PI and Desktop is 64 bit architecture. There is nothing special like setting up paths that I did for the PI.
The application start on the desktop load the first library but then fail with error 2 when it try and load the next library. All are in the /usr/lib/ directory.
I use echo $LD_LIBRARY_PATH to make sure it is setup correctly. The access writes for the one library that work is the same as the rest.
I made sure all lib's are 64 bit compiled.
I will appreciate it if someone have any suggestions that can help me.
Oops, how did I miss that one. I use an Intel processor.
I am trying to debug it now on my laptop in Debian using Eclipse. The app starts but then get the following error in debugging -
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Error while mapping shared library sections:
`/usr/lib/libsvproxy.so': not in executable format: File format not recognized
Most of todays Intel/AMD cpus are 64 bit wide. Know that Intel/AMD cpu's are x86/x86_64 architecture but RPi is a ARM architecture. You can't run a binary/library of one architecture on another. That's why you are getting the error message: '`/usr/lib/libsvproxy.so': not in executable format: File format not recognized'.
You can find the architecture of a binary/library by running:
The error I mentioned above is after I compiled it in another workshop space for 64 bit. See file details below.
The first one is the executable that then call the utility lib that works fine and the next lib svproxy the fail. I also tried to call 2 other libs after the utility lib instead of the svproxy lib but they also fail.
nomad: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0xec4163de99bf86d092e9f46f06c9453a2a3dd1ed, not stripped
libutility.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=0xd53627734fdf99bc0053cff72f7fdbc5faec9efd, not stripped
libsvproxy.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=0x3610200d7744cda4eb8ea42a21e87141844f5244, not stripped
Read the preceding comments carefully(!) before you continue banging your head fruitlessly against this wall. Unlike Windows, which only runs on Intel x86 processors of certain vintages, Linux software can run on ... and can be run on ... many different types of CPUs. You must be certain that your CPU is of the correct type to run the libraries that you have selected to download. (Most Linux software is cross-platform to some degree, and so can be compiled to different architectures. You must make sure that you have downloaded a binary for the proper architecture type.
Incidentally, you must also be sure that you have re-run the /sbin/ldconfig command, which might (or, might not) require root-privileges. Linux relies on a "loader cache" to enable it to find libraries without actually having to search the filesystem to do it. The aforementioned command rebuilds that cache.
Last edited by sundialsvcs; 03-29-2015 at 10:09 AM.
The library's I use is library's I wrote and compiled myself with Eclipse.
I now compiled everything in 32 bit and downloaded Debian 32 bit and loaded it on a virtual box. Still getting the same issue I did with the 64 bit library's and 64 bit machine. I also have tried the 64 bit library's on a 64 bit Debian on a Virtual box and have the exact same issue.
If I compile the code for arm for the PI it works 100%.
So I would try ldd <application> and file on all the used shared libraries and on the app.
I have done the ldd on the application and the library that fails, it do find all the files it need. I also did the file on the application and the library's and all library's are elf 32-bit lsb shared objects and dynamically linked. The application is elf 32-bit lsb executable dynamically linked uses shared libs.
I'm a bit confused, you stated before you made a 64bit compilation, and now you say that is a 32bit app (and libs). So "Error while mapping shared library sections:" looks like caused by incompatible libraries, but I'm still unsure
I'm a bit confused, you stated before you made a 64bit compilation, and now you say that is a 32bit app (and libs). So "Error while mapping shared library sections:" looks like caused by incompatible libraries, but I'm still unsure
I first tried the 64-bit, I then compiled it for 32-bit because I know on the Raspberry pi in 32-bit it works although it is arm.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.