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 ocamlfind.1.7.3 with opam.1.2.2 on macOS High Sierra 10.13.1 #10737

Closed
niksaz opened this issue Nov 16, 2017 · 6 comments
Closed

Comments

@niksaz
Copy link

niksaz commented Nov 16, 2017

Hello,

There was a similar issue about this: #10064, but it is not the same, as it seems to me.

I am trying to install core libraries by running:

opam install core utop

But it ends with the next error:

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
[ERROR] The compilation of ocamlfind failed at "make all".
Processing  1/61: [ocamlfind: rm]
#=== ERROR while installing ocamlfind.1.7.3 ===================================#
# opam-version 1.2.2
# os           darwin
# command      make all
# path         /Users/niksaz/.opam/system/build/ocamlfind.1.7.3
# compiler     system (4.06.0)
# exit-code    2
# env-file     /Users/niksaz/.opam/system/build/ocamlfind.1.7.3/ocamlfind-5075-e0259d.env
# stdout-file  /Users/niksaz/.opam/system/build/ocamlfind.1.7.3/ocamlfind-5075-e0259d.out
# stderr-file  /Users/niksaz/.opam/system/build/ocamlfind.1.7.3/ocamlfind-5075-e0259d.err
### stdout ###
# [...]
# 22 states, 392 transitions, table size 1700 bytes
# ocamldep *.ml *.mli >depend
# USE_CYGPATH="0"; \
# 	export USE_CYGPATH; \
# 	cat findlib_config.mlp | \
# 	         ../../tools/patch '@CONFIGFILE@' '/Users/niksaz/.opam/system/lib/findlib.conf' | \
# 	         ../../tools/patch '@STDLIB@' '/usr/local/lib/ocaml' | \
# 		sed -e 's;@AUTOLINK@;true;g' \
# 		    -e 's;@SYSTEM@;system: macosx;g' \
# 		     >findlib_config.ml
### stderr ###
# Makefile:184: depend: No such file or directory
# sed: 1: "s;@SYSTEM@;\033[01;31m\033[Ks ...": bad flag in substitute command: 'm'
# make[1]: *** [findlib_config.ml] Error 1
# make: *** [all] Error 2

