Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install via opam on FreeBSD #8

Open
eretz opened this issue Jun 20, 2019 · 2 comments
Open

Cannot install via opam on FreeBSD #8

eretz opened this issue Jun 20, 2019 · 2 comments

Comments

@eretz
Copy link

eretz commented Jun 20, 2019

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

@eretz
Copy link
Author

eretz commented Jun 20, 2019

I've used this workaround to solve the problem :
I edited my .profile and added this line :

export C_INCLUDE_PATH=/usr/local/include/:/usr/local/include/tcl8.6/:/usr/local/include/tk8.6/

But it seems to me that it's only a workaround :-)

@garrigue
Copy link
Owner

According to the opam file, conf-tcl is maintained by the Tcl core team, and issues should go directly to the opam-repository database.
Looking at the package itself, it seems that on your machine pkg-config tcl requires setting the above path to work properly, which is strange.

Since the C_INCLUDE_PATH variable is not used by LablTk, which has already logic for looking in /usr/local/tcl8.6 and /usr/local/include/tk8.6, there is no problem in LablTk itself. But it might actually be better to use the same method as conf-tcl, if it proves robust enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants