| Ticket UUID: | 15d60c0d2e1940f0ede852260e9ebf294f526282 | ||
| Title: | make fails for tk8.6.16 on macOS | ||
| Type: | Bug | Created on: | 2025-07-24 14:14:33 |
| Submitter: | f_phan | Assigned to: | nobody |
| Subsystem: | 69. Other | Severity: | Severe |
| Priority: | 5 Medium | Last modified: | 2025-08-05 04:09:39 |
| Status: | Open | Closed by: | nobody |
| Resolution: | None | Closed on: | |
| Version: | 8.6.16 | ||
| Description: | ||||
Built and installed tcl8.6.16 on macOS Monterey.
Then tried to build tk8.6.16:
% tar -xzf tk8.6.16-src.tar.gz
% cd tk8.6.16/unix
% ./configure --prefix=/usr/local/tcl8.6.16 --with-tcl=/usr/local/tcl8.6.16/lib --enable-framework --enable-aqua
% make -j8
% sudo make install
.
.
.
application-specific initialization failed: Can't find a usable init.tcl in the following directories:
/usr/local/lib/tcl8.6 /usr/local/lib/tcl8.6 /usr/lib/tcl8.6 /usr/local/library /usr/library /usr/tcl8.6.6/library /tcl8.6.6/library
This probably means that Tcl wasn't installed properly.
using Tk source directory tk9.0.2
verbose messages are off
scanning section Tk Applications
.
scanning section Tk Commands, version 9.0.2
shuffling ttk_widget.n to front of processing queue
shuffling options.n to front of processing queue
.........................................................................................
scanning section Tk C API, version 9.0.2
.......................................................................................
Assembling index
Rescanning 177 pages to build cross links and write out
.................................................................................................................................................................................
Done
| ||||
| User Comments: | ||||
apnadkarni added on 2025-07-25 18:00:57:
After installing tcl 8.6.16, did you try running the installed tclsh 8.6.16 and see the "Tcl wasn't installed properly error"? Or are you seeing the error only on the Tk build? f_phan added on 2025-07-27 00:35:10:
Replying to apnadkarni's 2025-07-25 18:00:57 comment: After installing tcl 8.6.16, I did not try running the installed tclsh 8.6.16. Instead, I did: % cd ../../tk8.6.16/unix % ./configure --prefix=/usr/local/tcl8.6.16 --with-tcl=/usr/local/tcl8.6.16/lib --enable-framework --enable-aqua % make -j8 % sudo make install That was when I got the message "application-specific initialization failed..." (as I described in the Description). apnadkarni added on 2025-07-27 05:54:16:
I was hoping you would try running the tclsh you installed and tell us if you are getting that error :-) It would help indicate whether the Tcl install was broken or the Tk build. If possible, attach the config.log and the make install output for both Tcl and Tk. f_phan added on 2025-07-29 21:07:20:
Please delete my comment where I copied-and-pasted the config.log for Tcl 8.6.16 (https://core.tcl-lang.org/tcl/info/702ec02400464fc7). I will attach the file for it instead. f_phan added on 2025-07-29 21:18:35:
Please delete my comment where I pasted the "sudo make install" output for Tcl 8.6.16 (https://core.tcl-lang.org/tcl/info/f4ace65d92786f34). I will attach a file for that instead. f_phan added on 2025-07-29 21:20:36:
Running /usr/local/tcl8.6.16/bin/tclsh8.6 returned only a shell prompt, no messages. I will attach files for the requested outputs. apnadkarni added on 2025-07-30 03:37:49:
I changed the title to "fails to build on macos", not unix to be accurate. Anyways, the fact that tclsh shell runs without error messages implies the Tcl build and install was fine and something is wrong with the Tk build. Looking at the logs, the build environment or configuration seems strange. For example,
I suspect previous installs or system installed libraries are somehow interfering with the paths. One thing I can suggest you try is to add the --with-tclinclude flag to the Tk configure:
That comes from my experience with mingw builds. Otherwise, I'm afraid you have to wait for someone knowledgeable about macOS builds and how it resolves libraries and include paths to speak up. f_phan added on 2025-07-30 15:24:00:
There were no previous installs of Tcl-Tk on the machine (MacBook Air). I first tried 'make install' of 9.0.2 and encountered this similar problem; see ticket: https://core.tcl-lang.org/tcl/tktview/ba4a2704d0. That's when I decided to try version 8.6.16. Both installs were strangely trying to find their own init.tcl in the directory of the other version. I have the same question as you about where the 8.6.6 is coming from. I will attach a screen shot of the directory structure. apnadkarni added on 2025-08-04 15:19:36:
I had asked if you tried including the Also those directories are your installs. Possible the system path has a 8.6.6? Anyways, I'm afraid I am out of my depth on the Mac. For all I know, I am sending you down the wrong path. Someone who has actually worked with macos might chip in. f_phan added on 2025-08-05 04:05:32:
I got an even longer failure message trying your suggestion; I ran:
% ./configure --prefix=/usr/local/tcl8.6.16 --with-tcl=/usr/local/tcl8.6.16/lib --with-tclinclude=/usr/local/tcl8.6.16/include --enable-framework --enable-aqua
After that, I ran:
% make -j8
After that, when I ran 'make install':
% sudo make install
Password:
Creating package index /Library/Frameworks/Tk.framework/Versions/8.6/Resources/Scripts/pkgIndex.tcl
Installing Tk to /Library/Frameworks/Tk.framework/Versions/8.6/
...
application-specific initialization failed: Can't find a usable init.tcl in the following directories:
/usr/local/lib/tcl8.6 /usr/local/lib/tcl8.6 /usr/lib/tcl8.6 /usr/local/library /usr/library /usr/tcl8.6.6/library /tcl8.6.6/library
/usr/local/lib/tcl8.6/init.tcl: version conflict for package "Tcl": have 8.6.6, need exactly 8.6.16
version conflict for package "Tcl": have 8.6.6, need exactly 8.6.16
while executing
"package require -exact Tcl 8.6.16"
(file "/usr/local/lib/tcl8.6/init.tcl" line 21)
invoked from within
"source /usr/local/lib/tcl8.6/init.tcl"
("uplevel" body line 1)
invoked from within
"uplevel #0 [list source $tclfile]"
/usr/local/lib/tcl8.6/init.tcl: version conflict for package "Tcl": have 8.6.6, need exactly 8.6.16
version conflict for package "Tcl": have 8.6.6, need exactly 8.6.16
while executing
"package require -exact Tcl 8.6.16"
(file "/usr/local/lib/tcl8.6/init.tcl" line 21)
invoked from within
"source /usr/local/lib/tcl8.6/init.tcl"
("uplevel" body line 1)
invoked from within
"uplevel #0 [list source $tclfile]"
This probably means that Tcl wasn't installed properly.
using Tk source directory tk9.0.2
verbose messages are off
scanning section Tk Applications
.
scanning section Tk Commands, version 9.0.2
shuffling ttk_widget.n to front of processing queue
shuffling options.n to front of processing queue
.........................................................................................
scanning section Tk C API, version 9.0.2
.......................................................................................
Assembling index
Rescanning 177 pages to build cross links and write out
.................................................................................................................................................................................
Done
f_phan added on 2025-08-05 04:09:39:
As to your question about system path: % echo $PATH /usr/local/bin:/usr/local/python3.13/bin:/Users/franklin/anaconda3/condabin:/Library/Frameworks/Python.framework/Versions/3.11/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin | ||||
Attachments:
- tcl-tk dir structure.png [download] added by f_phan on 2025-07-30 15:24:42. [details]
- tk8.6.16_make_install_output [download] added by f_phan on 2025-07-29 21:28:41. [details]
- tcl8.6.16_make_install_output [download] added by f_phan on 2025-07-29 21:28:05. [details]
- tk8.6.16_config.log [download] added by f_phan on 2025-07-29 21:25:51. [details]
- tcl8.6.16_config.log [download] added by f_phan on 2025-07-29 21:24:33. [details]