Apparently the ./configure script in ocamlfind.1.7.3 detects the system being: SYSTEM=^[[01;31m^[[Ksystem^[[m^[[K: macos

It later confuses the sed utility. I believe it should look simpler. Something like SYSTEM=macos. After modifying this line in Makefile.config manually it seems to build.

Unfortunately, I am not that proficient with unix scripting and do not see where the problem comes from. It seems it is populated here:

while [ "$#" != "0" ]; do
    case "$1" in
        -bindir) ocamlfind_bin=$2
	         shift 2
		 ;;
        -mandir) ocamlfind_man=$2
	         shift 2
		 ;;
        -sitelib) ocaml_sitelib=$2
	          shift 2
		  ;;
        -config) ocamlfind_config=$2
	         shift 2
		 ;;
        -no-custom) custom=
                shift
                ;;
	-cygpath) system=mingw
	         shift
		 ;;
	-system) system=$2
	         shift 2
		 ;;

But I do not pass any arguments there when I run ./configure.

Could you comment on this issue?

Thank you!

$ opam config report
# OPAM config report
# opam-version    1.2.2
# self-upgrade    no
# os              darwin
# external-solver aspcud $in $out $criteria
# criteria        -count(removed),-notuptodate(request),-sum(request,version-lag),-count(down),-notuptodate(changed),-count(changed),-notuptodate(solution),-sum(solution,version-lag)
# jobs            4
# repositories    1* (http)
# pinned          0
# current-switch  system*
# last-update     2017-11-16 19:43
@niksaz niksaz changed the title Cannot install ocamlfind.1.7.3 with opam.1.2.2 on OSX Sierra Cannot install ocamlfind.1.7.3 with opam.1.2.2 on macOS High Sierra 10.13.1 Nov 16, 2017
@dbuenzli
Copy link
Contributor

Could you please report the output of

opam install --debug -v -v ocamlfind
env 

@niksaz
Copy link
Author

niksaz commented Nov 19, 2017

Of course: here it is.

$ opam install --debug -v -v ocamlfind

00:00.004  SYSTEM                  locking /Users/niksaz/.opam/lock
00:00.005  STATE                   LOAD-STATE(switch-lock)
00:00.009  CUDF                    Checking version of criteria accepted by the external solver
00:00.014  SYSTEM                  [log-48475-4438d8] (in 0.001s) aspcud -v
00:00.014  CUDF                    Solver is aspcud > 1.9: using latest version criteria
00:00.059  STATE                   Loaded /Users/niksaz/.opam/state.cache in 0.042s
00:00.152  STATE                   ROOT      : /Users/niksaz/.opam
00:00.152  STATE                   SWITCH    : system
00:00.152  STATE                   COMPILER  : system
00:00.152  STATE                   COMPILERS : { 3.07, 3.07+1, 3.07+2, 3.08.0, 3.08.1, 3.08.2, 3.08.3, 3.08.4, 3.09.0, 3.09.1, 3.09.1+metaocaml, 3.09.2, 3.09.3, 3.10.0, 3.10.1, 3.10.2, 3.11.0, 3.11.1, 3.11.2, 3.12.0, 3.12.1, 4.00.0, 4.00.0+debug-runtime, 4.00.0+fp, 4.00.1, 4.00.1+BER, 4.00.1+PIC, 4.00.1+annot, 4.00.1+debug-runtime, 4.00.1+french, 4.00.1+mirage-unix, 4.00.1+mirage-xen, 4.00.1+open-types, 4.00.1+raspberrypi, 4.00.1+short-types, 4.01.0, 4.01.0+32bit, 4.01.0+BER, 4.01.0+PIC, 4.01.0+armv6-freebsd, 4.01.0+fp, 4.01.0+lsb, 4.01.0+musl, 4.01.0+musl+static, 4.01.0+open-types, 4.01.0+profile, 4.02.0, 4.02.0+PIC, 4.02.0+improved-errors, 4.02.0+modular-implicits, 4.02.0+rc1, 4.02.0+trunk, 4.02.1, 4.02.1+32bit, 4.02.1+BER, 4.02.1+PIC, 4.02.1+fp, 4.02.1+modular-implicits-ber, 4.02.1+musl, 4.02.1+musl+static, 4.02.2, 4.02.2+improved-errors, 4.02.2+rc1, 4.02.3, 4.02.3+32bit, 4.02.3+PIC, 4.02.3+buckle-1, 4.02.3+buckle-master, 4.02.3+bytecode-only, 4.02.3+curried-constr, 4.02.3+fp, 4.02.3+musl, 4.02.3+musl+static, 4.02.3+termux, 4.03.0, 4.03.0+32bit, 4.03.0+beta1, 4.03.0+beta1+flambda, 4.03.0+beta1-no-debug, 4.03.0+beta2, 4.03.0+beta2+flambda, 4.03.0+beta2-no-debug, 4.03.0+fPIC, 4.03.0+flambda, 4.03.0+fp, 4.03.0+fp+flambda, 4.03.0+statistical-memprof, 4.03.0+termux, 4.03.0+trunk, 4.03.0+trunk+flambda, 4.03.0+trunk+fp, 4.03.0+trunk+fp+flambda, 4.04.0, 4.04.0+32bit, 4.04.0+BER, 4.04.0+afl, 4.04.0+beta1, 4.04.0+beta1+flambda, 4.04.0+beta2, 4.04.0+beta2+flambda, 4.04.0+bytecode-only, 4.04.0+copatterns, 4.04.0+fPIC, 4.04.0+flambda, 4.04.0+fp, 4.04.0+fp+flambda, 4.04.0+safe-string, 4.04.0+spacetime, 4.04.0+termux, 4.04.0+trunk+forced_lto, 4.04.1, 4.04.1+32bit, 4.04.1+bytecode-only, 4.04.1+fPIC, 4.04.1+flambda, 4.04.1+fp, 4.04.1+fp+flambda, 4.04.1+safe-string, 4.04.1+spacetime, 4.04.2, 4.04.2+32bit, 4.04.2+bytecode-only, 4.04.2+fPIC, 4.04.2+flambda, 4.04.2+fp, 4.04.2+fp+flambda, 4.04.2+safe-string, 4.04.2+spacetime, 4.05.0, 4.05.0+32bit, 4.05.0+afl, 4.05.0+beta1, 4.05.0+beta1+flambda, 4.05.0+beta2, 4.05.0+beta2+flambda, 4.05.0+beta3, 4.05.0+flambda, 4.05.0+lto, 4.05.0+musl+static+flambda, 4.05.0+rc1, 4.05.0+rc1+flambda, 4.05.0+safe-string, 4.05.0+spacetime, 4.05.0+statistical-memprof, 4.05.0+trunk, 4.05.0+trunk+afl, 4.05.0+trunk+flambda, 4.05.0+trunk+fp, 4.05.0+trunk+fp+flambda, 4.05.0+trunk+safe-string, 4.06.0, 4.06.0+afl, 4.06.0+beta1, 4.06.0+beta1+afl, 4.06.0+beta1+default-unsafe-string, 4.06.0+beta1+flambda, 4.06.0+beta1+force-safe-string, 4.06.0+beta1+fp, 4.06.0+beta1+fp+flambda, 4.06.0+beta2, 4.06.0+beta2+afl, 4.06.0+beta2+default-unsafe-string, 4.06.0+beta2+flambda, 4.06.0+beta2+force-safe-string, 4.06.0+beta2+fp, 4.06.0+beta2+fp+flambda, 4.06.0+default-unsafe-string, 4.06.0+flambda, 4.06.0+force-safe-string, 4.06.0+fp, 4.06.0+fp+flambda, 4.06.0+rc1, 4.06.0+rc1+afl, 4.06.0+rc1+default-unsafe-string, 4.06.0+rc1+flambda, 4.06.0+rc1+force-safe-string, 4.06.0+rc1+fp, 4.06.0+rc1+fp+flambda, 4.06.0+statistical-memprof, 4.06.1+trunk, 4.06.1+trunk+afl, 4.06.1+trunk+flambda, 4.06.1+trunk+fp, 4.06.1+trunk+fp+flambda, 4.06.1+trunk+safe-string, 4.07.0+trunk, 4.07.0+trunk+afl, 4.07.0+trunk+flambda, 4.07.0+trunk+fp, 4.07.0+trunk+fp+flambda, 4.07.0+trunk+unsafe-string, system }
00:00.153  STATE                   REPOS     : { default }
00:00.153  STATE                   PACKAGES  : 7796 packages
00:00.153  STATE                   INSTALLED : { base-bigarray.base, base-threads.base, base-unix.base, conf-m4.1, ocamlbuild.0.12.0, result.1.2 }
00:00.153  STATE                   ROOTS     : { base-bigarray.base, base-threads.base, base-unix.base }
00:00.153  STATE                   REINSTALL : {}
00:00.153  STATE                   State switch-lock loaded in 0.137s
00:00.165  SYSTEM                  [log-48475-4bcc67] (in 0.003s) ocamlc -version
00:00.165  SYSTEM                  locking /Users/niksaz/.opam/system/lock
00:00.165  STATE                   LOAD-STATE(install)
00:00.197  STATE                   Loaded /Users/niksaz/.opam/state.cache in 0.030s
00:00.285  STATE                   ROOT      : /Users/niksaz/.opam
00:00.285  STATE                   SWITCH    : system
00:00.285  STATE                   COMPILER  : system
00:00.285  STATE                   COMPILERS : { 3.07, 3.07+1, 3.07+2, 3.08.0, 3.08.1, 3.08.2, 3.08.3, 3.08.4, 3.09.0, 3.09.1, 3.09.1+metaocaml, 3.09.2, 3.09.3, 3.10.0, 3.10.1, 3.10.2, 3.11.0, 3.11.1, 3.11.2, 3.12.0, 3.12.1, 4.00.0, 4.00.0+debug-runtime, 4.00.0+fp, 4.00.1, 4.00.1+BER, 4.00.1+PIC, 4.00.1+annot, 4.00.1+debug-runtime, 4.00.1+french, 4.00.1+mirage-unix, 4.00.1+mirage-xen, 4.00.1+open-types, 4.00.1+raspberrypi, 4.00.1+short-types, 4.01.0, 4.01.0+32bit, 4.01.0+BER, 4.01.0+PIC, 4.01.0+armv6-freebsd, 4.01.0+fp, 4.01.0+lsb, 4.01.0+musl, 4.01.0+musl+static, 4.01.0+open-types, 4.01.0+profile, 4.02.0, 4.02.0+PIC, 4.02.0+improved-errors, 4.02.0+modular-implicits, 4.02.0+rc1, 4.02.0+trunk, 4.02.1, 4.02.1+32bit, 4.02.1+BER, 4.02.1+PIC, 4.02.1+fp, 4.02.1+modular-implicits-ber, 4.02.1+musl, 4.02.1+musl+static, 4.02.2, 4.02.2+improved-errors, 4.02.2+rc1, 4.02.3, 4.02.3+32bit, 4.02.3+PIC, 4.02.3+buckle-1, 4.02.3+buckle-master, 4.02.3+bytecode-only, 4.02.3+curried-constr, 4.02.3+fp, 4.02.3+musl, 4.02.3+musl+static, 4.02.3+termux, 4.03.0, 4.03.0+32bit, 4.03.0+beta1, 4.03.0+beta1+flambda, 4.03.0+beta1-no-debug, 4.03.0+beta2, 4.03.0+beta2+flambda, 4.03.0+beta2-no-debug, 4.03.0+fPIC, 4.03.0+flambda, 4.03.0+fp, 4.03.0+fp+flambda, 4.03.0+statistical-memprof, 4.03.0+termux, 4.03.0+trunk, 4.03.0+trunk+flambda, 4.03.0+trunk+fp, 4.03.0+trunk+fp+flambda, 4.04.0, 4.04.0+32bit, 4.04.0+BER, 4.04.0+afl, 4.04.0+beta1, 4.04.0+beta1+flambda, 4.04.0+beta2, 4.04.0+beta2+flambda, 4.04.0+bytecode-only, 4.04.0+copatterns, 4.04.0+fPIC, 4.04.0+flambda, 4.04.0+fp, 4.04.0+fp+flambda, 4.04.0+safe-string, 4.04.0+spacetime, 4.04.0+termux, 4.04.0+trunk+forced_lto, 4.04.1, 4.04.1+32bit, 4.04.1+bytecode-only, 4.04.1+fPIC, 4.04.1+flambda, 4.04.1+fp, 4.04.1+fp+flambda, 4.04.1+safe-string, 4.04.1+spacetime, 4.04.2, 4.04.2+32bit, 4.04.2+bytecode-only, 4.04.2+fPIC, 4.04.2+flambda, 4.04.2+fp, 4.04.2+fp+flambda, 4.04.2+safe-string, 4.04.2+spacetime, 4.05.0, 4.05.0+32bit, 4.05.0+afl, 4.05.0+beta1, 4.05.0+beta1+flambda, 4.05.0+beta2, 4.05.0+beta2+flambda, 4.05.0+beta3, 4.05.0+flambda, 4.05.0+lto, 4.05.0+musl+static+flambda, 4.05.0+rc1, 4.05.0+rc1+flambda, 4.05.0+safe-string, 4.05.0+spacetime, 4.05.0+statistical-memprof, 4.05.0+trunk, 4.05.0+trunk+afl, 4.05.0+trunk+flambda, 4.05.0+trunk+fp, 4.05.0+trunk+fp+flambda, 4.05.0+trunk+safe-string, 4.06.0, 4.06.0+afl, 4.06.0+beta1, 4.06.0+beta1+afl, 4.06.0+beta1+default-unsafe-string, 4.06.0+beta1+flambda, 4.06.0+beta1+force-safe-string, 4.06.0+beta1+fp, 4.06.0+beta1+fp+flambda, 4.06.0+beta2, 4.06.0+beta2+afl, 4.06.0+beta2+default-unsafe-string, 4.06.0+beta2+flambda, 4.06.0+beta2+force-safe-string, 4.06.0+beta2+fp, 4.06.0+beta2+fp+flambda, 4.06.0+default-unsafe-string, 4.06.0+flambda, 4.06.0+force-safe-string, 4.06.0+fp, 4.06.0+fp+flambda, 4.06.0+rc1, 4.06.0+rc1+afl, 4.06.0+rc1+default-unsafe-string, 4.06.0+rc1+flambda, 4.06.0+rc1+force-safe-string, 4.06.0+rc1+fp, 4.06.0+rc1+fp+flambda, 4.06.0+statistical-memprof, 4.06.1+trunk, 4.06.1+trunk+afl, 4.06.1+trunk+flambda, 4.06.1+trunk+fp, 4.06.1+trunk+fp+flambda, 4.06.1+trunk+safe-string, 4.07.0+trunk, 4.07.0+trunk+afl, 4.07.0+trunk+flambda, 4.07.0+trunk+fp, 4.07.0+trunk+fp+flambda, 4.07.0+trunk+unsafe-string, system }
00:00.285  STATE                   REPOS     : { default }
00:00.285  STATE                   PACKAGES  : 7796 packages
00:00.285  STATE                   INSTALLED : { base-bigarray.base, base-threads.base, base-unix.base, conf-m4.1, ocamlbuild.0.12.0, result.1.2 }
00:00.285  STATE                   ROOTS     : { base-bigarray.base, base-threads.base, base-unix.base }
00:00.285  STATE                   REINSTALL : {}
00:00.285  STATE                   State install loaded in 0.117s
00:00.285  FILE(export)            Wrote ~/.opam/system/backup/state-20171019165924.export in 0.000s
00:00.342  CLIENT                  INSTALL ocamlfind
00:00.824  CLIENT                  Orphans: full {}, versions {}
00:00.902  SOLVER                  resolve request=install:(ocamlfind) remove:() upgrade:()
00:00.902  SOLVER                  cudf_versions_map
00:01.021  SOLVER                  Load cudf universe (depopts:false, build:true)
00:01.807  CUDF                    resolve request=install:(ocamlfind) remove:() upgrade:() criteria:"-count(removed),-notuptodate(request),-sum(request,version-lag),-count(down),-notuptodate(changed),-count(changed),-notuptodate(solution),-sum(solution,version-lag)"
00:02.097  SYSTEM                  [log-48475-9b8556] (in 0.001s) aspcud /Users/niksaz/.opam/log/solver-in-48475-ccabea /Users/niksaz/.opam/log/solver-out-48475-42bb52 -count(removed),-notuptodate(request),-sum(request,version-lag),-count(down),-notuptodate(changed),-count(changed),-notuptodate(solution),-sum(solution,version-lag)
00:02.097  SYSTEM                  rm /Users/niksaz/.opam/log/solver-in-48475-ccabea
00:02.097  SYSTEM                  rm /Users/niksaz/.opam/log/solver-out-48475-42bb52
00:02.126  SOLVER                  Load cudf universe (depopts:false, build:true)
00:02.940  SOLVER                  Load cudf universe (depopts:true, build:false)
00:03.744  SOLVER                  Load cudf universe (depopts:true, build:true)
00:04.611  CUDF                    graph_of_actions root_actions={  - install ocamlfind.22 }
00:04.616  SOLUTION                apply
The following actions will be performed:
  ∗  install ocamlfind 1.7.3
00:04.616  SOLUTION                parallel_apply

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
00:04.616  PARALLEL                Iterate over 1 task(s) with 3 process(es)
00:04.617  PARALLEL                Starting job 0 (worker 1/3): 0
00:04.617  ACTION                  download_package: ocamlfind.1.7.3
00:04.617  STATE                   get_archive ocamlfind.1.7.3
00:04.617  CURL                    pull-archive
[ocamlfind] Archive in cache
00:04.804  SYSTEM                  rm /Users/niksaz/.opam/archives/ocamlfind.1.7.3+opam.tar.gz
00:04.812  SYSTEM                  [log-48475-7afd23] (in 0.003s) cp /Users/niksaz/.opam/repo/default/archives/ocamlfind.1.7.3+opam.tar.gz /Users/niksaz/.opam/archives/ocamlfind.1.7.3+opam.tar.gz
00:04.813  PARALLEL                Job 0 finished

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
00:04.813  PARALLEL                Iterate over 1 task(s) with 4 process(es)
00:04.814  PARALLEL                Starting job 186431316 (worker 1/4): ∗  ocamlfind.1.7.3
00:04.814  ACTION                  extract_package: ocamlfind.1.7.3 from /Users/niksaz/.opam/archives/ocamlfind.1.7.3+opam.tar.gz
00:04.814  SYSTEM                  rmdir /Users/niksaz/.opam/system/build/ocamlfind.1.7.3
00:04.842  SYSTEM                  mkdir /var/folders/c2/11r40v0113n0lxyjk9y6tqzc0000gn/T/opam-48475-58c514
+ tar "xfz" "/Users/niksaz/.opam/archives/ocamlfind.1.7.3+opam.tar.gz" "-C" "/var/folders/c2/11r40v0113n0lxyjk9y6tqzc0000gn/T/opam-48475-58c514"
00:04.889  SYSTEM                  [log-48475-ffb3fd] (in 0.003s) tar xfz /Users/niksaz/.opam/archives/ocamlfind.1.7.3+opam.tar.gz -C /var/folders/c2/11r40v0113n0lxyjk9y6tqzc0000gn/T/opam-48475-58c514
+ mv "/var/folders/c2/11r40v0113n0lxyjk9y6tqzc0000gn/T/opam-48475-58c514/ocamlfind.1.7.3" "/Users/niksaz/.opam/system/build/ocamlfind.1.7.3"
00:04.899  SYSTEM                  [log-48475-1872ec] (in 0.003s) mv /var/folders/c2/11r40v0113n0lxyjk9y6tqzc0000gn/T/opam-48475-58c514/ocamlfind.1.7.3 /Users/niksaz/.opam/system/build/ocamlfind.1.7.3
00:04.900  SYSTEM                  rmdir /var/folders/c2/11r40v0113n0lxyjk9y6tqzc0000gn/T/opam-48475-58c514
00:04.903  ACTION                  ocamlfind: applying check-num-in-sitelib.patch.

00:04.912  SYSTEM                  [log-48475-6d07ae] (in 0.003s) patch -p0 -i /Users/niksaz/.opam/system/build/ocamlfind.1.7.3/check-num-in-sitelib.patch --dry-run
00:04.917  SYSTEM                  [log-48475-c61e7b] (in 0.001s) patch -p1 -i /Users/niksaz/.opam/system/build/ocamlfind.1.7.3/check-num-in-sitelib.patch --dry-run
+ patch "-p1" "-i" "/Users/niksaz/.opam/system/build/ocamlfind.1.7.3/check-num-in-sitelib.patch"
- patching file configure
00:04.922  SYSTEM                  [log-48475-d2d111] (in 0.001s) patch -p1 -i /Users/niksaz/.opam/system/build/ocamlfind.1.7.3/check-num-in-sitelib.patch
00:04.929  PARALLEL                Next task in job 186431316: ./configure -bindir /Users/niksaz/.opam/system/bin -sitelib /Users/niksaz/.opam/system/lib -mandir /Users/niksaz/.opam/system/man -config /Users/niksaz/.opam/system/lib/findlib.conf -no-custom -no-topfind
[ocamlfind: ./configure] Command started
Processing  1/1: [ocamlfind: ./configure]
+ ./configure "-bindir" "/Users/niksaz/.opam/system/bin" "-sitelib" "/Users/niksaz/.opam/system/lib" "-mandir" "/Users/niksaz/.opam/system/man" "-config" "/Users/niksaz/.opam/system/lib/findlib.conf" "-no-custom" "-no-topfind" (CWD=/Users/niksaz/.opam/system/build/ocamlfind.1.7.3)
- Welcome to findlib version 1.7.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...
- native dynlink: found
- labltk: not present
- ocamlbuild: not present
- camlp4: using camlp4, style 310
- compiler-libs: found
- dbm: not present (normal since OCaml-4.00)
- num: not present (normal since OCaml-4.06)
- bytes: found, installing fake library
- spacetime: found
- Configuration for dynlink written to site-lib-src/dynlink/META
- Configuration for graphics written to site-lib-src/graphics/META
- Configuration for str written to site-lib-src/str/META
- Configuration for threads written to site-lib-src/threads/META
- Configuration for unix written to site-lib-src/unix/META
- Configuration for stdlib written to site-lib-src/stdlib/META
- Configuration for bigarray written to site-lib-src/bigarray/META
- Configuration for ocamldoc written to site-lib-src/ocamldoc/META
- Configuration for camlp4 written to site-lib-src/camlp4/META
- Configuration for compiler-libs written to site-lib-src/compiler-libs/META
- Configuration for bytes written to site-lib-src/bytes/META
- Configuration for raw_spacetime written to site-lib-src/raw_spacetime/META
- Detecting compiler arguments: (extractor built) ok
-
- About the OCAML core installation:
-     Standard library:      /usr/local/lib/ocaml
-     Binaries:              /usr/local/bin
-     Manual pages:          /usr/local/man
-     Multi-threading type:  posix
- The directory of site-specific packages will be
-     site-lib:              /Users/niksaz/.opam/system/lib
- The configuration file is written to:
-     findlib config file:   /Users/niksaz/.opam/system/lib/findlib.conf
- Software will be installed:
-     Libraries:             in <site-lib>/findlib
-     Binaries:              /Users/niksaz/.opam/system/bin
-     Manual pages:          /Users/niksaz/.opam/system/man
-     topfind script:        omitted
- Topfind ppxopt support:    yes
- Toolbox:                   no
- Link custom runtime:       no
- Need bytes compatibility:  no
-
- Configuration has been written to Makefile.config
-
- You can now do 'make all', and optionally 'make opt', to build ocamlfind.
00:05.326  PARALLEL                Collected task for job 186431316 (ret:0)
00:05.326  PARALLEL                Next task in job 186431316: make all
[ocamlfind: make all] Command started
Processing  1/1: [ocamlfind: make all]
+ make "all" (CWD=/Users/niksaz/.opam/system/build/ocamlfind.1.7.3)
- for p in findlib; do ( cd src/$p; /Applications/Xcode.app/Contents/Developer/usr/bin/make all ) || exit; done
- ocamllex fl_meta.mll
- 22 states, 392 transitions, table size 1700 bytes
- ocamldep *.ml *.mli >depend
- USE_CYGPATH="0"; \
- 	export USE_CYGPATH; \
- 	cat findlib_config.mlp | \
- 	         ../../tools/patch '@CONFIGFILE@' '/Users/niksaz/.opam/system/lib/findlib.conf' | \
- 	         ../../tools/patch '@STDLIB@' '/usr/local/lib/ocaml' | \
- 		sed -e 's;@AUTOLINK@;true;g' \
- 		    -e 's;@SYSTEM@;system: macosx;g' \
- 		     >findlib_config.ml
- Makefile:184: depend: No such file or directory
- sed: 1: "s;@SYSTEM@;\033[01;31m\033[Ks ...": bad flag in substitute command: 'm'
- make[1]: *** [findlib_config.ml] Error 1
- make: *** [all] Error 2
00:05.398  PARALLEL                Collected task for job 186431316 (ret:2)
[ERROR] The compilation of ocamlfind failed at "make all".
00:05.398  ACTION                  Removing ocamlfind.1.7.3 (false)
00:05.403  PARALLEL                Next task in job 186431316: ocamlfind remove bytes
[ocamlfind: ocamlfind remove] Command started
Processing  1/1: [ocamlfind: ocamlfind remove]
+ ocamlfind "remove" "bytes" (CWD=/Users/niksaz/.opam/system/build/ocamlfind.1.7.3)
- ocamlfind: [WARNING] No such file: /usr/local/lib/ocaml/site-lib/bytes/META
00:05.412  PARALLEL                Collected task for job 186431316 (ret:0)
00:05.412  PARALLEL                Next task in job 186431316: ./configure -bindir /Users/niksaz/.opam/system/bin -sitelib /Users/niksaz/.opam/system/lib -mandir /Users/niksaz/.opam/system/man -config /Users/niksaz/.opam/system/lib/findlib.conf -no-topfind
[ocamlfind: ./configure] Command started
Processing  1/1: [ocamlfind: ./configure]
+ ./configure "-bindir" "/Users/niksaz/.opam/system/bin" "-sitelib" "/Users/niksaz/.opam/system/lib" "-mandir" "/Users/niksaz/.opam/system/man" "-config" "/Users/niksaz/.opam/system/lib/findlib.conf" "-no-topfind" (CWD=/Users/niksaz/.opam/system/build/ocamlfind.1.7.3)
- Welcome to findlib version 1.7.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...
- native dynlink: found
- labltk: not present
- ocamlbuild: not present
- camlp4: using camlp4, style 310
- compiler-libs: found
- dbm: not present (normal since OCaml-4.00)
- num: not present (normal since OCaml-4.06)
- bytes: found, installing fake library
- spacetime: found
- Configuration for dynlink written to site-lib-src/dynlink/META
- Configuration for graphics written to site-lib-src/graphics/META
- Configuration for str written to site-lib-src/str/META
- Configuration for threads written to site-lib-src/threads/META
- Configuration for unix written to site-lib-src/unix/META
- Configuration for stdlib written to site-lib-src/stdlib/META
- Configuration for bigarray written to site-lib-src/bigarray/META
- Configuration for ocamldoc written to site-lib-src/ocamldoc/META
- Configuration for camlp4 written to site-lib-src/camlp4/META
- Configuration for compiler-libs written to site-lib-src/compiler-libs/META
- Configuration for bytes written to site-lib-src/bytes/META
- Configuration for raw_spacetime written to site-lib-src/raw_spacetime/META
- Detecting compiler arguments: (extractor built) ok
-
- About the OCAML core installation:
-     Standard library:      /usr/local/lib/ocaml
-     Binaries:              /usr/local/bin
-     Manual pages:          /usr/local/man
-     Multi-threading type:  posix
- The directory of site-specific packages will be
-     site-lib:              /Users/niksaz/.opam/system/lib
- The configuration file is written to:
-     findlib config file:   /Users/niksaz/.opam/system/lib/findlib.conf
- Software will be installed:
-     Libraries:             in <site-lib>/findlib
-     Binaries:              /Users/niksaz/.opam/system/bin
-     Manual pages:          /Users/niksaz/.opam/system/man
-     topfind script:        omitted
- 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.
00:05.800  PARALLEL                Collected task for job 186431316 (ret:0)
00:05.800  PARALLEL                Next task in job 186431316: make uninstall
[ocamlfind: make uninstall] Command started
Processing  1/1: [ocamlfind: make uninstall]
+ make "uninstall" (CWD=/Users/niksaz/.opam/system/build/ocamlfind.1.7.3)
- /Applications/Xcode.app/Contents/Developer/usr/bin/make uninstall-doc
- rm -f "/Users/niksaz/.opam/system/man/man1/ocamlfind.1"
- rm -f "/Users/niksaz/.opam/system/man/man3/Findlib.3"
- rm -f "/Users/niksaz/.opam/system/man/man3/Topfind.3"
- rm -f "/Users/niksaz/.opam/system/man/man5/META.5"
- rm -f "/Users/niksaz/.opam/system/man/man5/site-lib.5"
- /Applications/Xcode.app/Contents/Developer/usr/bin/make uninstall-meta
- for x in `ls site-lib-src`; do if [ -f "site-lib-src/$x/META" ]; then rm -rf "/Users/niksaz/.opam/system/lib/$x"; fi; done
- for p in `cd src; echo *`; do ( cd src/$p; /Applications/Xcode.app/Contents/Developer/usr/bin/make uninstall ); done
- rm -rf "/Users/niksaz/.opam/system/lib/bytes"
- USE_CYGPATH="0"; \
- 	export USE_CYGPATH; \
- 	cat findlib_config.mlp | \
- 	         ../../tools/patch '@CONFIGFILE@' '/Users/niksaz/.opam/system/lib/findlib.conf' | \
- 	         ../../tools/patch '@STDLIB@' '/usr/local/lib/ocaml' | \
- 		sed -e 's;@AUTOLINK@;true;g' \
- 		    -e 's;@SYSTEM@;system: macosx;g' \
- 		     >findlib_config.ml
- true
- /Applications/Xcode.app/Contents/Developer/usr/bin/make uninstall-config
- Leaving /Users/niksaz/.opam/system/lib/findlib.conf installed, consider manual removal
- sed: 1: "s;@SYSTEM@;\033[01;31m\033[Ks ...": bad flag in substitute command: 'm'
- make[1]: *** [findlib_config.ml] Error 1
00:05.897  PARALLEL                Collected task for job 186431316 (ret:0)
00:05.897  PARALLEL                Next task in job 186431316: rm -f /Users/niksaz/.opam/system/bin/ocaml
[ocamlfind: rm] Command started
Processing  1/1: [ocamlfind: rm]
+ rm "-f" "/Users/niksaz/.opam/system/bin/ocaml" (CWD=/Users/niksaz/.opam/system/build/ocamlfind.1.7.3)
00:05.901  PARALLEL                Collected task for job 186431316 (ret:0)
00:05.901  ACTION                  Removing config and install files
00:05.901  ACTION                  Removing files from .install
00:05.901  SYSTEM                  rmdir /Users/niksaz/.opam/system/lib/ocamlfind
00:05.901  SYSTEM                  rmdir /Users/niksaz/.opam/system/lib/ocamlfind
00:05.901  SYSTEM                  rmdir /Users/niksaz/.opam/system/share/ocamlfind
00:05.901  SYSTEM                  rmdir /Users/niksaz/.opam/system/etc/ocamlfind
00:05.901  SYSTEM                  rmdir /Users/niksaz/.opam/system/doc/ocamlfind
00:05.902  ACTION                  Removing the misc files
00:05.902  SYSTEM                  rmdir /Users/niksaz/.opam/system/overlay/ocamlfind
00:05.902  PARALLEL                Job 186431316 finished

#=== ERROR while installing ocamlfind.1.7.3 ===================================#
# opam-version 1.2.2
# os           darwin
# command      make all
# path         /Users/niksaz/.opam/system/build/ocamlfind.1.7.3
# compiler     system (4.06.0)
# exit-code    2
# env-file     /Users/niksaz/.opam/system/build/ocamlfind.1.7.3/ocamlfind-48475-d8a4ae.env
# stdout-file  /Users/niksaz/.opam/system/build/ocamlfind.1.7.3/ocamlfind-48475-d8a4ae.out
# stderr-file  /Users/niksaz/.opam/system/build/ocamlfind.1.7.3/ocamlfind-48475-d8a4ae.err
### stdout ###
# [...]
# 22 states, 392 transitions, table size 1700 bytes
# ocamldep *.ml *.mli >depend
# USE_CYGPATH="0"; \
# 	export USE_CYGPATH; \
# 	cat findlib_config.mlp | \
# 	         ../../tools/patch '@CONFIGFILE@' '/Users/niksaz/.opam/system/lib/findlib.conf' | \
# 	         ../../tools/patch '@STDLIB@' '/usr/local/lib/ocaml' | \
# 		sed -e 's;@AUTOLINK@;true;g' \
# 		    -e 's;@SYSTEM@;system: macosx;g' \
# 		     >findlib_config.ml
### stderr ###
# Makefile:184: depend: No such file or directory
# sed: 1: "s;@SYSTEM@;\033[01;31m\033[Ks ...": bad flag in substitute command: 'm'
# make[1]: *** [findlib_config.ml] Error 1
# make: *** [all] Error 2



=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
The following actions failed
  ∗  install ocamlfind 1.7.3
No changes have been performed
00:05.904  STATE                   LOAD-STATE(switch-backup-err)
00:06.014  STATE                   Loaded /Users/niksaz/.opam/state.cache in 0.109s
00:06.110  STATE                   ROOT      : /Users/niksaz/.opam
00:06.111  STATE                   SWITCH    : system
00:06.111  STATE                   COMPILER  : system
00:06.111  STATE                   COMPILERS : { 3.07, 3.07+1, 3.07+2, 3.08.0, 3.08.1, 3.08.2, 3.08.3, 3.08.4, 3.09.0, 3.09.1, 3.09.1+metaocaml, 3.09.2, 3.09.3, 3.10.0, 3.10.1, 3.10.2, 3.11.0, 3.11.1, 3.11.2, 3.12.0, 3.12.1, 4.00.0, 4.00.0+debug-runtime, 4.00.0+fp, 4.00.1, 4.00.1+BER, 4.00.1+PIC, 4.00.1+annot, 4.00.1+debug-runtime, 4.00.1+french, 4.00.1+mirage-unix, 4.00.1+mirage-xen, 4.00.1+open-types, 4.00.1+raspberrypi, 4.00.1+short-types, 4.01.0, 4.01.0+32bit, 4.01.0+BER, 4.01.0+PIC, 4.01.0+armv6-freebsd, 4.01.0+fp, 4.01.0+lsb, 4.01.0+musl, 4.01.0+musl+static, 4.01.0+open-types, 4.01.0+profile, 4.02.0, 4.02.0+PIC, 4.02.0+improved-errors, 4.02.0+modular-implicits, 4.02.0+rc1, 4.02.0+trunk, 4.02.1, 4.02.1+32bit, 4.02.1+BER, 4.02.1+PIC, 4.02.1+fp, 4.02.1+modular-implicits-ber, 4.02.1+musl, 4.02.1+musl+static, 4.02.2, 4.02.2+improved-errors, 4.02.2+rc1, 4.02.3, 4.02.3+32bit, 4.02.3+PIC, 4.02.3+buckle-1, 4.02.3+buckle-master, 4.02.3+bytecode-only, 4.02.3+curried-constr, 4.02.3+fp, 4.02.3+musl, 4.02.3+musl+static, 4.02.3+termux, 4.03.0, 4.03.0+32bit, 4.03.0+beta1, 4.03.0+beta1+flambda, 4.03.0+beta1-no-debug, 4.03.0+beta2, 4.03.0+beta2+flambda, 4.03.0+beta2-no-debug, 4.03.0+fPIC, 4.03.0+flambda, 4.03.0+fp, 4.03.0+fp+flambda, 4.03.0+statistical-memprof, 4.03.0+termux, 4.03.0+trunk, 4.03.0+trunk+flambda, 4.03.0+trunk+fp, 4.03.0+trunk+fp+flambda, 4.04.0, 4.04.0+32bit, 4.04.0+BER, 4.04.0+afl, 4.04.0+beta1, 4.04.0+beta1+flambda, 4.04.0+beta2, 4.04.0+beta2+flambda, 4.04.0+bytecode-only, 4.04.0+copatterns, 4.04.0+fPIC, 4.04.0+flambda, 4.04.0+fp, 4.04.0+fp+flambda, 4.04.0+safe-string, 4.04.0+spacetime, 4.04.0+termux, 4.04.0+trunk+forced_lto, 4.04.1, 4.04.1+32bit, 4.04.1+bytecode-only, 4.04.1+fPIC, 4.04.1+flambda, 4.04.1+fp, 4.04.1+fp+flambda, 4.04.1+safe-string, 4.04.1+spacetime, 4.04.2, 4.04.2+32bit, 4.04.2+bytecode-only, 4.04.2+fPIC, 4.04.2+flambda, 4.04.2+fp, 4.04.2+fp+flambda, 4.04.2+safe-string, 4.04.2+spacetime, 4.05.0, 4.05.0+32bit, 4.05.0+afl, 4.05.0+beta1, 4.05.0+beta1+flambda, 4.05.0+beta2, 4.05.0+beta2+flambda, 4.05.0+beta3, 4.05.0+flambda, 4.05.0+lto, 4.05.0+musl+static+flambda, 4.05.0+rc1, 4.05.0+rc1+flambda, 4.05.0+safe-string, 4.05.0+spacetime, 4.05.0+statistical-memprof, 4.05.0+trunk, 4.05.0+trunk+afl, 4.05.0+trunk+flambda, 4.05.0+trunk+fp, 4.05.0+trunk+fp+flambda, 4.05.0+trunk+safe-string, 4.06.0, 4.06.0+afl, 4.06.0+beta1, 4.06.0+beta1+afl, 4.06.0+beta1+default-unsafe-string, 4.06.0+beta1+flambda, 4.06.0+beta1+force-safe-string, 4.06.0+beta1+fp, 4.06.0+beta1+fp+flambda, 4.06.0+beta2, 4.06.0+beta2+afl, 4.06.0+beta2+default-unsafe-string, 4.06.0+beta2+flambda, 4.06.0+beta2+force-safe-string, 4.06.0+beta2+fp, 4.06.0+beta2+fp+flambda, 4.06.0+default-unsafe-string, 4.06.0+flambda, 4.06.0+force-safe-string, 4.06.0+fp, 4.06.0+fp+flambda, 4.06.0+rc1, 4.06.0+rc1+afl, 4.06.0+rc1+default-unsafe-string, 4.06.0+rc1+flambda, 4.06.0+rc1+force-safe-string, 4.06.0+rc1+fp, 4.06.0+rc1+fp+flambda, 4.06.0+statistical-memprof, 4.06.1+trunk, 4.06.1+trunk+afl, 4.06.1+trunk+flambda, 4.06.1+trunk+fp, 4.06.1+trunk+fp+flambda, 4.06.1+trunk+safe-string, 4.07.0+trunk, 4.07.0+trunk+afl, 4.07.0+trunk+flambda, 4.07.0+trunk+fp, 4.07.0+trunk+fp+flambda, 4.07.0+trunk+unsafe-string, system }
00:06.111  STATE                   REPOS     : { default }
00:06.111  STATE                   PACKAGES  : 7796 packages
00:06.111  STATE                   INSTALLED : { base-bigarray.base, base-threads.base, base-unix.base, conf-m4.1, ocamlbuild.0.12.0, result.1.2 }
00:06.111  STATE                   ROOTS     : { base-bigarray.base, base-threads.base, base-unix.base }
00:06.111  STATE                   REINSTALL : {}
00:06.111  STATE                   State switch-backup-err loaded in 0.205s
00:06.111  SYSTEM                  rm /Users/niksaz/.opam/system/backup/state-20171019165924.export
00:06.112  SYSTEM                  Lock released on /Users/niksaz/.opam/system/lock
00:06.112  SYSTEM                  Lock released on /Users/niksaz/.opam/lock
'opam install --debug -v -v ocamlfind' failed.

$ env

CAML_LD_LIBRARY_PATH=/Users/niksaz/.opam/system/lib/stublibs:/usr/local/lib/ocaml/stublibs
MANPATH=:/Users/niksaz/.opam/system/man
LESS_TERMCAP_mb=
TERM_PROGRAM=iTerm.app
LESS_TERMCAP_md=
LESS_TERMCAP_me=
TERM=xterm-256color
SHELL=/bin/bash
CLICOLOR=1
TMPDIR=/var/folders/c2/11r40v0113n0lxyjk9y6tqzc0000gn/T/
PERL5LIB=/Users/niksaz/.opam/system/lib/perl5:
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.0pCS0MlJd0/Render
TERM_PROGRAM_VERSION=3.1.5
LESS_TERMCAP_ue=
TERM_SESSION_ID=w0t0p0:C2B2076E-3DC6-454A-86AA-FCC3281BCD69
LC_ALL=en_US.UTF-8
OCAML_TOPLEVEL_PATH=/Users/niksaz/.opam/system/lib/toplevel
USER=niksaz
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.j3I6RNCkBV/Listeners
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
LESS_TERMCAP_us=
OPAMUTF8MSGS=1
FONTCONFIG_PATH=/opt/X11/lib/X11/fontconfig
PATH=/Users/niksaz/.opam/system/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/opt/local/bin:/opt/local/sbin:/Users/niksaz/.cabal/bin:/opt/local/bin:/opt/local/sbin:/Users/niksaz/MongoDB/bin:/usr/local/mysql/bin:/usr/local/pgsql/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Users/niksaz/Downloads:/usr/local/go/bin:/opt/X11/bin:/usr/local/CrossPack-AVR/bin
PWD=/Users/niksaz
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home
LANG=en_US.UTF-8
ITERM_PROFILE=niksaz
XPC_FLAGS=0x0
PS1=\[\e[1;31m\]\!:\[\e[34m\]\w\[\e[95m\]$\[\e[m\]
XPC_SERVICE_NAME=0
SHLVL=1
HOME=/Users/niksaz
COLORFGBG=12;8
GREP_OPTIONS=--color=always
ITERM_SESSION_ID=w0t0p0:C2B2076E-3DC6-454A-86AA-FCC3281BCD69
LOGNAME=niksaz
LESS_TERMCAP_so=
LC_CTYPE=UTF-8
DISPLAY=/private/tmp/com.apple.launchd.IFOB2mADYa/org.macosforge.xquartz:0
LESS_TERMCAP_se=
COLORTERM=truecolor
_=/usr/bin/env

@dbuenzli
Copy link
Contributor

I suspect it is not a good idea to have this in your environment:

GREP_OPTIONS=--color=always

grep is being used quite a bit in ocamlfind's configure and Makefile and conjecture this the source of the odd escapes sequences you can see in the data it tries to sed.

@niksaz
Copy link
Author

niksaz commented Nov 19, 2017

You are correct! That was the source of the error.
Thanks, Daniel.

@niksaz niksaz closed this as completed Nov 19, 2017
@dbuenzli
Copy link
Contributor

Excellent, happy OCaml hacking.

@niksaz
Copy link
Author

niksaz commented Nov 19, 2017

Thanks! Excited to try out OCaml.

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

No branches or pull requests

2 participants