| Ticket UUID: | 30e201c7111a438e2fe6aadc9d733b954874cbb9 | |||
| Title: | FreeBSD 16 (Bleeding edge) - Tcl fails to compile Shared object "libtcl9.0.so" not found | |||
| Type: | Bug | Version: | 3.0.6 | |
| Submitter: | anonymous | Created on: | 2026-06-28 17:11:46 | |
| Subsystem: | - New Builtin Commands | Assigned To: | jan.nijtmans | |
| Priority: | 5 Medium | Severity: | Important | |
| Status: | Pending | Last Modified: | 2026-07-11 20:28:30 | |
| Resolution: | Fixed | Closed By: | nobody | |
| Closed on: | ||||
| Description: |
(Reported by mookie in Tcl, moved here by APN) After compiling 9.1a1 successfully, I am struggling to compile 9.0.4 <br> Resulting in the following error message when doing the traditional ./configure and make.<br><br> checking /forest/~bench/~app_scrap/tcl9.0.4/unix/tclsh for Tcl 9... ld-elf.so.1: <br> Shared object "libtcl9.0.so" not found, required by "tclsh" <br> no <br> configure: error: cannot find a usable native Tcl 9 tclsh. Either set <br>TCLSH_NATIVE or use configure with --disable-zipfs<br> *** Error code 1<br> <br> The same error occurs with --disable-zipfs <br> 9.1a1 compiles just fine. <br><br> rm -rf /forest/~tcl ; rm -rf /forest/~bench/~app_scrap/tcl <br> ./configure --prefix=/forest/~tcl <br> make <br><br> FreeBSD 16.0-CURRENT FreeBSD 16.0-CURRENT #0 main-n286909-2c1482e30536 | |||
| User Comments: |
dgp added on 2026-07-11 20:28:30:
If you are working from fossil checkouts instead of releases, see this: https://core.tcl-lang.org/thread/wiki?name=Tracking+Thread+Sources&p mookie added on 2026-07-11 14:31:51: Sorry for the dupe reply. Could this be cosmetic? Copying the tclconfig folder from thread3.0.5 to the latest leaf (3.0.7) -- I can now make and make install. Installing package 'thread3.0.7' /bin/sh /crystal/~scrap/tcl9.1b0/pkgs/thread3.0.7/tclconfig/install-sh -c -m 644 libtcl9thread3.0.7.so /crystal/~tcl/lib/thread3.0.7/libtcl9thread3.0.7.so : /crystal/~tcl/lib/thread3.0.7/libtcl9thread3.0.7.so Install pkgIndex.tcl /crystal/~tcl/lib/thread3.0.7 Installing header files in /crystal/~tcl/include Installing /crystal/~scrap/tcl9.1b0/pkgs/thread3.0.7/generic/tclThread.h Installing documentation in /crystal/~tcl/share/man Installing /crystal/~scrap/tcl9.1b0/pkgs/thread3.0.7/doc/man/thread.n Installing /crystal/~scrap/tcl9.1b0/pkgs/thread3.0.7/doc/man/tpool.n Installing /crystal/~scrap/tcl9.1b0/pkgs/thread3.0.7/doc/man/tsv.n Installing /crystal/~scrap/tcl9.1b0/pkgs/thread3.0.7/doc/man/ttrace.n % package require Thread 3.0.7 Many thanks. mookie added on 2026-07-11 14:02:18: Sorry for the delay. It compiles however upon make install I receive: /bin/sh: cannot open /crystal/~scrap/tcl9.1b0/pkgs/thread-20260710164155-c51efe5dca/tclconfig/install-sh: No such file or directory *** Error code 127 Using the latest leaf check-in: c51efe5dca apnadkarni added on 2026-07-08 08:57:25: Jan, sorry I mistakenly re-opened the ticket earlier. I do think though the better option is to remove the zipfs option entirely. There is no benefit to it in practice and if it was originally introduced for testing zipfs features, that is better left to the test suite (Tk is actually a test in itself I think). If an extension wants to attach zips for whatever reason, they can devise their own method. I'll defer to your judgement though. apnadkarni added on 2026-07-08 08:53:16: @mookie, thread was reverted to 3.0.5 in the 9.1b0 release due to the LD_LIBRARY_PATH issue. Looks like Jan haş a fix in the thread trunk. Could you check against thread trunk and see if you still have issues? mookie added on 2026-07-04 23:58:49: Using apnadkarni's workaround: LD_LIBRARY_PATH=`pwd` make -- also now fails too. $ LD_LIBRARY_PATH=`pwd` make install Installing package 'thread3.0.6' /bin/sh: cannot open /forest/crystal_forest/~bench/~app_scrap/tcl9.1b0/pkgs/thread3.0.6/tclconfig/install-sh: No such file or directory *** Error code 127 Stop. make[1]: stopped making "install" in /forest/crystal_forest/~bench/~app_scrap/tcl9.1b0/unix/pkgs/thread3.0.6 *** Error code 1 Stop. make: stopped making "install" in /forest/crystal_forest/~bench/~app_scrap/tcl9.1b0/unix mookie added on 2026-07-04 23:45:27:
Tcl9.1.b0 -- Now does compile, is thread version suppose to be 3.0.5 ? jan.nijtmans added on 2026-07-03 10:37:53: I [9411fd1e8fbb68c9|finished the work], handling LD_LIBRARY_PATH as it (IMHO) should be handled. It's in thread 'trunk' now. Can someone confirm this works on FreeBSD (and any other platform) now? Then - I think - this ticket can be closed. fgaz__ added on 2026-07-02 16:02:20: @jan.nijtmans yes your patch fixes the problem for me (when using --disable-zipfs) jan.nijtmans added on 2026-07-01 15:17:19: Looking at the 'bug-30e201c7' branch, I think it would be better to prepend to LD_LIBRARY_PATH in stead of replacing the value. It might be that tclsh has other dependencies (like zlib or libtommath) which might be not in the standard include path but reachable though LD_LIBRARY_PATH. I won't be 100% failsafe, but could be workable in practice. oehhar added on 2026-07-01 12:10:34: The mentioned naviserver segfault is probably here: https://github.com/naviserver-project/naviserver/issues/19 Magic-Gustaf has fixed it... jmroot added on 2026-07-01 07:30:15: Essentially the same thing happens on macOS (except it of course complains about libtcl9.0.dylib). Disabling zipfs is effective as a workaround. LD_LIBRARY_PATH is not supported by macOS (DYLD_LIBRARY_PATH both has different semantics and is essentially unusable on recent macOS versions due to SIP). Linking the uninstalled tclsh to libtcl using one of the @xxx variables supported by dyld may be an option. jan.nijtmans added on 2026-06-30 08:50:02: > As far as I can see --disable-zipfs does not work ... So, does [db215a0bedcfb697|this] help? fgaz__ (claiming to be fgaz) added on 2026-06-30 06:52:41: I have the same issue on NixOS. As far as I can see --disable-zipfs does not work because in configure.ac ZIPFS_BUILD can remain unset if this condition is false. Then, here an unset ZIPFS_BUILD makes the condition true. I was able to fix the issue by explicitly defaulting ZIPFS_BUILD=0 before the first condition. apnadkarni added on 2026-06-29 16:52:33: I have committed two potential fixes for this issue: 1. bug-30e201c7-nozipfs changes the default thread build to not zip the scripts (--disable-zipfs becomes the default). configure --enable-zipfs will fail unless Tcl9 is installed somewhere on the PATH. I think this is what Schelte suggested. 2. bug-30e201c7 contains the LD_LIBRARY_PATH=tcl/build/area fix as discussed in the meeting. I have little confidence in my shell scripting skills so definitely needs a thourough review given the multiple levels of substitutions and quoting between M4, shell and make. I would recommend option 1 as safer and more robust the one caveat being that the OP mentioned in the original ticket that --disable-zipfs showed the same error. I suspect pilot error or not a clean build. Have tested the following on Ubuntu and Windows MinGW after ensuring there was no existing Tcl 9 on the path. Have no ability to test on macos. cd tcl/unix/build && configure --prefix=/tcl/install/path make test make install /tcl/install/path/tclsh thread/test/all.tcl And on an independent checkout of thread workarea ../configure --with-tcl=/home/apnadkarni/tcl/9.0.3/x64/lib --with-tclinclude=/home/apnadkarni/tcl/9.0.3/x64/include make -s make test make install mookie added on 2026-06-28 18:00:05:
Many thanks. Skipping the alternative, I can confirm that your workaround with LD_LIBRARY_PATH is now compiling. apnadkarni added on 2026-06-28 17:31:20: The other alternative is to set TCLSH_NATIVE to point to a native tclsh 9 shell if one is available (probably the better alternative). TCLSH_NATIVE=/path/to/a/tcl9/shell make apnadkarni added on 2026-06-28 17:19:32: (Moved from https://core.tcl-lang.org/tcl/tktview/6a99f82e) Can you try building as LD_LIBRARY_PATH=`pwd` make and let me know if that works. | |||
Home
Timeline
Branches
Tags
Tickets
Wiki