LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Can't install tcl to $pkgdir - it tries to use its recently installed shared library (https://www.linuxquestions.org/questions/linux-from-scratch-13/cant-install-tcl-to-%24pkgdir-it-tries-to-use-its-recently-installed-shared-library-4175451158/)

Lennie 02-21-2013 01:13 PM

Can't install tcl to $pkgdir - it tries to use its recently installed shared library
 
I'm trying to install Tcl. It compiles fine and all the tests passed. But when I install it to $pkgdir it fails because it tries to use a shared library that it has just installed, and because it is installed in the pkgdir it can't find it.
Code:

==> Starting package()...
Making directory /home/packages/pkgbuilds/tcl/pkg/usr/lib
Making directory /home/packages/pkgbuilds/tcl/pkg/usr/bin
Installing libtcl8.6.so to /home/packages/pkgbuilds/tcl/pkg/usr/lib/
Installing tclsh as /home/packages/pkgbuilds/tcl/pkg/usr/bin/tclsh8.6
Installing tclConfig.sh to /home/packages/pkgbuilds/tcl/pkg/usr/lib/
Installing tclooConfig.sh to /home/packages/pkgbuilds/tcl/pkg/usr/lib/
Installing libtclstub8.6.a to /home/packages/pkgbuilds/tcl/pkg/usr/lib/
Installing pkg-config file to /home/packages/pkgbuilds/tcl/pkg/usr/lib/pkgconfig/
Making directory /home/packages/pkgbuilds/tcl/pkg/usr/lib/tcl8.6
Making directory /home/packages/pkgbuilds/tcl/pkg/usr/lib/tcl8.6/opt0.4
Making directory /home/packages/pkgbuilds/tcl/pkg/usr/lib/tcl8.6/http1.0
Making directory /home/packages/pkgbuilds/tcl/pkg/usr/lib/tcl8.6/encoding
Making directory /home/packages/pkgbuilds/tcl/pkg/usr/lib/tcl8.6/../tcl8
Making directory /home/packages/pkgbuilds/tcl/pkg/usr/lib/tcl8.6/../tcl8/8.4
Making directory /home/packages/pkgbuilds/tcl/pkg/usr/lib/tcl8.6/../tcl8/8.4/platform
Making directory /home/packages/pkgbuilds/tcl/pkg/usr/lib/tcl8.6/../tcl8/8.5
Making directory /home/packages/pkgbuilds/tcl/pkg/usr/lib/tcl8.6/../tcl8/8.6
Installing library files to /home/packages/pkgbuilds/tcl/pkg/usr/lib/tcl8.6/
Installing package http1.0 files to /home/packages/pkgbuilds/tcl/pkg/usr/lib/tcl8.6/http1.0/
Installing package http 2.8.5 as a Tcl Module
Installing package opt0.4 files to /home/packages/pkgbuilds/tcl/pkg/usr/lib/tcl8.6/opt0.4/
Installing package msgcat 1.5.0 as a Tcl Module
Installing package tcltest 2.3.5 as a Tcl Module
Installing package platform 1.0.10 as a Tcl Module
Installing package platform::shell 1.1.4 as a Tcl Module
Installing encoding files to /home/packages/pkgbuilds/tcl/pkg/usr/lib/tcl8.6/encoding/
Making directory /home/packages/pkgbuilds/tcl/pkg/usr/lib/tcl8.6/msgs
Installing message catalog files to /home/packages/pkgbuilds/tcl/pkg/usr/lib/tcl8.6/msgs/
Installing time zone files to /home/packages/pkgbuilds/tcl/pkg/usr/lib/tcl8.6/tzdata/
./tclsh: error while loading shared libraries: libtcl8.6.so: cannot open shared object file: No such file or directory
make: *** [install-tzdata] Error 127

I tried both with the build instructions from blfs, but adjusted to pkgdir, and I also tried with the pkgbuild from Arch, which was very much the same. Both error out at the same place, with the same error. Those timezone files are not installed, there is no directory tzdata.

How to create a package of it?

Keith Hedger 02-22-2013 11:32 AM

I use a package manager and this:
Code:

        cd unix
        sed -i '/sprintf(installLib/s:"lib:&64:' tclUnixInit.c
        sed -i -e '/TCL_PACKAGE_PATH=/s:=.*:="/usr/lib64":' -e "/^TCL_LIBRARY=/s:=.*:='/usr/lib64/tcl\$(VERSION)':" configure
        ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/libexec --libdir=/usr/lib${LIBDIRSUFFIX} --enable-threads
        make || exit 1
        make install DESTDIR=$PKG || exit 1
        make install-private-headers DESTDIR=$PKG || exit 1
        ln -v -sf tclsh8.5 $PKG/usr/bin/tclsh

works for me ( PKG is in this case /tmp/tcl, and LIBDIRSUFFIX=64 ), this is version 8.5.7

Lennie 02-22-2013 12:15 PM

Maybe something is wrong in the Makefile of Tcl-8.6.0. I tried with 8.5.13 (the latest 8.5.x) It did install to the pkgdir, but something was wrong with the sed command. (I used Arch's pkgbuild, which put the sed command last.)

The version 8.5.7 is quite old, from 2009, so I prefer to use a newer version. I don't understand what the sed command is for (I know it changes the text in a file), and if I need to use another sed command for a different version. Maybe someone can help me with this?

Lennie 02-23-2013 04:13 AM

For now I installed both tcl and tk (8.6.0) with configure option "--without-tzdata". I'm not really satisfied with this solution, I don't know if I will need tzdata for something. I leave the thread open for yet some time, in case someone has a better solution.

Lennie 02-24-2013 03:54 AM

I recompiled Tcl (and Tk), with the configure options from the blfs book, when I had it installed, and now it worked. It seems Tcl depends on itself...


All times are GMT -5. The time now is 10:42 AM.