distributing shared object
Hello.
Is it possible to distribute shared object with my app, for example libstlport_gcc.so? I thought that not everybody have compiled stlport? So does it work from app directory or does it have to be installed to /usr/local/li to work?
...
Ok, I tried it I removed stlport libs from /usr/local/lib and copied libstlport_gcc.so to my app dir. And it worked
But what about if user has already version installed? Can there be conflicts? Which is used first: the one in my dir or from system dir?
Thanks.
-----------
RacingTreme - for fun multiplayer racing:
http://users.utu.fi/stkibr
In case you didn''t know... It''s a bad bad thing to try to distribute binaries on linux. Not only is there incompatibility many times, but many people would just plain not like it.
mmhh... i''d like ''complete'' programs better than the ''incomplete'' ones, where i have to search & compile & install hundreds of libraries, before everything works... and in most cases there''s at least one library that just won''t compile & the whole process was for nothing... so i''d really like libraries to be distributed along with the programs using them... doesn''t have to be in the same archive (for if i already have a library, i don''t need to download it...), but there should be other download-links to the libs.
on the other side, there''s still the problem with portability... there would have to be a lot of binaries for all different systems... and that''s bad (especially for the distributor).
the best thing i could imagine would be distributed source, links to all used libraries, a COMPLETE list of dependencies for each package & code that is tested to REALLY compile. there are lots of programs that just won''t compile & one needs a lot of hacking to get them to work...
on the other side, there''s still the problem with portability... there would have to be a lot of binaries for all different systems... and that''s bad (especially for the distributor).
the best thing i could imagine would be distributed source, links to all used libraries, a COMPLETE list of dependencies for each package & code that is tested to REALLY compile. there are lots of programs that just won''t compile & one needs a lot of hacking to get them to work...
Why you can''t copy "unexpected" depends shared libraries and add pach for LD_LIBRARY_PATH envarement variable or use ldconfig ?
For example my package user mysql fucntion, and I install libmysqlclient.so to work folder if mysqlclients not installed in system.
For example my package user mysql fucntion, and I install libmysqlclient.so to work folder if mysqlclients not installed in system.
quote: Original post by stefu
I removed stlport libs from /usr/local/lib and copied libstlport_gcc.so to my app dir. And it worked
how about run command
# ldconfig -m /usr/local/lib
?
Our add it in rc.conf ldconfig_path sor LD_LIBRARY_PATH?
I don''t understand how distributing shared library could be more problem or conflicting than statically linked?
1. I link statically, binary size grows.
2. I link dynamically and give shared object with binary.
Same code in one piece or in two pieces
-----------
RacingTreme - for fun multiplayer racing:
http://users.utu.fi/stkibr
1. I link statically, binary size grows.
2. I link dynamically and give shared object with binary.
Same code in one piece or in two pieces
-----------
RacingTreme - for fun multiplayer racing:
http://users.utu.fi/stkibr
I think what stefu wants is akin to a windows application where dll''s are used. He probably has built a modular application and wants to distribute his modules as well any third party modules, without requiring his users to install n number of libraries. It has been my expierence that if the shared library is in the applications directory, it will get found and used. If not, then it looks in the LD_LIBARAY_PATH and ld.so.conf.
Kevin
-----------------------------
kevin@mayday-anime.com
http://www.mayday-anime.com
Kevin
-----------------------------
kevin@mayday-anime.com
http://www.mayday-anime.com
-----------------------------kevin@mayday-anime.comhttp://www.mayday-anime.com
Jep, I think that''s what I mean basically.
Originally I was concerned about STLport.so but now I know how to link it statically so no problem there. Thanks
-----------
RacingTreme - for fun multiplayer racing:
http://users.utu.fi/stkibr
Originally I was concerned about STLport.so but now I know how to link it statically so no problem there. Thanks
-----------
RacingTreme - for fun multiplayer racing:
http://users.utu.fi/stkibr
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement