You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On macOS, when I installed using "opam install labltk" this linked against Apple's version of Tk which honestly isn't very good.
To use the better version I installed using "brew install tcl-tk", I had to run "opam uninstall labltk" again (which probably left its dependencies in place), then the following commands in a git clone of this repo (these are a slightly-extended version of what "opam show --raw labltk" gave):
./configure -use-findlib -verbose -installbindir $HOME/.opam/5.0.0+flambda/bin -tkdefs -I/opt/homebrew/opt/tcl-tk/include -tklibs -L/opt/homebrew/opt/tcl-tk/lib -tk-no-x11
make library opt
make install
This worked, but I was wondering if there was a nicer way to do this with some options to opam?
If it helps, you can set PKG_CONFIG_PATH=/opt/homebrew/opt/tcl-tk/lib/pkgconfig:$PKG_CONFIG_PATH then pkg-config --cflags tk gives the required value for -tkdefs above; and pkg-config --libs tk give the equivalent of LDFLAGS in make (i.e. library search directory for -tklibs and required libraries).
The text was updated successfully, but these errors were encountered:
ecky-l
added a commit
to ecky-l/labltk
that referenced
this issue
Sep 6, 2023
…ment (if set)
This is useful for compiling against a non-default Tk when the flags -tkdefs/-tklibs cannot
be set explicitly for some reason. I.e. when installing via opam (and in particular on macOS
with a homebrew installation of tcl-tk).
For instance, do:
$ export TK_DEFS='-I/usr/local/Cellar/tcl-tk/8.6.13_5/include/tcl-tk'
$ export TK_LIBS='-L/usr/local/Cellar/tcl-tk/8.6.13_5/lib -ltk8.6 -ltkstub8.6 -ltcl8.6 -ltclstub8.6'
before
$ opam install labltk
See also garrigue#18
On macOS, when I installed using "opam install labltk" this linked against Apple's version of Tk which honestly isn't very good.
To use the better version I installed using "brew install tcl-tk", I had to run "opam uninstall labltk" again (which probably left its dependencies in place), then the following commands in a git clone of this repo (these are a slightly-extended version of what "opam show --raw labltk" gave):
./configure -use-findlib -verbose -installbindir $HOME/.opam/5.0.0+flambda/bin -tkdefs -I/opt/homebrew/opt/tcl-tk/include -tklibs -L/opt/homebrew/opt/tcl-tk/lib -tk-no-x11 make library opt make install
This worked, but I was wondering if there was a nicer way to do this with some options to opam?
If it helps, you can set
PKG_CONFIG_PATH=/opt/homebrew/opt/tcl-tk/lib/pkgconfig:$PKG_CONFIG_PATH
thenpkg-config --cflags tk
gives the required value for -tkdefs above; andpkg-config --libs tk
give the equivalent of LDFLAGS in make (i.e. library search directory for -tklibs and required libraries).The text was updated successfully, but these errors were encountered: