Boost logo

Boost Users :

Subject: Re: [Boost-users] "Cannot Open Shared Object File" only present when run as cron
From: Adam Romanek (a.romanek_at_[hidden])
Date: 2011-10-27 11:37:08


Hi,

you should probably use LD_LIBRARY_PATH to point the directory in which
libboost_program_options.so.1.46.1 is placed, e.g.:

---
$ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/boost/libs ./infer
---
Alternatively, you could compile 'infer' with 'rpath' linker option (see 
man ld, search for 'rpath' option) to add a given directory (the one 
with boost libs) to runtime library search path of the output ELF file.
WBR,
Adam Romanek
On 10/27/2011 04:48 PM, Russ Jones wrote:
> Hey folks,
>
> I'm currently using Boost to hold a statistical model in memory but am
> running into a problem. When run directly from the command line (as
> root), there are no issues, but when the same is run as a cron job, the
> following error is present...
>
> "/root/pylda/src/infer: error while loading shared libraries:
> libboost_program_options.so.1.46.1: cannot open shared object file: No
> such file or directory"
>
> Not quite sure what would change between running the same script as root
> user vs cron (I believe the cron is running as root, anyway). Have any
> of you experienced a similar problem?
>
> Thanks in advance,
>
> Russ Jones
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net