K Shen <[email protected]> writes:
> I have been building the X11 version of Tcl/Tk, on  Mac OS 10.6 with the 
> Apple supplied X11 without problems. 
> However, since updating my Mac OS to 10.12, and installing XQuartz, I have 
> not been able to get the X11 version of Tk to run:
> bash-3.2$ ./wishapplication-specific initialization failed: couldn't connect 
> to display 
> "/private/tmp/com.apple.launchd.gvNP4b1seM/org.macosforge.xquartz:0"
> I have XQuartz running - in fact I ran the above from a xterm. 
> Does anyone know what the problem is? The old X11 Tk (wish) that I built on 
> 10.6 and Apple's X11 did run on XQuartz, as do other X11 applications that I 
> downloaded prior to the update.
> To build the X11 version of Tcl/Tk, I build it in the unix directory rather 
> than macosx directory (which builds the native Aqua version). I configure 
> with --with-x --disable-framework --enable-aqua=no options.

Hmm, dunno if that's the right build approach.  I attach my notes from the
last time I built Tcl/Tk on my Mac (which seems to have been 2014, so this
is pre-Sierra, but I doubt anything relevant has changed).  Note that the
notes mention removing --enable-xft, which I wanted to do but you might
not, in which case ignore that.  I can attest that the result works with
XQuartz, because I use it that way regularly.

                        regards, tom lane


Installing Tcl/Tk 8.5.16                from http://www.tcl.tk/

Want an X11-enabled Tk, so have to roll my own ...

Beware that default build will try to install a framework into /Library,
overwriting the Aqua-enabled Tcl/Tk supplied with Snow Leopard!
Don't think we want that.

Also note that running configure by hand is useless because macosx makefile
re-runs it.  The makefile absolutely insists on doing the build in
../../build; it further doesn't seem to want to not build a framework.
I've chosen to make it install into ~/tcl8.5 and $HOME/Library/Frameworks,
which at least avoids needing sudo to install, so that any shenanigans of that
sort should fail.  Note that there is zero value in installing into, say,
~/tcl8.5.14 because the installed executable depends on the framework,
which is installed into a subdir named only after 8.5.

gross:  --enable-xft is hardwired into the X11 path in tk.../macosx/GNUmakefile;
must edit that out by hand (we want this because xft sucks).  In fact,
replace it like so:

-override CONFIGURE_ARGS := ${CONFIGURE_ARGS} --enable-xft
+override CONFIGURE_ARGS := ${CONFIGURE_ARGS} --x-includes=/opt/X11/include 
--x-libraries=/opt/X11/lib

(these extra arguments are *necessary* as of Yosemite because there's no
longer any /usr/X11 symlink).

Having done so, build tcl in macosx subdirectory:

        make TK_X11=1 PREFIX=/Users/tgl/tcl8.5 
INSTALL_PATH=/Users/tgl/Library/Frameworks 
APPLICATION_INSTALL_PATH=/Users/tgl/Applications/Utilities
        make test               (optional)
        make TK_X11=1 PREFIX=/Users/tgl/tcl8.5 
INSTALL_PATH=/Users/tgl/Library/Frameworks 
APPLICATION_INSTALL_PATH=/Users/tgl/Applications/Utilities install
        (do NOT omit variables during "make install", it will fail)

Build/install tk just as above; but note that we seem to have to do
"make install" before "make test".

8.5.16 tcl passes all non-skipped tests, probably don't need to worry about
that ... tk reports failure in quite a few tests, and moreover it's basically
impossible to use the machine while those tests run.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription: 
https://lists.apple.com/mailman/options/x11-users/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to