Re: TCL in a chroot

2015-12-28 Thread dan mclaughlin
On Mon, 28 Dec 2015 19:53:47 -0500 Paul Pereira <pjspere...@gmail.com> wrote:
> Has anyone had luck running tcl within a chroot? I have the required
> libraries reported by ldd in place, but the interpreter cannot find
> them.
> 
> # chroot /var/www /usr/local/bin/tclsh8.5
> /usr/local/bin/tclsh8.5: can't load library 'libtcl85.so.1.7'
> 
> # ldd `which tclsh8.5`
> /usr/local/bin/tclsh8.5:
> StartEnd  Type Open Ref GrpRef Name
> 1a646000 3a64a000 exe  10   0  /usr/local/bin/tclsh8.5
> 0c0e6000 2c105000 rlib 01   0  /usr/local/lib/libtcl85.so.1.7
> 0a26d000 2a276000 rlib 02   0  /usr/lib/libm.so.9.0
> 0ce86000 2cea4000 rlib 01   0  /usr/lib/libc.so.80.1
> 02688000 02688000 rtld 01   0  /usr/libexec/ld.so
> 
> # ls /var/www/usr/local/lib/libtcl85.so.1.7
> /var/www/usr/local/lib/libtcl85.so.1.7
> 
> Regards,
> Paul
> 

have you run ldconfig?

i do the following to set up my chroots (_jailroot=/var/www in your case)

sudo mkdir $_jailroot/{sbin,usr/libexec}
sudo cp -p /sbin/ldconfig $_jailroot/sbin
sudo cp -p /usr/libexec/ld.so $_jailroot/usr/libexec
sudo chroot $_jailroot ldconfig /usr/{,X11R6,local}/lib

that should create /var/www/var/run/ld.so.hints which aids the linker in
locating the shared libs.



Re: TCL in a chroot

2015-12-28 Thread Paul Pereira
> have you run ldconfig?
...
> that should create /var/www/var/run/ld.so.hints which aids the linker in
> locating the shared libs.

Thanks Dan, I hadn't.



TCL in a chroot

2015-12-28 Thread Paul Pereira
Has anyone had luck running tcl within a chroot? I have the required
libraries reported by ldd in place, but the interpreter cannot find
them.

# chroot /var/www /usr/local/bin/tclsh8.5
/usr/local/bin/tclsh8.5: can't load library 'libtcl85.so.1.7'

# ldd `which tclsh8.5`
/usr/local/bin/tclsh8.5:
StartEnd  Type Open Ref GrpRef Name
1a646000 3a64a000 exe  10   0  /usr/local/bin/tclsh8.5
0c0e6000 2c105000 rlib 01   0  /usr/local/lib/libtcl85.so.1.7
0a26d000 2a276000 rlib 02   0  /usr/lib/libm.so.9.0
0ce86000 2cea4000 rlib 01   0  /usr/lib/libc.so.80.1
02688000 02688000 rtld 01   0  /usr/libexec/ld.so

# ls /var/www/usr/local/lib/libtcl85.so.1.7
/var/www/usr/local/lib/libtcl85.so.1.7

Regards,
Paul