Closed vol24pl closed 6 years ago
Hello, do not use sudo
with opam
it's not needed.
Could you try to do eval $(opam config env)
before trying to install. Since you are on 4.05.0 I suspect you are running in this bug.
I'm closing this since I don't think it's a problem with topkg
. But feel free to continue the discussion here if what I mentioned above didn't solve your problem.
writing eval 'opam config env'
helped
Thanks for getting back with the answer !
I am having the same issue:
brew install opam
opam init
opam config env
csvtool
installed)Two issues appear to be happening:
# no C toolchain detected, using ""
# ocamlfind: Package 'threads' not found
Help?
Full log:
β opam install topkg
The following actions will be performed:
β install topkg 1.0.5
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><> π«
β¬ retrieved topkg.1.0.5 (cached)
[ERROR] The compilation of topkg.1.0.5 failed at "ocaml pkg/pkg.ml build --pkg-name topkg --dev-pkg false".
#=== ERROR while compiling topkg.1.0.5 ========================================#
# context 2.1.2 | macos/x86_64 | ocaml.4.12.0 | https://opam.ocaml.org#42b392e6
# path ~/.opam/default/.opam-switch/build/topkg.1.0.5
# command ~/.opam/opam-init/hooks/sandbox.sh build ocaml pkg/pkg.ml build --pkg-name topkg --dev-pkg false
# exit-code 1
# env-file ~/.opam/log/topkg-48374-f40104.env
# output-file ~/.opam/log/topkg-48374-f40104.out
### output ###
# [...]
# pkg.ml: [WARNING] OCaml host-os conf: key ext_obj: undefined, using ".o"
# pkg.ml: [WARNING] OCaml host-os conf: key ext_lib: undefined, using ".a"
# pkg.ml: [WARNING] OCaml host-os conf: key ext_dll: undefined, using ".so"
# pkg.ml: [WARNING] OCaml host-os conf: key ext_exe: undefined and
# no C toolchain detected, using ""
# ocamlfind ocamldep -modules src/topkg.mli > src/topkg.mli.depends
# + ocamlfind ocamlc -where > /Users/<user>/.opam/default/.opam-switch/build/topkg.1.0.5/_build/ocamlc.where
# ocamlfind: Package `threads' not found
# Command exited with code 2.
# pkg.ml: [ERROR] cmd ['ocamlbuild' '-use-ocamlfind' '-classic-display' '-j' '4' '-tag' 'debug'
# '-build-dir' '_build' 'CHANGES.md' 'LICENSE.md' 'README.md' 'pkg/META'
# 'topkg.opam' 'src/topkg.cma' 'src/topkg.cmi' 'src/topkg.mli']: exited with 10
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><> π«
ββ The following actions failed
β Ξ» build topkg 1.0.5
ββ
Could you please report the result of opam config report
and opam exec env
.
Could you please report the result of
opam config report
andopam exec env
.
β opam config report
# opam config report
# opam-version 2.1.2
# self-upgrade no
# system arch=x86_64 os=macos os-distribution=homebrew os-version=11.6.1
# solver builtin-mccs+glpk
# install-criteria -removed,-count[avoid-version,changed],-count[version-lag,request],-count[version-lag,changed],-count[missing-depexts,changed],-changed
# upgrade-criteria -removed,-count[avoid-version,changed],-count[version-lag,solution],-count[missing-depexts,changed],-new
# jobs 15
# repositories 1 (http) (default repo at 42b392e6)
# pinned 0
# current-switch default
# ocaml:native true
# ocaml:native-tools true
# ocaml:native-dynlink true
# ocaml:stubsdir /usr/local/lib/ocaml/stublibs:/usr/local/lib/ocaml
# ocaml:preinstalled true
# ocaml:compiler system
# ocaml-system:path /usr/local/bin
β opam exec env
CAML_LD_LIBRARY_PATH=/Users/<user>/.opam/default/lib/stublibs:/usr/local/lib/ocaml/stublibs:/usr/local/lib/ocaml
CLICOLOR=1
CLICOLOR_FORCE=1
COLORFGBG=7;0
COLORTERM=truecolor
COMMAND_MODE=unix2003
COMPOSER_MEMORY_LIMIT=-1
DISPLAY=/private/tmp/com.apple.launchd.yBML4VXUrG/org.xquartz:0
HOME=/Users/<user>
HOMEBREW_AUTO_UPDATE_SECS=604800
ITERM_PROFILE=Default
ITERM_SESSION_ID=w0t5p0:1E78ED99-4FCD-4D82-9B46-ECA65A93D3AE
LANG=en_US.UTF-8
LC_TERMINAL=iTerm2
LC_TERMINAL_VERSION=3.4.15
LESS=-R
LIBRARY_PATH=:/usr/local/opt/openssl/lib/
LOGNAME=<user>
OCAML_TOPLEVEL_PATH=/Users/<user>/.opam/default/lib/toplevel
OLDPWD=/Users/<user>
OPAMNOENVNOTICE=true
OPAM_SWITCH_PREFIX=/Users/<user>/.opam/default
PAGER=less
PATH=/Users/<user>/.opam/default/bin:/usr/local/opt/bzip2/bin:/Users/<user>/Library/Python/3.8/bin:/opt/homebrew/bin:/usr/local/bin:/usr/local/sbin:/Users/<user>/bin:/Users/<user>/go/bin:/usr/local/git/bin:/Users/<user>/.composer/vendor/bin:/Users/<user>/Library/Python/3.8/bin:/opt/homebrew/bin:/usr/local/sbin:/Users/<user>/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin
PWD=/Users/<user>
RBENV_SHELL=zsh
SHELL=/bin/zsh
SHLVL=1
TERM=xterm-256color
TERM_PROGRAM=iTerm.app
TERM_PROGRAM_VERSION=3.4.15
TERM_SESSION_ID=w0t5p0:1E78ED99-4FCD-4D82-9B46-ECA65A93D3AE
TIMEFMT=
real %*E
user %*U
sys %*S
TMPDIR=/var/folders/hp/d9p6t0dd27967bc3vrtnm6mr0000gn/T/
USER=<user>
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
ZSH=/Users/<user>/.oh-my-zsh
_=/usr/local/bin/opam
_CE_CONDA=
_CE_M=
__CFBundleIdentifier=com.googlecode.iterm2
__CF_USER_TEXT_ENCODING=0x0:0:0
Note: I removed some of the utilities I use for PHP, Ruby, and Python as I'd rather not leak too much OSINT
Ok so you are using a system switch (i.e. an opam
switch that uses the system install of ocaml
).
Unfortunately there's all sort of things that can go wrong with system switches. But nothing obvious I can see right here from your outputs. The problem seems to be due to ocamlfind
, just confirm that:
opam exec -- command -v ocamlfind
returns the opam
installed ocamlfind
and not one installed elsewhere.
But rather I first suggest you to do a regular switch and see if the problem remains (my bet is that it won't).
opam switch create 4.13.1
eval $(opam env)
opam install csvtool
Ok so you are using a system switch (i.e. an
opam
switch that uses the system install ofocaml
).Unfortunately there's all sort of things that can go wrong with system switches. But nothing obvious I can see right here from your outputs. The problem seems to be due to
ocamlfind
, just confirm that:opam exec -- command -v ocamlfind
returns the
opam
installedocamlfind
and not one installed elsewhere.But rather I first suggest you to do a regular switch and see if the problem remains (my bet is that it won't).
opam switch create 4.13.1 eval $(opam env) opam install csvtool
β opam exec -- command -v ocamlfind
/Users/<user>/.opam/default/bin/ocamlfind
Now running the second batch of commands. It's currently compiling. I'll update here when that's done.
Out of curiosity, should I brew uninstall ocaml
?
Nope...
β opam switch create 4.13.1
<><> Installing new switch packages <><><><><><><><><><><><><><><><><><><><> π«
Switch invariant: ["ocaml-base-compiler" {= "4.13.1"} | "ocaml-system" {= "4.13.1"}]
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><> π«
β installed base-bigarray.base
β installed base-threads.base
β installed base-unix.base
β installed ocaml-options-vanilla.1
β¬ retrieved ocaml-base-compiler.4.13.1 (https://opam.ocaml.org/cache)
β installed ocaml-base-compiler.4.13.1
β installed ocaml-config.2
β installed ocaml.4.13.1
Done.
β eval $(opam env)
β opam install csvtool
The following actions will be performed:
β install ocamlfind 1.9.3 [required by base-bytes, uutf]
β install dune 3.0.3 [required by csvtool]
β install ocamlbuild 0.14.1 [required by uutf]
β install base-bytes base [required by csvtool]
β install topkg 1.0.5 [required by uutf]
β install csv 2.4 [required by csvtool]
β install uutf 1.0.3 [required by csvtool]
β install csvtool 2.4
===== β 8 =====
Do you want to continue? [Y/n] y
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><> π«
β¬ retrieved csv.2.4 (cached)
β¬ retrieved csvtool.2.4 (cached)
β¬ retrieved ocamlbuild.0.14.1 (cached)
β¬ retrieved topkg.1.0.5 (cached)
β¬ retrieved ocamlfind.1.9.3 (cached)
β¬ retrieved uutf.1.0.3 (cached)
β¬ retrieved dune.3.0.3 (cached)
β installed ocamlbuild.0.14.1
β installed ocamlfind.1.9.3
β installed base-bytes.base
[ERROR] The compilation of topkg.1.0.5 failed at "ocaml pkg/pkg.ml build --pkg-name topkg --dev-pkg false".
β installed dune.3.0.3
β installed csv.2.4
#=== ERROR while compiling topkg.1.0.5 ========================================#
# context 2.1.2 | macos/x86_64 | ocaml-base-compiler.4.13.1 | https://opam.ocaml.org#42b392e6
# path ~/.opam/4.13.1/.opam-switch/build/topkg.1.0.5
# command ~/.opam/opam-init/hooks/sandbox.sh build ocaml pkg/pkg.ml build --pkg-name topkg --dev-pkg false
# exit-code 1
# env-file ~/.opam/log/topkg-8491-b30104.env
# output-file ~/.opam/log/topkg-8491-b30104.out
### output ###
# [...]
# pkg.ml: [WARNING] OCaml host-os conf: key ext_obj: undefined, using ".o"
# pkg.ml: [WARNING] OCaml host-os conf: key ext_lib: undefined, using ".a"
# pkg.ml: [WARNING] OCaml host-os conf: key ext_dll: undefined, using ".so"
# pkg.ml: [WARNING] OCaml host-os conf: key ext_exe: undefined and
# no C toolchain detected, using ""
# ocamlfind ocamldep -modules src/topkg.mli > src/topkg.mli.depends
# + ocamlfind ocamlc -where > /Users/<user>/.opam/4.13.1/.opam-switch/build/topkg.1.0.5/_build/ocamlc.where
# ocamlfind: Package `threads' not found
# Command exited with code 2.
# pkg.ml: [ERROR] cmd ['ocamlbuild' '-use-ocamlfind' '-classic-display' '-j' '4' '-tag' 'debug'
# '-build-dir' '_build' 'CHANGES.md' 'LICENSE.md' 'README.md' 'pkg/META'
# 'topkg.opam' 'src/topkg.cma' 'src/topkg.cmi' 'src/topkg.mli']: exited with 10
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><> π«
ββ The following actions failed
β Ξ» build topkg 1.0.5
ββ
ββ The following changes have been performed (the rest was aborted)
β β install base-bytes base
β β install csv 2.4
β β install dune 3.0.3
β β install ocamlbuild 0.14.1
β β install ocamlfind 1.9.3
ββ
The former state can be restored with:
/usr/local/bin/opam switch import "/Users/<user>/.opam/4.13.1/.opam-switch/backup/state-20220321182442.export"
Out of curiosity, should I
brew uninstall ocaml
?
No, I bet that will uninstall opam
from brew
. It's just better to use opam
non-system switches afterwards.
When it errors it mentions these two files:
> # env-file ~/.opam/log/topkg-8491-b30104.env
> # output-file ~/.opam/log/topkg-8491-b30104.out
Could you please post them aswell as the output of:
opam exec -- ocamlc -config
opam exec -- ocamlfind list
β opam exec -- ocamlc -config
version: 4.13.1
standard_library_default: /Users/<user>/.opam/4.13.1/lib/ocaml
standard_library: /Users/<user>/.opam/4.13.1/lib/ocaml
ccomp_type: cc
c_compiler: cc
ocamlc_cflags: -O2 -fno-strict-aliasing -fwrapv -pthread
ocamlc_cppflags: -D_FILE_OFFSET_BITS=64
ocamlopt_cflags: -O2 -fno-strict-aliasing -fwrapv -pthread
ocamlopt_cppflags: -D_FILE_OFFSET_BITS=64
bytecomp_c_compiler: cc -O2 -fno-strict-aliasing -fwrapv -pthread -D_FILE_OFFSET_BITS=64
native_c_compiler: cc -O2 -fno-strict-aliasing -fwrapv -pthread -D_FILE_OFFSET_BITS=64
bytecomp_c_libraries: -lm -lpthread
native_c_libraries: -lm
native_pack_linker: ld -r -o
ranlib: ranlib
architecture: amd64
model: default
int_size: 63
word_size: 64
system: macosx
asm: cc -c -Wno-trigraphs
asm_cfi_supported: true
with_frame_pointers: false
ext_exe:
ext_obj: .o
ext_asm: .s
ext_lib: .a
ext_dll: .so
os_type: Unix
default_executable_name: a.out
systhread_supported: true
host: x86_64-apple-darwin20.6.0
target: x86_64-apple-darwin20.6.0
flambda: false
safe_string: true
default_safe_string: true
flat_float_array: true
function_sections: false
afl_instrument: false
windows_unicode: false
supports_shared_libraries: true
exec_magic_number: Caml1999X030
cmi_magic_number: Caml1999I030
cmo_magic_number: Caml1999O030
cma_magic_number: Caml1999A030
cmx_magic_number: Caml1999Y030
cmxa_magic_number: Caml1999Z030
ast_impl_magic_number: Caml1999M030
ast_intf_magic_number: Caml1999N030
cmxs_magic_number: Caml1999D030
cmt_magic_number: Caml1999T030
linear_magic_number: Caml1999L030
β opam exec -- ocamlfind list
csv (version: 2.4)
dune (version: n/a)
dune.configurator (version: 3.0.3)
findlib (version: 1.9.3)
findlib.dynload (version: 1.9.3)
findlib.internal (version: 1.9.3)
findlib.top (version: 1.9.3)
ocamlbuild (version: 0.14.1)
β opam exec -- ocamlfind list
That's quite strange you are missing these definitions:
> ocamlfind list | grep distrib
bigarray (version: [distributed with Ocaml])
bytes (version: [distributed with OCaml 4.02 or above])
compiler-libs (version: [distributed with Ocaml])
compiler-libs.bytecomp (version: [distributed with Ocaml])
compiler-libs.common (version: [distributed with Ocaml])
compiler-libs.optcomp (version: [distributed with Ocaml])
compiler-libs.toplevel (version: [distributed with Ocaml])
dynlink (version: [distributed with Ocaml])
ocamldoc (version: [distributed with Ocaml])
seq (version: [distributed with OCaml 4.07 or above])
stdlib (version: [distributed with Ocaml])
str (version: [distributed with Ocaml])
threads (version: [distributed with Ocaml])
uchar (version: distributed with OCaml 4.03 or above)
unix (version: [distributed with Ocaml])
~/.opam/log/topkg-8491-b30104.env
β cat ~/.opam/log/topkg-8491-b30104.env
CAML_LD_LIBRARY_PATH=/Users/<user>/.opam/4.13.1/lib/stublibs:/Users/<user>/.opam/4.13.1/lib/ocaml/stublibs:/Users/<user>/.opam/4.13.1/lib/ocaml
CDPATH=
CLICOLOR=1
CLICOLOR_FORCE=1
COLORFGBG=7;0
COLORTERM=truecolor
COMMAND_MODE=unix2003
COMPOSER_MEMORY_LIMIT=-1
CONDA_DEFAULT_ENV=base
CONDA_EXE=/Users/<user>/anaconda3/bin/conda
CONDA_PREFIX=/Users/<user>/anaconda3
CONDA_PROMPT_MODIFIER=(base)
CONDA_PYTHON_EXE=/Users/<user>/anaconda3/bin/python
CONDA_SHLVL=1
HOME=/Users/<user>
HOMEBREW_AUTO_UPDATE_SECS=604800
ITERM_PROFILE=Default
ITERM_SESSION_ID=w0t2p0:09DD85BE-C009-4C12-BCA0-B1A49B6A14E0
LANG=en_US.UTF-8
LC_TERMINAL=iTerm2
LESS=-R
LIBRARY_PATH=:/usr/local/opt/openssl/lib/
LOGNAME=<user>
MAKEFLAGS=
MAKELEVEL=
OCAML_TOPLEVEL_PATH=/Users/<user>/.opam/4.13.1/lib/toplevel
OLDPWD=/Users/<user>
OPAMCLI=2.0
OPAMNOENVNOTICE=true
OPAMROOT=/Users/<user>/.opam
OPAMSWITCH=4.13.1
OPAM_PACKAGE_NAME=topkg
OPAM_PACKAGE_VERSION=1.0.5
OPAM_SWITCH_PREFIX=/Users/<user>/.opam/4.13.1
PAGER=less
PATH=/Users/<user>/.opam/4.13.1/bin:/usr/local/opt/bzip2/bin:/Users/<user>/anaconda3/bin:/Users/<user>/anaconda3/condabin:/Users/<user>/Library/Python/3.8/bin:/opt/homebrew/bin:/usr/local/bin:/usr/local/sbin:/Users/<user>/bin:/Users/<user>/go/bin:/usr/local/git/bin:/Users/<user>/.composer/vendor/bin:/Users/<user>/Library/Python/3.8/bin:/opt/homebrew/bin:/usr/local/sbin:/Users/<user>/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin
PWD=/Users/<user>
SHELL=/bin/zsh
SHLVL=1
TERM=xterm-256color
TERM_PROGRAM=iTerm.app
TERM_SESSION_ID=w0t2p0:09DD85BE-C009-4C12-BCA0-B1A49B6A14E0
TIMEFMT=
real %*E
user %*U
sys %*S
USER=<user>
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
ZSH=/Users/<user>/.oh-my-zsh
_=/usr/local/bin/opam
_CE_CONDA=
_CE_M=
__CFBundleIdentifier=com.googlecode.iterm2
__CF_USER_TEXT_ENCODING=0x0:0:0
β cat ~/.opam/log/topkg-8491-b30104.out
ocamlfind: Package `threads' not found
pkg.ml: [WARNING] OCaml host-os conf: cmd ['ocamlfind' 'ocamlc' '-config']: exited with 2
pkg.ml: [WARNING] OCaml host-os conf: key native: undefined, stdlib dir not found for discovery
using false
pkg.ml: [WARNING] OCaml host-os conf: key natdynlink: undefined, stdlib dir not found for discovery
using false
pkg.ml: [WARNING] OCaml host-os conf: key supports_shared_libraries: undefined, stdlib dir not found for discovery
using false
pkg.ml: [WARNING] OCaml host-os conf: key ext_obj: undefined, using ".o"
pkg.ml: [WARNING] OCaml host-os conf: key ext_lib: undefined, using ".a"
pkg.ml: [WARNING] OCaml host-os conf: key ext_dll: undefined, using ".so"
pkg.ml: [WARNING] OCaml host-os conf: key ext_exe: undefined and
no C toolchain detected, using ""
ocamlfind ocamldep -modules src/topkg.mli > src/topkg.mli.depends
+ ocamlfind ocamlc -where > /Users/<user>/.opam/4.13.1/.opam-switch/build/topkg.1.0.5/_build/ocamlc.where
ocamlfind: Package `threads' not found
Command exited with code 2.
pkg.ml: [ERROR] cmd ['ocamlbuild' '-use-ocamlfind' '-classic-display' '-j' '4' '-tag' 'debug'
'-build-dir' '_build' 'CHANGES.md' 'LICENSE.md' 'README.md' 'pkg/META'
'topkg.opam' 'src/topkg.cma' 'src/topkg.cmi' 'src/topkg.mli']: exited with 10
There's definitively something wrong with ocamlfind
.
Btw. could you just make sure you have the lastest opam repository do an opam udpate
and try again.
OCaml host-os conf: cmd ['ocamlfind' 'ocamlc' '-config']
Ah yes that's the rune so what's the output of
opam exec -- ocamlfind ocamlc -config
(it exits abnormally with 2 let's see what it says)
Oh and the output of
opam exec -- ocamlfind printconf
please.
β opam update
<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><> π«
[default] synchronised from https://opam.ocaml.org
Now run 'opam upgrade' to apply any package updates.
β opam upgrade
Everything as up-to-date as possible (run with --verbose to show unavailable upgrades).
The following packages are not being upgraded because the new versions conflict with other installed packages:
- ocaml.5.0.0
β dune.3.0.3 is installed and requires ocaml < 4.08~~
However, you may "opam upgrade" these packages explicitly, which will ask permission to downgrade or uninstall the conflicting packages.
Nothing to do.
β opam exec -- ocamlfind ocamlc -config
ocamlfind: Package `threads' not found
β opam exec -- ocamlfind printconf
Effective configuration:
Configuration file:
/Users/<user>/.opam/4.13.1/lib/findlib.conf
Search path:
/Users/<user>/.opam/4.13.1/lib
Packages will be installed in/removed from:
/Users/<user>/.opam/4.13.1/lib
META files will be installed in/removed from:
the corresponding package directories
The standard library is assumed to reside in:
/Users/<user>/.opam/4.13.1/lib/ocaml
The ld.conf file can be found here:
/Users/<user>/.opam/4.13.1/lib/ocaml/ld.conf
Could you give the result of ls ~/.opam/4.13.1/lib/*/META
and opam show --list-files ocamlfind
?
β ls ~/.opam/4.13.1/lib/*/META
/Users/<user>/.opam/4.13.1/lib/csv/META /Users/<user>/.opam/4.13.1/lib/dune/META /Users/<user>/.opam/4.13.1/lib/findlib/META /Users/<user>/.opam/4.13.1/lib/ocamlbuild/META
β opam show --list-files ocamlfind
/Users/<user>/.opam/4.13.1/bin/ocamlfind
/Users/<user>/.opam/4.13.1/bin/safe_camlp4
/Users/<user>/.opam/4.13.1/lib/findlib
/Users/<user>/.opam/4.13.1/lib/findlib.conf
/Users/<user>/.opam/4.13.1/lib/findlib/META
/Users/<user>/.opam/4.13.1/lib/findlib/Makefile.config
/Users/<user>/.opam/4.13.1/lib/findlib/Makefile.packages
/Users/<user>/.opam/4.13.1/lib/findlib/findlib.a
/Users/<user>/.opam/4.13.1/lib/findlib/findlib.cma
/Users/<user>/.opam/4.13.1/lib/findlib/findlib.cmi
/Users/<user>/.opam/4.13.1/lib/findlib/findlib.cmxa
/Users/<user>/.opam/4.13.1/lib/findlib/findlib.cmxs
/Users/<user>/.opam/4.13.1/lib/findlib/findlib.mli
/Users/<user>/.opam/4.13.1/lib/findlib/findlib_config.cmi
/Users/<user>/.opam/4.13.1/lib/findlib/findlib_config.ml
/Users/<user>/.opam/4.13.1/lib/findlib/findlib_dynload.a
/Users/<user>/.opam/4.13.1/lib/findlib/findlib_dynload.cma
/Users/<user>/.opam/4.13.1/lib/findlib/findlib_dynload.cmxa
/Users/<user>/.opam/4.13.1/lib/findlib/findlib_dynload.cmxs
/Users/<user>/.opam/4.13.1/lib/findlib/findlib_top.a
/Users/<user>/.opam/4.13.1/lib/findlib/findlib_top.cma
/Users/<user>/.opam/4.13.1/lib/findlib/findlib_top.cmxa
/Users/<user>/.opam/4.13.1/lib/findlib/findlib_top.cmxs
/Users/<user>/.opam/4.13.1/lib/findlib/fl_args.cmi
/Users/<user>/.opam/4.13.1/lib/findlib/fl_dynload.cmi
/Users/<user>/.opam/4.13.1/lib/findlib/fl_dynload.mli
/Users/<user>/.opam/4.13.1/lib/findlib/fl_lint.cmi
/Users/<user>/.opam/4.13.1/lib/findlib/fl_meta.cmi
/Users/<user>/.opam/4.13.1/lib/findlib/fl_metascanner.cmi
/Users/<user>/.opam/4.13.1/lib/findlib/fl_metascanner.mli
/Users/<user>/.opam/4.13.1/lib/findlib/fl_metatoken.cmi
/Users/<user>/.opam/4.13.1/lib/findlib/fl_package_base.cmi
/Users/<user>/.opam/4.13.1/lib/findlib/fl_package_base.mli
/Users/<user>/.opam/4.13.1/lib/findlib/fl_split.cmi
/Users/<user>/.opam/4.13.1/lib/findlib/fl_topo.cmi
/Users/<user>/.opam/4.13.1/lib/findlib/ocaml_args.cmi
/Users/<user>/.opam/4.13.1/lib/findlib/topfind.cmi
/Users/<user>/.opam/4.13.1/lib/findlib/topfind.mli
/Users/<user>/.opam/4.13.1/lib/ocaml/topfind
/Users/<user>/.opam/4.13.1/lib/toplevel/topfind
/Users/<user>/.opam/4.13.1/man/man1/ocamlfind.1
/Users/<user>/.opam/4.13.1/man/man5/META.5
/Users/<user>/.opam/4.13.1/man/man5/findlib.conf.5
/Users/<user>/.opam/4.13.1/man/man5/site-lib.5
@kit-ty-kate and @dbuenzli in case it's any easier, I've sent both of you a Teams meeting invite so we can do this more interactively
I have a hunch. Could you clone https://github.com/ocaml/ocamlfind/ and run ./configure
and see if any error messages occures?
./configure
Welcome to findlib version 1.9.3
Configuring core...
Checking for #remove_directory...
Testing threading model...
systhread_supported: true
Testing DLLs...
Testing whether ppxopt can be supported...
Checking for ocamlc -opaque...
Configuring libraries...
unix: found
bigarray: found
compiler-libs: found
dbm: not present (normal since 4.00)
graphics: not present (normal since 4.09)
num: not present (normal since 4.06)
ocamlbuild: not present (normal since 4.03)
ocamldoc: found
raw_spacetime: not present (normal since 4.12)
threads: found
str: found
labltk: not present (normal since 4.02)
native dynlink: found
camlp4: not present (normal since OCaml-4.02)
bytes: found, installing fake library
Configuration for dynlink written to site-lib-src/dynlink/META
Configuration for stdlib written to site-lib-src/stdlib/META
Configuration for unix written to site-lib-src/unix/META
Configuration for bigarray written to site-lib-src/bigarray/META
Configuration for compiler-libs written to site-lib-src/compiler-libs/META
Configuration for ocamldoc written to site-lib-src/ocamldoc/META
Configuration for threads written to site-lib-src/threads/META
Configuration for str written to site-lib-src/str/META
Configuration for bytes written to site-lib-src/bytes/META
Detecting compiler arguments: (extractor built) ok
About the OCAML core installation:
Standard library: /Users/<user>/.opam/4.13.1/lib/ocaml
Binaries: /Users/<user>/.opam/4.13.1/bin
Manual pages: /Users/<user>/.opam/4.13.1/man
Multi-threading type: posix
The directory of site-specific packages will be
site-lib: /Users/<user>/.opam/4.13.1/lib/ocaml/site-lib
The configuration file is written to:
findlib config file: /Users/<user>/.opam/4.13.1/lib/findlib.conf
Software will be installed:
Libraries: in <site-lib>/findlib
Binaries: /Users/<user>/.opam/4.13.1/bin
Manual pages: /Users/<user>/.opam/4.13.1/man
topfind script: /Users/<user>/.opam/4.13.1/lib/ocaml
Topfind ppxopt support: yes
Toolbox: no
Link custom runtime: yes
Need bytes compatibility: no
Configuration has been written to Makefile.config
You can now do 'make all', and optionally 'make opt', to build ocamlfind.
β cat Makefile.config
# Makefile.config written by configure
OCAML_CORE_STDLIB=/Users/<user>/.opam/4.13.1/lib/ocaml
OCAML_CORE_BIN=/Users/<user>/.opam/4.13.1/bin
OCAML_CORE_MAN=/Users/<user>/.opam/4.13.1/man
OCAML_SITELIB=/Users/<user>/.opam/4.13.1/lib/ocaml/site-lib
OCAML_THREADS=posix
OCAMLFIND_BIN=/Users/<user>/.opam/4.13.1/bin
OCAMLFIND_MAN=/Users/<user>/.opam/4.13.1/man
OCAMLFIND_CONF=/Users/<user>/.opam/4.13.1/lib/findlib.conf
OCAMLFIND_OCAMLFLAGS=
OCAMLFIND_ARCHIVES=findlib.cma unix.cma
OCAML_AUTOLINK=true
OCAML_REMOVE_DIRECTORY=1
EXEC_SUFFIX=
LIB_SUFFIX=.a
CUSTOM=-custom
PARTS=findlib
INSTALL_TOPFIND=1
USE_CYGPATH=0
HAVE_NATDYNLINK=1
VERSION=1.9.3
ENABLE_TOPFIND_PPXOPT=true
SYSTEM=macosx
NUMTOP=
SH=
OPAQUE=-opaque
CHECK_BEFORE_INSTALL=0
Not sure if that could be a problem but does the <user>
path segment you are eliding contain spaces or other characters beyond US-ASCII printable characters ?
Not sure if that could be a problem but does the
<user>
path segment you are eliding contain spaces or other characters beyond US-ASCII printable characters ?
Nope. It's normal "a" to "z" characters, no spaces, no special characters
@dbuenzli we moved to Zoom. Invite emailed to you
Sorry I can't make it now. Tell me what you find out or if I can be of any further help.
@philCryoport my connexion is too flaky to continue (+ itβs getting late here) but i guess we found some kind of origin of the problem and it needs some more debugging
Hi @kit-ty-kate I'm going to file an issue with ocamlfind as the code is a bit too "ninja" and it's breaking things.
The original line from the ocamlfind Makefile:
for x in `ls site-lib-src`; do test ! -f "site-lib-src/$$x/META" || echo $$x >> Makefile.packages.in; done
The intended idea is:
x
site-lib-src/x/META
is a regular file, return exit code 1; else return exit code 0x
into the Makefile.packages.in -- else go to next entry in the ls site-lib-src
directoryThe problem is that the code as written actually returns a zero (0) exit code for the test ! -f "site-lib-src/$$x/META"
command no matter what in my MacOS Catalina (I originally said Monterey above, sorry)
Additionally:
β find site-lib-src
site-lib-src
site-lib-src/camlp4.310
site-lib-src/camlp4.310/META.in
site-lib-src/raw_spacetime
site-lib-src/raw_spacetime/interfaces.in
site-lib-src/raw_spacetime/META.in
site-lib-src/bytes
site-lib-src/bytes/interfaces.in
site-lib-src/bytes/META
site-lib-src/bytes/README
site-lib-src/bytes/interfaces.out
site-lib-src/bytes/META.in
site-lib-src/ocamlbuild
site-lib-src/ocamlbuild/META.in
site-lib-src/num
site-lib-src/num/interfaces.in
site-lib-src/num/META.in
site-lib-src/num-top
site-lib-src/num-top/META.in
site-lib-src/bigarray
site-lib-src/bigarray/interfaces.in
site-lib-src/bigarray/META.in
site-lib-src/compiler-libs
site-lib-src/compiler-libs/META.in
site-lib-src/unix
site-lib-src/unix/interfaces.in
site-lib-src/unix/META.in
site-lib-src/labltk
site-lib-src/labltk/interfaces.in
site-lib-src/labltk/META.in
site-lib-src/threads
site-lib-src/threads/interfaces.in
site-lib-src/threads/META.in
site-lib-src/stdlib
site-lib-src/stdlib/interfaces.in
site-lib-src/stdlib/META
site-lib-src/stdlib/META.in
site-lib-src/dbm
site-lib-src/dbm/interfaces.in
site-lib-src/dbm/META.in
site-lib-src/camlp4.309
site-lib-src/camlp4.309/META.in
site-lib-src/graphics
site-lib-src/graphics/interfaces.in
site-lib-src/graphics/META.in
site-lib-src/str
site-lib-src/str/interfaces.in
site-lib-src/str/META.in
site-lib-src/ocamldoc
site-lib-src/ocamldoc/META.in
site-lib-src/dynlink
site-lib-src/dynlink/interfaces.in
site-lib-src/dynlink/META
site-lib-src/dynlink/META.in
There's only 3 META
files in that list:
β find site-lib-src -name "META" -print
site-lib-src/bytes/META
site-lib-src/stdlib/META
site-lib-src/dynlink/META
So is the intent to just get those three?
Again, I'll file an issue with ocamlfind
Env: OS X High Sierra, MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports), opam version 1.2.2
STR
$ brew install ocaml
$ brew install opam
$ sudo opam init
$ sudo opam install topkg (without sudo doesn't work as well)
Expected result: topkg installed Actual result: topkg did not install, console log below: