Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2024-10-17
16:52 • Closed ticket [3d6d752352]: libraries not installed if configured with zipfs... artifact: b7b233f577 user: yarda
14:33 • Ticket [3d6d752352]: 3 changes artifact: b2fe9a362a user: apnadkarni
13:28 • Ticket [3d6d752352]: 3 changes artifact: 2c93bf6a9b user: jan.nijtmans
13:24 • Ticket [3d6d752352]: 3 changes artifact: 42e2ef5a35 user: jan.nijtmans
11:59 • Ticket [3d6d752352]: 3 changes artifact: d0fddaed2b user: yarda
11:38 • Ticket [3d6d752352]: 3 changes artifact: d262419ee7 user: yarda
11:27 • Ticket [3d6d752352]: 3 changes artifact: f8ecb0ebef user: yarda
2024-10-16
12:27 • Ticket [3d6d752352]: 4 changes artifact: a462e8e70e user: oehhar
2024-10-15
23:04 • Ticket [3d6d752352]: 3 changes artifact: f50242eba4 user: yarda
22:15 • New ticket [3d6d752352]. artifact: 9fcf0ebcee user: yarda

libraries not installed if configured with zipfs

Closed / Invalid3d6d7523525d19ffe95109e08a90f2413c956f82Created 2 years agoUpdated 2 years ago
Descriptionplain2024-10-15 22:15:53
If configured with zipfs, targets install-libraries and install-msgs aren't added to the install target, thus the following command has to be run to install it all:
# make install install-libraries install-msgs

Is it expected?
yardaplain2024-10-15 23:04:58
Linux x86_64, Fedora Rawhide (f42).
oehharwiki2024-10-16 12:27:50

I suppose, all this is now in the zip attached to the tcl dll library file.

Check, if tclsh finds the missing content without those installations.

Harald

yardaplain2024-10-17 11:27:39
I am afraid, I don't understand. I am Fedora packager and I am building distro package from the sources. With Tcl 8.6 the library was installed, with Tcl 9.0.0 it is not installed. I was unable to find any related note regarding it. It also seems on Windows it's installed. I suspect the following lines in the configure script:

if test "${ZIPFS_BUILD}" = 1; then
    if test "${SHARED_BUILD}" = 0; then
       ZIPFS_BUILD=2;

printf "%s\n" "#define ZIPFS_BUILD 2" >>confdefs.h

     else

printf "%s\n" "#define ZIPFS_BUILD 1" >>confdefs.h
\
    fi
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
INSTALL_LIBRARIES=install-libraries
INSTALL_MSGS=install-msgs
fi

If I am not mistaken if ZIPFS_BUILD is 1 then the INSTALL_LIBRARIES and INSTALL_MSGS aren't set and later in the Makefile:

INSTALL_BASE_TARGETS = install-binaries $(INSTALL_LIBRARIES) $(INSTALL_MSGS) $(INSTALL_TZDATA)
...
INSTALL_TARGETS = $(INSTALL_BASE_TARGETS)...
install: $(INSTALL_TARGETS)

So it's not installed.
yardaplain2024-10-17 11:38:16
And it seems it's not built-in. If I manually remove it:
# rm -f /usr/share/tcl9.0/init.tcl
# tclsh
application-specific initialization failed: Cannot find a usable init.tcl in the following directories: 
    {} /usr/share/tcl9.0 /usr/lib/tcl9.0 /lib/tcl9.0 /usr/library /library /tcl9.0/library /tcl9.0.0/library /tcl9.0.0/library



This probably means that Tcl wasn't installed properly.

%

The build log is here:
https://download.copr.fedorainfracloud.org/results/jskarvad/TclTK9.0.0/fedora-rawhide-x86_64/08144852-tcl/builder-live.log.gz
yardaplain2024-10-17 11:59:09
The same result with build without Fedora downstream patches.
jan.nijtmanswiki2024-10-17 13:24:43

Looking at the log:

find-debuginfo: starting
Extracting debug info from 2 files
objcopy: unable to copy file '/builddir/build/BUILD/tcl-9.0.0-build/BUILDROOT/usr/lib64/libtcl9.0.so'; reason: Permission denied
objcopy: unable to copy file '/builddir/build/BUILD/tcl-9.0.0-build/BUILDROOT/usr/lib64/libtcl9.0.so'; reason: Permission denied
DWARF-compressing 2 files
My guess is that "find-debuginfo" strips the debug info from libtcl9.0.so. If it does, it will strip the attached zip-file as well.

You can re-add the zip-file after this processing with something like:

cat /builddir/build/BUILD/tcl-9.0.0-build/tcl9.0.0/unix/libtcl9.0.0.zip >>/builddir/build/BUILD/tcl-9.0.0-build/BUILDROOT/usr/lib64/libtcl9.0.so
zip -A /builddir/build/BUILD/tcl-9.0.0-build/BUILDROOT/usr/lib64/libtcl9.0.so

The first command appends the zip-file to the shared library. The second command updates the offsets. This zip-file contains the "init.tcl" and the other required files, so they don't need to be installed separately any more. They simply became part of libtcl9.0.so

Hope this helps, Jan Nijtmans

jan.nijtmanswiki2024-10-17 13:28:40

Another remark (looking at the logs):

Please install the fedora package for libtommath as well. Tcl will then use it in stead of its internal libtommath subset.

Hope this helps, Jan Nijtmans

apnadkarnimarkdown2024-10-17 14:33:07

Distributions that prefer the 8.x layout without an embedded ZIP file may possibly find a build with --disable-zipfs to be more suitable.

yardaplain2024-10-17 16:52:45
Thanks for the info, I can confirm that if built outside of the Fedora build system it works. In Fedora build system (koji/copr over rpmbuild) it doesn't work even if the stripping is explicitly disabled. I will open related Fedora ticket. Sorry for the noise.
Log in (anonymous is fine) to add a comment.