ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> tcljava-user
tcljava-user
Re: [tcljava-user] loading .so in Tcl that is created from Java
by Mo DeJong other posts by this author
Mar 23 2006 7:32PM messages near this date
[tcljava-user] loading .so in Tcl that is created from Java | Re: [tcljava-user] loading .so in Tcl that is created from Java
On Thu, 23 Mar 2006 17:30:20 -0700
Scott Serr <sserr@[...].com>  wrote:

>  Hello Tcl Blenders,
>  
>  We are able to use TclBlend to create a (real, not Jacl) Tcl interpreter

I will pretend you did not say that :)

>  from Java.  We have LD_LIBRARY_PATH set.  We eval a 'load foo.so' in 
>  Tcl.  This works, but foo.so is supposed to automatically load bar.so... 
>  it doesn't.

Well, first you should check the shared library to make sure the other
shared libs it depends on are linked in. Exactly how you do that depends
on the OS, but with Linux you should be able to use ldd. Sometimes
the shared libs are not built properly and only the executables actually
link in all the shared libs that are needed.

>  We are using Linux with Sun JDK 1.5.0_06.  My cube-mate read that in 
>  general Java didn't use the standard link loader.  It even goes on to 
>  say that automatic secondary loading might or might not happen.
>  
>  In short...
>  
>  Tcl starting the JVM,  Tcl "load foo.so" also loads "bar.so" for us.
>  
>  JVM starting the Tcl Interpreter, Tcl "load foo.so" succeeds but fails 
>  to load bar.so and has un resolved dependencies.
>  
>  Any ideas of how to solve this?  We thought about combining our dozen or 
>  so *.so files into one...

Humm, another approach you can try is just loading the other
shared libs before you load the one with the deps. Running load Tcl command
with an empty string as the init method will raise an error, but it does
do the OS load behind the scenes. I would give that a try and see if
it fixes things before trying to rebuild libraries.

I hope that helps
Mo DeJong



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
tcljava-user mailing list
tcljava-user@[...].net
https://lists.sourceforge.net/lists/listinfo/tcljava-user
Thread:
Scott Serr
Mo DeJong
Scott Serr

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved