ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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 2 drives in one PC with debian OS each. First provides wide range of tools for development and work (including make, cmake, dev IDEs, apt-get, dpkg etc.). Second one is realy limited port of the first one (without make, cmake apt-get, dpkg, IDEs, g++, gcc ... etc.) Architecture of both systems are identical (same hw .. in fact the dev system is connected to the destination machine)
Because I had to update libstdc++ on dev (first) system, due to the requirements of the application Im develooping, there is no longer possible to run the application on the second (simple linux) system.
Static linking of libraries including libstdc++ seems to be usless (already tried)..
I dont see any other way out, than update the libstdc++ on the second system ... but on this system is not anything that should make it possible (make, apt-get, dpkg, g++, gcc..)
- another think is that this action may affect another already installed applications (hope not, if it is upgrade to higher version :/)
Is it possible to workaround this somehow from the first system with the second system mounted as a drive?
Isn’t it possible to install both as they are named libstdc++.so.5 and libstdc++.so.6, i.e. just copy it to the other system and you have both in place?
That was maybe my first quess to just copy the library and edit symlink, but unfortunatelly it seems that there are some dependencies or other libraries that has to be resolved as well... so now Im looking for any solution (Including copying files) ... only one that is comming to my mind now is use the dev system to install standard c++ library to another drive, but I think I dont have enough experiences to figure it out somehow by myself ...
Does anybody know if the --prefix parameter of configure might help somehow (when building it from scratch)?
Because I think, that when I run make install ... then I think it installs all libraries to their default locations, or not ?
Is it possible to modify target locations for make install?
You can have both installed with different versions. Just leave leave the name it is. The symlink from libstdc++.so to a version with a number is only necessary if you want to compile something new (at least this is the idea behind it). In the applications the name of the final target (called soname) incl. the major version number will be recorded and this way it always finds the correct version it needs even if the minor version changes.
What do your symlinks now look like? This libstdc++.so.6.0.17 and created a symlink from libstdc++.so.6 thereto? The original libraries are still in place?
/usr/lib# ls -la libstdc++*
libstdc++.so.6 -> libstdc++.so.6.0.17
libstdc++.so.6.10
libstdc++.so.6.0.17
seems that symlink is ok ... it points to ver. 17 ... and also the output was changed ... because when i tried to run the app without libstdc++.so.6.0.17 on place (and ldconfig)
the output was :
./TheApp: /usr/lib/libstdc++.so.6 version 'GLIBCXX_3.4.14' not found (required by ./TheApp)
./TheApp: /usr/lib/libstdc++.so.6 version 'GLIBCXX_3.4.15' not found (required by ./TheApp)
embeded system was not possible to run eg. nm command not found but i tried it from the dev system with modified path to libstdc++.so.6 (path to file on embeded system) and the output was the same: 000ec1e0 u _ZNS8messagesIcE2idE
Ive just realized, that I compiled the app with debug symbols (Debug profile) ... so i have to compile release version ... Im feeling that this might be the isuue
EDIT: No I have build and tried it with release version and the result was the same ...
yes, libstdc++.so.6.0.10 was the original version and then I had to update GCC on the dev system... so after that the version on the dev system is libstdc++.so.6.0.17
I tried to install yesterday the dev pkg of GCC 4.6 on the dev system and libstdc++.so.6.0.14 appeared so I compiled the app using g++-4.6 ... copied the libstdc++.so.6.0.14 to embeded system and tried to run the app ... but "ELF file OS ABI invalid" error appeared .... so Im not sure now if it is some move forward or not ...
I think it means that libsdtc++ doesn't follow the standard, meaning version 6.0.17 isn't binary compatible with 6.0.10. (Also 6.0.10 isn't compatible with 6.0.17, but that's acceptable
But, just to be sure, install 'nm' on the other system, and repeat these steps:
I think it means that libsdtc++ doesn't follow the standard, meaning version 6.0.17 isn't binary compatible with 6.0.10. (Also 6.0.10 isn't compatible with 6.0.17, but that's acceptable
But, just to be sure, install 'nm' on the other system, and repeat these steps:
If the symbol is present in 6.0.10, but missing from 6.0.17 then the we are right, otherwise we have misunderstood something.
Realy would like to do that ... but since there is no make, cc etc on embeded system I cant configure/ make / make install on embeded system binutils ... and if I copy the nm from dev system it requires other libraries ... one of them is libc.so.6 (glibcxx ....11) and it of course reboot imediatelly when I try to replace it ...
It is complicated ... the embeded system is quite obsolete (and any mandatory change is forbiden) and i have to run there aplication which has to support openssl 1.0 libxml2 further more in the app are included libraries which was compiled in gcc 4.5.1 and provider of these libraries claims that the whole app has to be compiled under gcc 4.5.1 ... but Im compiling it under 4.7 (and it works on dev system) ... so ... kind of problem that now I have a doubts if it is even posible...
Aren't the embedded system's partitions mounted somewhere in the development system?
yes, it is ... mounted in dev system /mnt/sda1/
This issue was raised when I had to install openssl 1.0 (0.9.8 was initialy on the both systems) and thus I had to upgrade gcc and other libraries (dependencies) to be able install v 1.0.0 ...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.