| Ticket UUID: | 17ffc49790fadbc4f515aa0b01f123e75f9fad26 | ||
| Title: | Building Tcl 9.0.2 release fails when using "configure --srcdir=<path> ..." | ||
| Type: | Bug | Created on: | 2025-09-25 21:02:03 |
| Submitter: | griffin | Assigned to: | jan.nijtmans |
| Subsystem: | 53. Configuration and Build Tools | Severity: | Important |
| Priority: | 5 Medium | Last modified: | 2026-10-27 14:44:39 |
| Status: | Closed | Closed by: | jan.nijtmans |
| Resolution: | Fixed | Closed on: | 2026-10-27 14:44:39 |
| Version: | 9.1.0 | ||
| Description: | ||||
Building Tcl 9.0.2 release, complete with pkg complement, fails to build packages when using:
"configure --srdir=<path> ..."
The configure srcdir value is not propagated to the pkgs components.
To reproduce:
tar xzf tcl9.0.2-src.tar.gz
mkdir empty
cd empty
../tcl9.0.2/unix/configuration --srcdir=../tcl9.0.2 --prefix=../foobar
make install
.
. (long transcript)
.
checking whether byte ordering is bigendian... no
configure: error: could not find source file 'itcl2TclOO.c'
make: *** [Makefile:2048: configure-packages] Error 1
| ||||
| User Comments: | ||||
jan.nijtmans added on 2025-09-26 12:14:36:
I think srcdir should always be an absolute path. That should be documented somewhere (if it isn't yet) griffin added on 2025-09-27 01:24:16:
Good point Jan, but I don't believe that is the problem. The problem appears to be in Tcl. The Makefile target configure-packages has a literal relative path: ... configure ... --with-tcl=../.. ... When replaced with an absolute path, the problem is resolved. This code is in the Makefile.in file, so nothing passed in to configure is going to change it. It would be good if someone more familiar with this area could fashion a fix, or supply considerations for fashioning a fix. can I add [file normalize ../..] here? :) apnadkarni added on 2025-09-27 02:15:06:
Just to note, there is a comment just above as to why absolute paths are not used.
griffin added on 2025-10-09 20:31:00:
In this scenario, the source directory is not the same as the build directory. That is the purpose of --srcdir. I believe --srcdir= needs to be an absolute path. It's not clear to me what --with-tcl needs to be. One problem is that --srcdir is not passed down to the pkgs' configure. The pkgs need this too. Isn't --with-tcl redundant or conflicting with --src-dir? serhiy.storchaka added on 2026-10-20 11:56:31:
Reproduced with an out-of-tree build of the current main with Thread and Itcl in pkgs/: .../unix/configure --srcdir=.../unix, then make fails in configure-packages with "cannot find sources () in .../unix". The relative --with-tcl=../.. is not the problem: Tcl passes its own --srcdir on to each package's configure (in PKG_CFG_ARGS), so the package looks for its sources in Tcl's unix directory. The packages do not need it, since their configure scripts are run by absolute path. Proposed fix in branch configure-pkgs-no-srcdir: do not pass --srcdir to the packages, in unix/configure.ac and also in win/configure.ac, which had the same problem (there the package configure failed silently). With it, out-of-tree builds with a relative or absolute --srcdir, or without it, build Thread and Itcl, and make install installs them; also checked with a MinGW cross build. Note that --srcdir must point to the unix (or win) directory, not to the top of the source tree as in the original report. jan.nijtmans added on 2026-10-27 14:44:39:
Fixed in [9ac77da0c6|trunk], core-9-0-branch and core-8-6-branch Many thanks! | ||||
Attachments:
- sdmakelog.tgz [download] added by griffin on 2025-09-25 21:03:11. [details]
