Skip to content

npm install fails with 4.04.0 installed globally #11

@slogsdon

Description

@slogsdon

Running npm install fails when OCaml 4.04.0 is installed globally:

$ opam switch
--     -- 3.07    Official 3.07 release
--     -- 3.08.0  Official 3.08.0 release
--     -- 3.08.1  Official 3.08.1 release
--     -- 3.08.2  Official 3.08.2 release
--     -- 3.08.3  Official 3.08.3 release
--     -- 3.08.4  Official 3.08.4 release
--     -- 3.09.0  Official 3.09.0 release
--     -- 3.09.1  Official 3.09.1 release
--     -- 3.09.2  Official 3.09.2 release
--     -- 3.09.3  Official 3.09.3 release
--     -- 3.10.0  Official 3.10.0 release
--     -- 3.10.1  Official 3.10.1 release
--     -- 3.10.2  Official 3.10.2 release
--     -- 3.11.0  Official 3.11.0 release
--     -- 3.11.1  Official 3.11.1 release
--     -- 3.11.2  Official 3.11.2 release
--     -- 3.12.0  Official 3.12.0 release
--     -- 3.12.1  Official 3.12.1 release
--     -- 4.00.0  Official 4.00.0 release
--     -- 4.00.1  Official 4.00.1 release
--     -- 4.01.0  Official 4.01.0 release
--     -- 4.02.0  Official 4.02.0 release
--     -- 4.02.1  Official 4.02.1 release
--     -- 4.02.2  Official 4.02.2 release
4.02.3  C 4.02.3  Official 4.02.3 release
--     -- 4.03.0  Official 4.03.0 release
--     -- 4.04.0  Official 4.04.0 release
system  I system  System compiler (4.04.0)
# 244 more patched or experimental compilers, use '--all' to show
$ opam switch system
$ eval `opam config env`
$ git clone https://github.com/reasonml/ReasonProject HelloReason
$ cd HelloReason
$ npm install
# ... later
ocamlc -I +compiler-libs -g -c fl_lint.ml
ocamlc -I +compiler-libs -a -o findlib.cma findlib_config.cmo fl_split.cmo fl_metatoken.cmo fl_meta.cmo fl_metascanner.cmo fl_topo.cmo fl_package_base.cmo findlib.cmo fl_args.cmo fl_lint.cmo
ocamlc -I +compiler-libs -g -c ocaml_args.ml
ocamlc -I +compiler-libs -g -c frontend.ml
File "frontend.ml", line 1787, characters 16-29:
Warning 3: deprecated: String.create
Use Bytes.create instead.
ocamlc -I +compiler-libs  -o ocamlfind -g findlib.cma unix.cma \
                   ocaml_args.cmo frontend.cmo
File "_none_", line 1:
Error: Error on dynamically loaded library: /usr/local/lib/ocaml/stublibs/dllunix.so: dlopen(/usr/local/lib/ocaml/stublibs/dllunix.so, 138): Symbol not found: _caml_string_is_c_safe
  Referenced from: /usr/local/lib/ocaml/stublibs/dllunix.so
  Expected in: flat namespace
 in /usr/local/lib/ocaml/stublibs/dllunix.so
