Tcl Source Code

View Ticket
Login
Ticket UUID: 3d6d7523525d19ffe95109e08a90f2413c956f82
Title: libraries not installed if configured with zipfs
Type: Bug Version: 9.0.0
Submitter: yarda Created on: 2024-10-15 22:15:53
Subsystem: 53. Configuration and Build Tools Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2024-10-17 16:52:45
Resolution: Invalid Closed By: yarda
    Closed on: 2024-10-17 16:52:45
Description:
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?
User Comments: yarda added on 2024-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.

apnadkarni added on 2024-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.


jan.nijtmans added on 2024-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


jan.nijtmans added on 2024-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


yarda added on 2024-10-17 11:59:09:
The same result with build without Fedora downstream patches.

yarda added on 2024-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

yarda added on 2024-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.

oehhar added on 2024-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


yarda added on 2024-10-15 23:04:58:
Linux x86_64, Fedora Rawhide (f42).