garrigue / labltk Goto Github PK
View Code? Open in Web Editor NEWLablTk, an OCaml interface for Tcl/Tk
Home Page: https://garrigue.github.io/labltk/
License: Other
LablTk, an OCaml interface for Tcl/Tk
Home Page: https://garrigue.github.io/labltk/
License: Other
File "typecheck.ml", line 120, characters 10-32:
120 | Typemod.type_structure !env pstr Location.none in
^^^^^^^^^^^^^^^^^^^^^^
Error: This function has type
Env.t ->
Parsetree.structure ->
Typedtree.structure * Types.signature * Typemod.Signature_names.t *
Env.t
It is applied to too many arguments; maybe you forgot a `;'.
Version: 8.06.9
OS: FreeBSD 13
I can configure without errors, but then I cannot make all due to a C error:
someone:labltk-8.06.4 someone$ ./configure -tkdefs '-I/Library/Frameworks/Tcl.framework/Versions/8.6/Headers/ -I/Library/Frameworks/Tk.framework/Versions/8.6/Headers/' -tklibs '-framework Tcl -framework Tk' -tk-no-x11
Configuring LablTk...
tcl.h and tk.h version 8.6 found with "-I/Library/Frameworks/Tcl.framework/Versions/8.6/Headers/ -I/Library/Frameworks/Tk.framework/Versions/8.6/Headers/".
Tcl/Tk libraries found.
** Configuration summary **
Configuration for the "labltk" library:
use tcl/tk version ....... 8.6
options for compiling .... -I/Library/Frameworks/Tcl.framework/Versions/8.6/Headers/ -I/Library/Frameworks/Tk.framework/Versions/8.6/Headers/
options for linking ...... -framework Tcl -framework Tk
use native compilers ..... yes
someone:labltk-8.06.4 someone$ make all
cd support; /Applications/Xcode.app/Contents/Developer/usr/bin/make
gcc -I/usr/local/lib/ocaml/caml -I/Library/Frameworks/Tcl.framework/Versions/8.6/Headers/ -I/Library/Frameworks/Tk.framework/Versions/8.6/Headers/ -c cltkEval.c
cltkEval.c:49:19: error: expression is not assignable
Field(res, 0) = str;
~~~~~~~~~~~~~ ^
cltkEval.c:50:19: error: expression is not assignable
Field(res, 1) = oldres;
~~~~~~~~~~~~~ ^
2 errors generated.
make[1]: *** [cltkEval.o] Error 1
make: *** [all] Error 2
Any help would be appreciated.
Looks like there are missing some dependencies.
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/labltk-8.06.13/compiler'
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/labltk-8.06.13/labltk'
cd ..; /usr/bin/ocamlrun compiler/tkcompiler -outdir labltk
the file 'compiler/tkcompiler' has not the right magic number: expected Caml1999X032, got AF`D▒▒A
make[1]: *** [Makefile.gen:26: _tkgen.ml] Error 127
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/labltk-8.06.13/labltk'
make: *** [Makefile:44: libraryopt] Error 2
make: *** Waiting for unfinished jobs....
As long as make is executed with -j1
everything is OK.
Hello,
I am trying to install labltk 8.06.4 for OCaml 4.06.0 via Opam on Ubuntu 17.10. After running opam install labltk
, I get this error:
### stderr ###
# cltkCaml.c:19:10: fatal error: tcl.h: No such file or directory
# #include <tcl.h>
# ^~~~~~~
# compilation terminated.
# make[1]: *** [cltkCaml.o] Error 1
# make: *** [all] Error 2
=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The following actions failed
∗ install labltk 8.06.4
No changes have been performed
=-=- labltk.8.06.4 troubleshooting =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=> This package requires Tcl/Tk with its development packages installed on your
system
However, the file in question is installed on the system:
$ ls /usr/include/tcl
tclDecls.h tclOO.h tclTomMathDecls.h tk.h
tcl.h tclPlatDecls.h tclTomMath.h tkPlatDecls.h
tclOODecls.h tcl-private tkDecls.h tk-private
My guess would be that it's not recursively searching the subdirectories of /usr/include
. But I don't think that can be an opam issue; I was able to install lablgtk just fine and its libraries are also stored in a subdirectory of /usr/include
.
Note that labltk does install okay via the system's package manager, but the system's libraries are somewhat outdated so I prefer to have everything installed via opam.
Hi,
Implemetation of camltkwrap is not installed since support/Makefile filters only the cmx/i/o
that correspond to public mli, e.g. for .cmx the rule is:
ocamlfind install labltk -add $(PUBMLI:.mli=.cmx) -optional tkthread.cmx tkthread.$(O)
It makes it impossible to use Camltk features that are just aliases to Camltkwrap.
In particular Camltk.Textvariable:
# Camltk.Textvariable.create();;
Error: The module Camltk.Textvariable is an alias for module Camltkwrap.Textvariable, which is missin
Copying camltkwrap.cmx/cmo/cmi to install dir solved the problem
regards
Pascal
The beta release of OCaml 4.10 is around the corner, and currently, the latest version of ocamlbrowser does not support 4.10 and fails with the following error message:
#=== ERROR while compiling ocamlbrowser.4.08.1 ================================#
# context 2.0.5 | linux/x86_64 | ocaml-variants.4.10.0+trunk | file:///home/opam/opam-repository
# path ~/.opam/4.10.0+trunk/.opam-switch/build/ocamlbrowser.4.08.1
# command /usr/bin/make all
# exit-code 2
# env-file ~/.opam/log/ocamlbrowser-6-d8393c.env
# output-file ~/.opam/log/ocamlbrowser-6-d8393c.out
### output ###
# [...]
# /home/opam/.opam/4.10.0+trunk/bin/ocamlc.opt -c -warn-error A-3 -I ../labltk -I ../lib -I ../support -I +compiler-libs fileselect.ml
# /home/opam/.opam/4.10.0+trunk/bin/ocamlc.opt -c -warn-error A-3 -I ../labltk -I ../lib -I ../support -I +compiler-libs searchid.mli
# /home/opam/.opam/4.10.0+trunk/bin/ocamlc.opt -c -warn-error A-3 -I ../labltk -I ../lib -I ../support -I +compiler-libs searchid.ml
# File "searchid.ml", line 281, characters 47-51:
# 281 | try match find_module (lookup_module ~load:true mlid !start_env) !start_env
# ^^^^
# Error: The function applied to this argument has type
# ?use:bool -> loc:Location.t -> Path.t * Types.module_declaration
# This argument cannot be applied with label ~load
# make[1]: *** [Makefile.shared:35: searchid.cmo] Error 2
# make[1]: Leaving directory '/home/opam/.opam/4.10.0+trunk/.opam-switch/build/ocamlbrowser.4.08.1/browser'
# make: *** [Makefile:25: all] Error 2
opam-builder fails to build labltk on 4.05 with the following error message (see the full log):
Error: Error on dynamically loaded library: ../support/dlllabltk.so: ../support/dlllabltk.so: undefined symbol: convert_flag_list
Do you know whether this is a labltk issue? (It could be a more obscure packaging or opam-builder-environment issue, although labltk.8.06.2 builds correctly on 4.04). Can you build under 4.05 on your own machine?
support/cltkDMain.c
seems to be an unused file. It also appears to be syntactically incorrect.
Now that ocamlforge is largely dead, is this the official repository for the software?
While trying to install labltk via opam, I received this error message (Some excerpts) :
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><> 🐫
[ERROR] The compilation of labltk failed at "/Users/myname/.opam/opam-init/hooks/sandbox.sh build make library
opt".
#=== ERROR while compiling labltk.8.06.9 ======================================#
# context 2.0.7 | macos/x86_64 | ocaml-base-compiler.4.10.0 | https://opam.ocaml.org#2967e1c2
# path ~/.opam/default/.opam-switch/build/labltk.8.06.9
# /usr/local/include/tk.h:96:13: fatal error: 'X11/Xlib.h' file not found
# # include <X11/Xlib.h>
# ^~~~~~~~~~~~
# 1 error generated.
# make[1]: *** [cltkCaml.o] Error 1
# make: *** [library] Error 2
<><> labltk.8.06.9 troubleshooting ><><><><><><><><><><><><><><><><><><><><> 🐫
=> This package requires Tcl/Tk with its development packages installed on your system
There are two things I don't understand about this message.
Firstly, this message said that I need to install Tcl/Tk, but I have already installed them from (https://www.activestate.com/products/tcl/downloads/).
So, I have Tcl(and Tk).framework in /Library/Frameworks. And their version are 8.6.
Why opam does not recognize them ?
Secondly, this message said that X11/Xlib.h file was not found, but I have this file.
For example,
/usr/local/Cellar/tcl-tk/8.6.10/lib/tcl8.6/critcl3.1.18/critcl_c/tcl8.6/X11/Xlib.h
/Library/Frameworks/Tcl.framework/Versions/8.6/Resources/Scripts/critcl3.1.17/critcl_c/tcl8.6/X11/Xlib.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11/Xlib.h
/opt/X11/include/X11/Xlib.h
etc
Similarly, why opam does not recognize these files ?
This is the first question I'm asking on github. So I apologize if this is an inappropriate question.
OCaml 4.11 is going to be released by the end of the month and currently ocamlbrowser is not compatible with this new version of the compiler. A few things changed in the typed tree and I'm not sure how to properly make the appropriate changes.
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).
Hello mister Garrigue,
While trying to install labltk via opam, I received this error message :
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of conf-tcl failed at "/bin/sh check.sh".
#=== ERROR while compiling conf-tcl.1 =========================================#
# context 2.0.0 | freebsd/x86_64 | ocaml-system.4.02.3 | https://opam.ocaml.org#1b1f3945
# path /usr/home/emmanuel/.opam/default/.opam-switch/build/conf-tcl.1
# command /bin/sh check.sh
# exit-code 1
# env-file /usr/home/emmanuel/.opam/log/conf-tcl-1714-9b8556.env
# output-file /usr/home/emmanuel/.opam/log/conf-tcl-1714-9b8556.out
### output ###
# compiletest.c:2:10: fatal error: 'tcl.h' file not found
# #include <tcl.h>
# ^~~~~~~
# 1 error generated.
My FreeBSD version is 11.1-RELEASE
For information, the file tcl.h does exists in my PC, at /usr/local/include/tcl8.6/generic/tcl.h.
There's a symbolic link pointing to it at : /usr/local/include/tcl8.6/tcl.h
Something like what tkinter does already?
Even if the package is only virtual and only install labltk, that would be nice.
Cf. this also: ocaml/opam-repository#7061
Looks like labltk doesn't work on modern tcl/tk installations. I guess Tcl_AppendResult, which is long deprecated, has now been removed?
This was on an up-to-date Fedora install, with tcl/tk 8.6.8.
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of labltk failed at "/home/yminsky/.opam/opam-init/hooks/sandbox.sh build make
all opt".
#=== ERROR while compiling labltk.8.06.5 ======================================#
# context 2.0.1 | linux/x86_64 | ocaml-base-compiler.4.07.1 | https://opam.ocaml.org#a80828c9
# path ~/.opam/default/.opam-switch/build/labltk.8.06.5
# command ~/.opam/opam-init/hooks/sandbox.sh build make all opt
# exit-code 2
# env-file ~/.opam/log/labltk-26273-d8a4ae.env
# output-file ~/.opam/log/labltk-26273-d8a4ae.out
### output ###
# /home/yminsky/.opam/default/bin/ocamlmklib -ocamlc '/home/yminsky/.opam/default/bin/ocamlc' -o labltk \
# [...]
# /home/yminsky/.opam/default/bin/ocamlc.opt -verbose -linkall -o labltktop -I ../support \
# ocamlcommon.cma ocamlbytecomp.cma ocamltoplevel.cma \
# -I +compiler-libs unix.cma \
# -I ../labltk -I ../camltk labltk.cma \
# str.cma \
# topstart.cmo
# File "_none_", line 1:
# Error: Error on dynamically loaded library: ../support/dlllabltk.so: ../support/dlllabltk.so: undefined symbol: Tcl_AppendResult
# make[1]: *** [Makefile:68: labltktop] Error 2
# make[1]: Leaving directory '/home/yminsky/.opam/default/.opam-switch/build/labltk.8.06.5/lib'
# make: *** [Makefile:31: all] Error 2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.