On Fri, 2010-12-31 at 15:12 -0800, John Deal wrote: > Hello Julian, > > I am getting the following run-time failure: > > bin$ sudo ./mira_server > ./mira_server: error while loading shared libraries: libsoci_core.so.3.1: > cannot open shared object file: No such file or directory > bin$ > > I have set the SOCI_BACKENDS_PATH as follows: > > echo $SOCI_BACKENDS_PATH > /usr/local/lib > > As stated in the earlier email, I copied all the soci libraries from > /usr/local/lib64 to /usr/local/lib. The link has a -L/usr/local/lib option. > My sqlite open is as follows: > > sociSession = new soci::session(soci::sqlite3, path); > > I just don't see why it can't find the libraries. Any insight would be most > appreciated. > > Thanks, > > John
Hi, the dynamic linker (ld.so) only searches in /lib /usr/lib (and the 64 bit variants) for shared libraries. /usr/local/lib is not searched on ubuntu systems. If you install your libraries there you need to tell the linker where to find them (you can change the location by changing CMAKE_INSTALL_PREFIX) You can tell the dynamic linker to look there in various ways: - add the path to /etc/ld.so.conf or /etc/ld.so.conf.d/ and execute ldconfig - hardcode the path in the executable using rpath: g++ ... -Wl,-rpath,/usr/local/lib or by setting LD_RUN_PATH to the location before compiling - set LD_LIBRARY_PATH environment variable before running the executable Or you can use static library instead of the shared one, but this is not recommended for distribution. If you want I can provide a debian package with an up to date soci version which installs into the systems paths so you don't have this problem. Best Regards, Julian Taylor
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________ Soci-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/soci-users
