load fails to load a .so file on Solaris/Sparc with Tcl 8.5Hi



Hi,

I downloaded the sources for Tcl/Tk 8.5.2 a couple of days ago because I wanted to upgrade the application we are developing from using Tcl/Tk 8.4 to 8.5.

Our application loads several dynamic libraries (.so files in most Unix systems) from Tcl using the load command. Unfortunatel, for the Solaris (for Sparc) version, I get an error from Tcl 8.5.

In fact, I found that I am unable to load any .so file on Solaris from Tcl 8.5, even a simple dummy one that just has one dummy procedure in it:

% load [file join . foo.so]
couldn't load file "./foo.so": ld.so.1: /homes/kish/TclTk/sparc_sunos5/bin/tclsh8.5: fatal: relocation error: file ./foo.so: symbol main: referenced symbol not found

This is the same error (missing main symbol) as the one I get from the actual .so files I want to load.

I am able to load the dynamic libraries for other platforms (I have tried Linux, both 32 and 64 bits, x86) with Tcl 8.5, and for all platforms with Tcl 8.4.

I did an nm on the so files, and it seems all the .so files in Solaris have an undefined main in them (U main), but this was not a problem for 8.4, and I certainly did not intend to have a main procedure in a library file.

Any ideas what the problem might be, and how I could work around/fix it?

Thanks in advance for any information!

--Kish Shen
.



Relevant Pages

  • Re: newbie question : How to use my nice shared library
    ... I'm new to Tcl and I want to create a C shared library. ... something easy I tried to do a lib containing only an echo function. ... Tcl's [load] enforces a certain case for the Init routine name. ... but the tcl interpreter still tells me the same ...
    (comp.lang.tcl)
  • Re: newbie question : How to use my nice shared library
    ... I'm new to Tcl and I want to create a C shared library. ... I'm getting crazy>< - How to convince this interpreter to do something ... Tcl's [load] enforces a certain case for the Init routine name. ... Without the first 3 -D Tcl_StatBuf will be a different size in Linux, ...
    (comp.lang.tcl)
  • Re: newbie question : How to use my nice shared library
    ... George Peter Staplin a écrit: ... I tried to run a tcl interpreter and type in "load malib". ...
    (comp.lang.tcl)
  • Re: finding tk version in Matrix 10.6
    ... But in a normal Tcl shell you would use 'package require Tk' to load ... If you simply want to use load and its the same command as in a normal ... can't invoke "winfo" command: application has been destroyed ...
    (comp.lang.tcl)
  • Re: newbie question : How to use my nice shared library
    ... George Peter Staplin a écrit: ... I tried to run a tcl interpreter and type in "load malib". ... I'm getting crazy>< - How to convince this interpreter to do something useful instead of displaying stupid error messages? ...
    (comp.lang.tcl)