|
2026-10-27
| ||
| 14:44 | • Closed ticket [17ffc49790]: Building Tcl 9.0.2 release fails when using "co... artifact: dec09a84d0 user: jan.nijtmans | |
| 13:25 | Fix [ac3ea87305] and [17ffc49790]. New option --with-system-zlib and fix out-of-tree build with "con... check-in: 0890c290ed user: jan.nijtmans tags: core-8-6-branch | |
| 12:15 | Fix [17ffc49790]: Make packages work in an out-of-tree build with "configure --srcdir=..." check-in: 2e8ab95738 user: jan.nijtmans tags: core-9-0-branch | |
| 09:45 | Fix [17ffc49790]: Make packages work in an out-of-tree build with "configure --srcdir=..." check-in: 9ac77da0c6 user: jan.nijtmans tags: trunk, main | |
|
2026-10-20
| ||
| 11:56 | • Ticket [17ffc49790] Building Tcl 9.0.2 release fails when using "configure ... artifact: 62eed7018c user: serhiy.storchaka | |
| 11:54 | Fix [17ffc49790]: an out-of-tree build with "configure --srcdir=..." failed to configure the bundled... closed check-in: 0e472d58ee user: serhiy.storchaka tags: configure-pkgs-no-srcdir | |
|
2025-10-09
| ||
| 20:31 | • Ticket [17ffc49790] Building Tcl 9.0.2 release fails when using "configure ... artifact: 4dfd0bebcf user: griffin | |
|
2025-09-27
| ||
| 02:15 | • Ticket [17ffc49790]: 3 changes artifact: 409cdb5f43 user: apnadkarni | |
| 01:24 | • Ticket [17ffc49790]: 3 changes artifact: bb4e633c4e user: griffin | |
|
2025-09-26
| ||
| 12:14 | • Ticket [17ffc49790]: 3 changes artifact: 3365abc7db user: jan.nijtmans | |
|
2025-09-25
| ||
| 21:03 | • Add attachment sdmakelog.tgz to ticket [17ffc49790] artifact: 6f80a813f2 user: griffin | |
| 21:02 | • New ticket [17ffc49790] . artifact: 3f295cb817 user: griffin | |
Building Tcl 9.0.2 release fails when using "configure --srcdir=<path> ..."
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
0890c290edFix [ac3ea87305] and [17ffc49790]. New option --with-system-zlib and fix out-of-tree build with "configure --srcdir=..." check-in2026-10-27 13:25:502e8ab95738Fix [17ffc49790]: Make packages work in an out-of-tree build with "configure --srcdir=..." check-in2026-10-27 12:15:099ac77da0c6Fix [17ffc49790]: Make packages work in an out-of-tree build with "configure --srcdir=..." check-in2026-10-27 09:45:510e472d58eeFix [17ffc49790]: an out-of-tree build with "configure --srcdir=..." failed to configure the bundled packages, since Tcl passed its own --srcdir on to their configure scripts, which then looked for their sources in the Tcl directory. Do not pass --srcdir to the packages, in unix/ and win/. check-in2026-10-20 11:54:56
I think srcdir should always be an absolute path. That should be documented somewhere (if it isn't yet)
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? :)
Just to note, there is a comment just above as to why absolute paths are not used.
# If PKG_DIR is changed to a different relative depth to the build dir, need
# to adapt the ../.. relative paths below and at the top of configure.ac (we
# cannot use absolute paths due to issues in nested configure when path to
# build dir contains spaces).
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?
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.
Fixed in [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]