make[1]: *** [ocamlfind] Error 2
make: *** [all] Error 2
ReasonProject@0.0.1 /Users/shane.logsdon/Code/reason/HelloReason
├─┬ @opam-alpha/merlin@2.5.1
│ └─┬ merlin-actual@2.5.1  (git://github.com/npm-opam/merlin.git#5b236062b3cceff3e653ba47283159cf6895a93b)
│   ├─┬ @opam-alpha/yojson@1.3.3
│   │ └─┬ yojson-actual@1.3.3  (git://github.com/npm-opam/yojson.git#a72727dd8899c53153fd8a7cea06c626d0a71faf)
│   │   ├─┬ @opam-alpha/biniou@1.0.12
│   │   │ └─┬ biniou-actual@1.0.12  (git://github.com/npm-opam/biniou.git#198ece6041aa0853bc1637475796840b3daae5a9)
│   │   │   └─┬ @opam-alpha/conf-which@1.0.0
│   │   │     └── conf-which-actual@1.0.0  (git://github.com/npm-opam/conf-which.git#0b798e035ea41e43744ff28075b15d1a5dc9ac99)
│   │   ├─┬ @opam-alpha/cppo@1.4.1
│   │   │ └─┬ cppo-actual@1.4.1  (git://github.com/npm-opam/cppo.git#f93baf17d8099c5866df939264ddddb6457aa7d2)
│   │   │   └── @opam-alpha/ocamlbuild@0.9.2
│   │   └─┬ @opam-alpha/easy-format@1.2.0
│   │     └── easy-format-actual@1.2.0  (git://github.com/npm-opam/easy-format.git#9a61ee2ca3cff40b50a36dc66dcb7761d096a451)
│   ├─┬ opam-installer-bin@0.0.0  (git+https://github.com/yunxing/opam-installer-bin.git#689ede681217f76fb2f82a9f4528e192a5b543ba)
│   │ ├── dependency-env@0.1.1  (git+https://github.com/npm-ml/dependency-env.git#94c75aff3a71587afb570d89bcf2eef7996bb67f)
│   │ └── nopam@0.1.0  (git+https://github.com/yunxing/nopam.git#7cd19f068ac9aaf75010cd6961f7c65c779a1d4a)
│   └── substs@0.0.1  (git+https://github.com/yunxing/substs.git#fd480dcdb4aed3fa9128fd819a546e3a7770040f)
├─┬ @opam-alpha/ocaml@4.2.3
│ └── ocaml@4.2.3  (git+https://github.com/npm-opam/ocaml.git#0bb98be8e5233a02282ed8de0c8965677ddbde33)
├─┬ dependency-env@0.0.1
│ └── resolve@1.2.0
├── fastrealpath@0.1.1
└── nopam@0.1.0

npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/Cellar/node/7.3.0/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v7.3.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! ocamlfind-actual@1.6.2 postinstall: `eval $(dependencyEnv) && nopam && ./configure -no-camlp4 -bindir $opam_bin -sitelib $opam_lib -mandir $opam_man -config $opam_lib/findlib.conf -no-custom && make all && make opt && make install`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the ocamlfind-actual@1.6.2 postinstall script 'eval $(dependencyEnv) && nopam && ./configure -no-camlp4 -bindir $opam_bin -sitelib $opam_lib -mandir $opam_man -config $opam_lib/findlib.conf -no-custom && make all && make opt && make install'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ocamlfind-actual package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     eval $(dependencyEnv) && nopam && ./configure -no-camlp4 -bindir $opam_bin -sitelib $opam_lib -mandir $opam_man -config $opam_lib/findlib.conf -no-custom && make all && make opt && make install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs ocamlfind-actual
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls ocamlfind-actual
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/shane.logsdon/Code/reason/HelloReason/npm-debug.log

Switching to 4.02.3 seems to correct the issue:

$ cd ..
$ rm -rf HelloReason
$ opam switch
--     -- 3.07    Official 3.07 release
--     -- 3.08.0  Official 3.08.0 release
--     -- 3.08.1  Official 3.08.1 release
--     -- 3.08.2  Official 3.08.2 release
--     -- 3.08.3  Official 3.08.3 release
--     -- 3.08.4  Official 3.08.4 release
--     -- 3.09.0  Official 3.09.0 release
--     -- 3.09.1  Official 3.09.1 release
--     -- 3.09.2  Official 3.09.2 release
--     -- 3.09.3  Official 3.09.3 release
--     -- 3.10.0  Official 3.10.0 release
--     -- 3.10.1  Official 3.10.1 release
--     -- 3.10.2  Official 3.10.2 release
--     -- 3.11.0  Official 3.11.0 release
--     -- 3.11.1  Official 3.11.1 release
--     -- 3.11.2  Official 3.11.2 release
--     -- 3.12.0  Official 3.12.0 release
--     -- 3.12.1  Official 3.12.1 release
--     -- 4.00.0  Official 4.00.0 release
--     -- 4.00.1  Official 4.00.1 release
--     -- 4.01.0  Official 4.01.0 release
--     -- 4.02.0  Official 4.02.0 release
--     -- 4.02.1  Official 4.02.1 release
--     -- 4.02.2  Official 4.02.2 release
4.02.3  I 4.02.3  Official 4.02.3 release
--     -- 4.03.0  Official 4.03.0 release
--     -- 4.04.0  Official 4.04.0 release
system  C system  System compiler (4.04.0)
# 244 more patched or experimental compilers, use '--all' to show
$ opam switch 4.02.3
$ eval `opam config env`
$ git clone https://github.com/reasonml/ReasonProject HelloReason
$ cd HelloReason
$ npm install
# ... later
> ReasonProject@0.0.1 postinstall /Users/shane.logsdon/Code/reason/HelloReason
> npm run reasonBuild


> ReasonProject@0.0.1 reasonBuild /Users/shane.logsdon/Code/reason/HelloReason
> eval $(dependencyEnv) && nopam && rebuild -I src ./src/Test.native 2>&1 | refmterr

/Users/shane.logsdon/Code/reason/HelloReason/node_modules/ocaml/bin/ocamldep.opt -modules -pp refmt -impl src/Test.re | tee src/Test.re.depends > src/Test.ml.depends
env OCAMLC="ocamlc.opt" /Users/shane.logsdon/code/reason/HelloReason/node_modules/reason/_build/ocamlfind/bin/rec -c -I src -pp refmt -o src/Test.cmo -intf-suffix .rei -impl src/Test.re
env OCAMLOPT="ocamlopt.opt" /Users/shane.logsdon/code/reason/HelloReason/node_modules/reason/_build/ocamlfind/bin/reopt -c -I src -pp refmt -o src/Test.cmx -intf-suffix .rei -impl src/Test.re
env OCAMLOPT="ocamlopt.opt" /Users/shane.logsdon/code/reason/HelloReason/node_modules/reason/_build/ocamlfind/bin/reopt src/Test.cmx -o src/Test.native
✔ Seems fine!
ReasonProject@0.0.1 /Users/shane.logsdon/Code/reason/HelloReason
├─┬ @opam-alpha/merlin@2.5.1
│ └─┬ merlin-actual@2.5.1  (git://github.com/npm-opam/merlin.git#5b236062b3cceff3e653ba47283159cf6895a93b)
│   └─┬ @opam-alpha/yojson@1.3.3
│     └─┬ yojson-actual@1.3.3  (git://github.com/npm-opam/yojson.git#a72727dd8899c53153fd8a7cea06c626d0a71faf)
│       └─┬ @opam-alpha/biniou@1.0.12
│         └─┬ biniou-actual@1.0.12  (git://github.com/npm-opam/biniou.git#198ece6041aa0853bc1637475796840b3daae5a9)
│           └─┬ @opam-alpha/conf-which@1.0.0
│             └── conf-which-actual@1.0.0  (git://github.com/npm-opam/conf-which.git#0b798e035ea41e43744ff28075b15d1a5dc9ac99)
├─┬ @opam-alpha/ocaml@4.2.3
│ └── ocaml@4.2.3  (git+https://github.com/npm-opam/ocaml.git#0bb98be8e5233a02282ed8de0c8965677ddbde33)
├─┬ dependency-env@0.0.1
│ └── resolve@1.2.0
├── fastrealpath@0.1.1
├── nopam@0.1.0
└─┬ reason@1.4.0
  ├─┬ @opam-alpha/BetterErrors@0.0.1
  │ └─┬ BetterErrors-actual@0.0.1  (git://github.com/npm-opam/BetterErrors.git#3a8c29bb67089b4b615ced135f3bd608be0e5aa0)
  │   └─┬ @opam-alpha/ANSITerminal@0.7.0
  │     └── ANSITerminal-actual@0.7.0  (git://github.com/npm-opam/ANSITerminal.git#787c809f7b3e0d6445b803805f81a74a2af7b503)
  ├─┬ @opam-alpha/easy-format@1.2.0
  │ └── easy-format-actual@1.2.0  (git://github.com/npm-opam/easy-format.git#9a61ee2ca3cff40b50a36dc66dcb7761d096a451)
  ├─┬ @opam-alpha/menhir@20160825.0.0
  │ └─┬ menhir-actual@20160825.0.0  (git://github.com/npm-opam/menhir.git#8d6905e8eeb4bedcec501a14fdc7a7d950f85874)
  │   └── @opam-alpha/ocamlbuild@0.9.2
  ├─┬ @opam-alpha/merlin-extend@0.3.0
  │ └─┬ merlin-extend-actual@0.3.0  (git://github.com/npm-opam/merlin-extend.git#8d01d124db27f46a27e04f25d0e1c54bab0d0f48)
  │   └─┬ @opam-alpha/cppo@1.4.1
  │     └── cppo-actual@1.4.1  (git://github.com/npm-opam/cppo.git#f93baf17d8099c5866df939264ddddb6457aa7d2)
  ├─┬ @opam-alpha/ocamlfind@1.6.2
  │ └─┬ ocamlfind-actual@1.6.2  (git+https://github.com/npm-opam/ocamlfind.git#f6ea48c7628210d477ead863d32feba2357b9afe)
  │   └─┬ @opam-alpha/conf-m4@4.1.0
  │     └── conf-m4-actual@4.1.0  (git://github.com/npm-opam/conf-m4.git#75e353ae7ae97a988319ddb0e97ecfa25bce4739)
  ├─┬ @opam-alpha/re@1.7.1
  │ └── re-actual@1.7.1  (git://github.com/npm-opam/re.git#9da39424a8a4a12a768f90b1e5cc4401102b6834)
  ├── dependency-env@0.1.1  (git+https://github.com/reasonml/dependency-env.git#94c75aff3a71587afb570d89bcf2eef7996bb67f)
  ├── nopam@0.1.0  (git+https://github.com/reasonml/nopam.git#7cd19f068ac9aaf75010cd6961f7c65c779a1d4a)
  ├─┬ opam-installer-bin@0.0.0  (git+https://github.com/yunxing/opam-installer-bin.git#689ede681217f76fb2f82a9f4528e192a5b543ba)
  │ ├── dependency-env@0.1.1  (git+https://github.com/npm-ml/dependency-env.git#94c75aff3a71587afb570d89bcf2eef7996bb67f)
  │ └── nopam@0.1.0  (git+https://github.com/yunxing/nopam.git#7cd19f068ac9aaf75010cd6961f7c65c779a1d4a)
  ├── substs@0.0.1  (git+https://github.com/yunxing/substs.git#fd480dcdb4aed3fa9128fd819a546e3a7770040f)
  └─┬ utop-bin@1.19.2  (git+https://github.com/reasonml/utop-bin.git#5e9e322c1f264c0d9e8abb9f85e5472de1c8147d)
    ├── camomile-bin@0.8.5  (git+https://github.com/reasonml/camomile-bin.git#08f5d6115b76d46897af47b9ee8e70a55973b40f)
    ├─┬ lambda-term-bin@1.10.0  (git+https://github.com/reasonml/lambda-term-bin.git#72137b68f22af1fd2d1e52afbb02ff45b494908a)
    │ └── zed-bin@1.4.0  (git+https://github.com/reasonml/zed-bin.git#7d2f0677a4a73c1b51ecbf05589e1f7b5bd76705)
    ├── lwt-bin@2.5.2  (git+https://github.com/reasonml/lwt-bin.git#96859b56091d3b46d3c36e80522a137bb768fee5)
    └── react-bin@1.2.2  (git+https://github.com/reasonml/react-bin.git#b9868712a9e76af9de52e726912bdd99f9a66e87)

I'm checking into the following things but wanted to get this logged beforehand:

  • Remove all versions of OCaml and test
  • Reinstall 4.04.0 to see if the issue persists
  • If so, Reinstall 4.02.3 to see if the issue is resolved again by switching to that version.

Edit: Adding version numbers:

  • Mac OS X 10.11.6
  • npm 3.10.10
  • node v7.3.0
  • opam 1.2.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions