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

Multiple failures on macOS sierra #7593

Closed
drautb opened this issue Oct 7, 2016 · 4 comments
Closed

Multiple failures on macOS sierra #7593

drautb opened this issue Oct 7, 2016 · 4 comments

Comments

@drautb
Copy link

drautb commented Oct 7, 2016

I'm having problems very similar to this question. I've also posted this on SO here.

I have a MacBook Pro on macOS Sierra. I've installed ocaml and opam via brew. (brew install ocaml, brew install opam) This installed ocaml 4.03.0, and it appears to work fine on its own.

I tried to install oasis (opam install oasis), but the installation failed due to a failure in installing ocamlfind:

➜  ~ opam install ocamlfind
The following actions will be performed:
  ∗  install ocamlfind 1.6.2

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
[ocamlfind] Archive in cache

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
[ERROR] The compilation of ocamlfind failed at "./configure -bindir /Users/drautb/.opam/system/bin -sitelib /Users/drautb/.opam/system/lib -mandir /Users/drautb/.opam/system/man -config /Users/drautb/.opam/system/lib/findlib.conf -no-custom -no-topfind".
Processing  1/1: [ocamlfind: rm]
#=== ERROR while installing ocamlfind.1.6.2 ===================================#
# opam-version 1.2.2
# os           darwin
# command      ./configure -bindir /Users/drautb/.opam/system/bin -sitelib /Users/drautb/.opam/system/lib -mandir /Users/drautb/.opam/system/man -config /Users/drautb/.opam/system/lib/findlib.conf -no-custom -no-topfind
# path         /Users/drautb/.opam/system/build/ocamlfind.1.6.2
# compiler     system (4.03.0)
# exit-code    1
# env-file     /Users/drautb/.opam/system/build/ocamlfind.1.6.2/ocamlfind-41584-6d07ae.env
# stdout-file  /Users/drautb/.opam/system/build/ocamlfind.1.6.2/ocamlfind-41584-6d07ae.out
# stderr-file  /Users/drautb/.opam/system/build/ocamlfind.1.6.2/ocamlfind-41584-6d07ae.err
### stdout ###
# [...]
# 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
# Detecting compiler arguments: FAILED (see the file ocargs.log for details)
### stderr ###
# ./configure: line 553: cd: src: No such file or directory



=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
The following actions failed
  ∗  install ocamlfind 1.6.2
No changes have been performed

I thought it might be related to ocaml 4.03.0, so I tried switching to ocaml 4.02.1. (opam switch 4.02.1) This fails also:

➜  ~ opam switch 4.02.1

=-=- Installing compiler 4.02.1 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
[default.comp] http://caml.inria.fr/pub/distrib/ocaml-4.02/ocaml-4.02.1.tar.gz downloaded
Now compiling OCaml. This may take a while, please bear with us...
[ERROR] Compiler build failed at "./configure -prefix /Users/drautb/.opam/4.02.1 -with-debug-runtime":
        # opam-version 1.2.2
        # os           darwin
        # command      ./configure -prefix /Users/drautb/.opam/4.02.1 -with-debug-runtime
        # path         /Users/drautb/.opam/4.02.1/build/ocaml
        # exit-code    2
        # env-file     /Users/drautb/.opam/log/log-42620-d2c37b.env
        # stdout-file  /Users/drautb/.opam/log/log-42620-d2c37b.out
        # stderr-file  /Users/drautb/.opam/log/log-42620-d2c37b.err
        ### stdout ###
        # [ERROR!]Cannot guess host type. You must specify one with the -host option.
        ### stderr ###
        # ./configure: line 190: cd: config/auto-aux: No such file or directory
        # ./configure: line 222: ../gnu/config.guess: No such file or directory

I've tried reinstalling XCode, I've tried reinstalling ocaml and opam via homebrew with the --build-from-source option, (including rm -rf ~/.opam) and the errors persist.

Has anyone else had issues like this?

@dmitris
Copy link

dmitris commented Feb 6, 2017

I'm having similar problems with macOS Sierra 10.12.3, Xcode 8.2.1:

$ opam --version
1.2.2
$ opam switch 4.03.0

=-=- Installing compiler 4.03.0 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
[default.comp] https://github.com/ocaml/ocaml/archive/4.03.0.tar.gz downloaded
Now compiling OCaml. This may take a while, please bear with us...
[ERROR] Compiler build failed at "./configure -prefix
        /Users/dmitris/.opam/4.03.0 -with-debug-runtime":
        # opam-version 1.2.2
        # os           darwin
        # command      ./configure -prefix /Users/dmitris/.opam/4.03.0
        -with-debug-runtime
        # path         /Users/dmitris/.opam/4.03.0/build/ocaml
        # exit-code    2
        [...]
        ### stdout ###
        # Configuring OCaml version 4.03.0
        # [ERROR!] Cannot guess host type. You must specify one with the -host
        option.
        ### stderr ###
        # ./configure: line 207: cd: config/auto-aux: No such file or directory
        # ./configure: line 239: ../gnu/config.guess: No such file or directory

@richardblackman
Copy link

I had the same problem trying to install mirage, the problem is because the current directory is not in the CDPATH by default on macOS X. The posix /bin/sh will not "cd src" though can "cd ./src". The quick fix is to do the following before running opam (or just put it in your .bash_profile.

export CDPATH=.
opam install WHATEVER

@drautb
Copy link
Author

drautb commented May 12, 2017

@richardblackman ah, thank you!

@AndrewSB
Copy link

Is this something that should maybe be added to the ocaml install script? I had some issues on rescript-lang/rescript-compiler#1645 where it turned out it was the same problem

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

4 participants