Skip to content
Tcl Source Code View Ticket
Login

View Ticket

tclsh looks for build, then LD_LIBRARY_PATH in linux

Closed / Invalid769237ffffffffffffffffffffffffffffffffffCreated 23 years agoUpdated 23 years ago
Descriptionplain2003-07-10 18:18:52
Hello,

I have a situation where I build TCL 8.4 in my local 
sandbox and then release it to another public area.  

With Sun (solaris 5.8) after setting the 
LD_LIBRARY_PATH variable to the public area, and then 
do a ldd tclsh8.4 , I get the public path.

However, when I do the same process on the Linux 
machine (Red Hat 8.0), ldd tclsh8.4 returns the sandbox 
path.  

As you can see in the clippings below, the build path is 
my home directory, whereas the desired 
LD_LIBRARY_PATH is the /projMan directory.

Here are some hopefully useful clippings: (projMan is 
public area)

ldd on sun:
>cobrajet<:  /home/r52652/cvs/projMan/RunEverything1.
0/TCL-TK/sun55/bin > ldd tclsh8.4
        libtcl8.4.so =>  /projMan/RunEverything1.0/TCL-
TK/sun55/lib/libtcl8.4.so
        libdl.so.1 =>    /usr/lib/libdl.so.1
        libsocket.so.1 =>        /usr/lib/libsocket.so.1
        libnsl.so.1 =>   /usr/lib/libnsl.so.1
        libm.so.1 =>     /usr/lib/libm.so.1
        libc.so.1 =>     /usr/lib/libc.so.1
        libmp.so.2 =>    /usr/lib/libmp.so.2
        /usr/platform/SUNW,Ultra-30/lib/libc_psr.so.1

ldd on linux:
>pls1<:  /home/r52652/cvs/projMan/RunEverything1.0/TC
L-TK/linux/bin > ldd tclsh8.4
        libtcl8.4.so 
=> /home/r52652/cvs/projMan/RunEverything1.0/TCL-
TK/linux/lib/libtcl8.4.so (0x40015000)
        libdl.so.2 => /lib/libdl.so.2 (0x400ae000)
        libm.so.6 => /lib/libm.so.6 (0x400b1000)
        libc.so.6 => /lib/libc.so.6 (0x400d3000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)


strings tclsh on linux:
>pls1<:  /home/r52652/cvs/projMan/RunEverything1.0/TC
L-TK/linux/bin > strings tclsh8.4
/lib/ld-linux.so.2
libtcl8.4.so
Tcl_Main
_DYNAMIC
Tcl_Init
Tcl_SetVar
_GLOBAL_OFFSET_TABLE_
_Jv_RegisterClasses
__gmon_start__
libdl.so.2
_LIB_VERSION
libm.so.6
libc.so.6
_IO_stdin_used
__libc_start_main
_edata
__bss_start
_end
/home/r52652/cvs/projMan/RunEverything1.0/TCL-
TK/linux/lib
_fp_hw
__libc_csu_fini
__libc_csu_init
Tcl_AppInit
__data_start
GLIBC_2.0
PTRh
QVhD
~/.tclshrc
tcl_rcFileName


strings tclsh8.4 on sun:

>cobrajet<:  /home/r52652/cvs/projMan/RunEverything1.
0/TCL-TK/sun55/bin > strings tclsh8.4
/usr/lib/ld.so.1
_environ
_etext
Tcl_AppInit
_PROCEDURE_LINKAGE_TABLE_
atexit
Tcl_Init
__register_frame_info
_end
_DYNAMIC
_GLOBAL_OFFSET_TABLE_
Tcl_Main
_edata
Tcl_SetVar
_exit
_init
_fini
_start
__deregister_frame_info
_lib_version
main
libc.so.1
SYSVABI_1.3
libtcl8.4.so
libdl.so.1
libsocket.so.1
libnsl.so.1
libm.so.1
/home/r52652/cvs/projMan/RunEverything1.0/TCL-
TK/sun55/lib
tcl_rcFileName
~/.tclshrc

thanks for your help
dgpplain2003-07-11 04:11:49
Logged In: YES 
user_id=80530


this looks like a configure/build issue.

certainly nothing to do with
Tcl's ::env array.
hobbsplain2003-07-11 06:02:29
Logged In: YES 
user_id=72656

I don't think this has anything to do with Tcl at all - Linux 
treats LD_LIBRARY_PATH differently, more as a fallback than 
a first-look.  They have other magic env vars to control 
things like Solaris does.  IMO this is a bug, but it is doc'ed 
that way on linux.
r0arkplain2003-07-11 22:56:40
Logged In: YES 
user_id=138421

Ahh.  Yes, I was not sure on what end to start first, either 
Linux or TCL.  Also, I was wondering if anybody has had this 
problem previously and have resolved it.  If I find someone, I 
will post the solution they tell me on here for the public 
record.

Thanks.
hobbs Closed ticket [769237ffff]. [History diff]2003-07-19 03:34:41
Log in (anonymous is fine) to add a comment.