I usually try to get the shared libraries linked such that they can resolve 
dependencies without relying on LD_LIBRARY_PATH.  It can be a bit tricky. If 
it's a TEA-enabled C extension then it's not too hard. 

An example of C extensions that make shared libraries that have dependencies on 
other shared libraries that work without LD_LIBRARY_PATH magic include tcl.gd 
(which links the .so it creates with libgd) and Pgtcl (which lines the .so it 
creates with libpq).

I'm a little fuzzy because I haven't messed with it in a while but as I recall 
it involves -rpath at linking time if using GNU ld.

On Jul 30, 2013, at 1:15 PM, Brice Hamon <normandvik...@gmail.com> wrote:

> Hi guys,
> 
> I decided to work around the fileevent problem and to go with tcl 8.6.
> 
> So I recompiled TCL with multi-threading, my TCL API lib, and Rivet. 
> Re-install all and run some test program by hand, so far so good.
> 
> Now the important test I was planing is:  during the RivetInitChildScript, 
> loading my TCL API and create some sessions.
> 
> I now have a simple problem that I am sure you guys knows the answer in 10 
> seconds: my TCL API lib (.so) has around 10 dependencies with other .so files 
> (mostly mine).
> The RivetInitChildScript fails because it can't find dependency libraries.
> 
> I am guessing my environment is not correct and I should set the 
> LD_LIBRARY_PATH correctly.
> 
> So I set the user root with the correct LD_LIBRARY_PATH (as my httpds run as 
> root) and try by hand (tclsh -> load ...../blabla.so). All works fine.
> 
> But when the same line is called in the RivetInitChildScript, the loading 
> fails.
> 
> Any ideas how to set the correct path when the module is loaded and run?
> 
> Thank you,
> 
> Brice.


---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscr...@tcl.apache.org
For additional commands, e-mail: rivet-dev-h...@tcl.apache.org

Reply via email to