Fw: Compiling and running X11 Tcl/Tk on XQuartz
Fw: Compiling and running X11 Tcl/Tk on XQuartz
- Subject: Fw: Compiling and running X11 Tcl/Tk on XQuartz
- From: K Shen <email@hidden>
- Date: Thu, 01 Mar 2018 13:06:42 +0000 (UTC)
Sorry, it looks like my replied went to Tom only. so I am forwarding this to
the mailing list as well.
On Thursday, 1 March 2018, 4:33, K Shen <email@hidden> wrote:
Hi Tom,
Thanks for your reply. I tried to build as you suggested, but was unsuccessful
- I can't find wish (or Wish.app directory) in the Tk framework that was
created, and I would prefer to build a non-framework version.
The old X11 Tk that I built on Mac OS 10.6 still runs, and that was built
without frameworks in the unix directory as I outlined. However, I want to
build Tcl/Tk 8.6 (the old version I have is 8.5). I would also like to
understand what is causing the problem - I get the same 'can't connect to
display' message when I try to run both wish 8.5 and 8.6. Does anyone know what
is causing the message? I assume it has nothing to do with xhost settings?
Cheers,
Kish Shen
On Monday, 26 February 2018, 21:59, Tom Lane <email@hidden> wrote:
K Shen <email@hidden> 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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden