Mac Install questions

I’d like to install Ocaml on my Mac running Sierra; I’d like to install an easy-to-use editor as well. And I want to do this because I want my students to be able to do it as well; since many of them are beginning programmers, simple is better. They don’t know about things like packages and shells and dependencies and customizable editors, and I don’t want to teach them those things yet.

My goal is (I think!) to install ocaml, and Atom, and ocp-indent, and perhaps ocamltop. We did this last year (without ocamltop) and it worked reasonably well; this year ocp-indent is giving us troubles.

Basically, every time anyone types a line of code in an ‘ml’ files in Atom, they get a warning about
Failed to spawn command ocp-indent. Make sure ocp-indent is installed and on your PATH"

To get to the point:

  • Does someone know how to do this (install ocaml and Atom and make them play nice together)? I’d even welcome instructions that assume I’m starting from a fresh install of the OS!

  • Does someone know how to do this without a fresh install of the OS? Is there some way to remove all traces of brew and opam and ocaml so that whatever process I do would be a lot like starting from a fresh OS?

Details on what I’ve actually tried:

  1. Install homebrew
  2. brew install opam
  3. brew install ocaml
  4. Install Atom
  5. within atom, install packageslanguage-ocaml, ocaml-merlin, ocaml-indent
  6. opam init
  7. eval ` opam install ocp-indent `

This last part fails:

=-=- ocamlfind.1.5.5 troubleshooting =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫 
=> Could not build ocamlfind. The most common reason for that is a missing 'm4' system package.

Unfortunately, m4 is not the problem – it’s right there where it should be.

Any thoughts/suggestions?

Is there anywhere where anyone keeps an up-to-date set of installation instructions? I couldn’t find it, but maybe I’m just not very good at looking around.

So, on the Atom bit: this may not be what you want to hear, but consider it an alternative view when thinking about what you want your students to use:

I think Atom is a very bad idea. It takes hundreds of megabytes to gigabytes of RAM to edit a trivial sized file. It’s slow, it’s clumsy, and on a modern laptop (like a MacBook Pro) where you have a very limited amount of memory, it performs terribly. It’s also not very good on the features programmers really need. (Yes, it has those features, but they’re, by my lights, slow and clumsy. Big emphasis on “slow”, too.)

Emacs and vim seem like they’re ancient, rebarbative tools best left in the past. They lack pretty user interfaces, flat-designed modernist icons, etc. However, that’s a false appearance. I can’t speak to vim (as I don’t use it much), but Emacs is a wonderful tool. It looks ugly, of course, but that’s not really relevant.

One thing I have taught students in the past: if you compare the appearance of a professional kitchen in a restaurant to a beautiful show kitchen in someone’s expensive house, you will note that the restaurant kitchen is ugly. No pretty wooden cabinets, no marble floors, not even pretty wood or stone countertops. Instead, it’s this gross looking, spartan, utilitarian thing.

Clearly the house kitchen must be superior, right? Well, no, not so fast. The house kitchen is prettier, and it might be just fine for a household cook, but it fails at the test of being good for professionals.

Professionals want to churn out 80 meals an hour for a restaurant, not to win prizes for how pretty their stoves are. Professionals use tools that are not pretty, not fancy looking, and astonishingly powerful. The goal of a professional stove, a professional drill, a professional soldering iron, etc., is not to be pretty, but to be maximally productive for the user.

(Similarly, see Neal Stephenson’s comments on the Hole Hawg drill.)

A professional programming editor has similar concerns. It exists to make the programmer faster and happier, not to impress people staring over his shoulder.

Emacs+tuareg+merlin is an astonishingly productive environment for producing OCaml code, and it requires very little of your machine, which is important given how much of your system is probably being eaten by trivia these days.

I recommend it over Atom without any hesitation, even for students. Indeed, especially for students. Start them out understanding the difference between pretty and efficient for professional purposes early.

(Oh, and naturally, take my opinion with a grain of salt. It is just my opinion, not scripture.)

1 Like

On the opam issue, it might be that there’s a dependency issue you’re having, but in general, try building ocamlfind in opam with --verbose on, and see if you can see more about what is failing, and then update us so we can see if we can help you past that hump.

I’m quite proficient in both Emacs and vi (and hence vim), having used editors since the days when TECO was the bee’s knees. I like both quite a lot. I stopped using Emacs when I found out through experimentation that it was the key contributor to my wrist pain (with Matlab, oddly, a close second). But learning to use either one with any proficiency isn’t part of my goal for this course, while being able to get something done really is. And for that, a plug-n-play, install-in-minutes editor like Atom is actually a decent solution. Our students are writing programs that might extend to, say, 500 lines of code. For that, Atom is a perfectly workable tool. They’re also unlikely (for the most part) to use Ocaml again in the next few years; if they ever need to use it professionally, they’ll be sophisticated enough to know how to install an editor-of-choice at the time.

In short: I really DID think about the things you’re talking about, and I’ve even tried several of them in prior instances of this class. They didn’t work as well as last year’s Atom solution, which is why that’s what I asked about.

Despite that, I want to thank you for your considered response, because I expect that there are others who might benefit from it quite a lot. It’s a terrific answer, but to a different question than the one I care about.

2 Likes

Wow…“verbose” can be really verbose! Thanks for the tip. Here’s the output, which seems to start going wrong during some parts of the compilation, and then decides to uninstall, presumavbly because of the errors, so I’ve left off that part.

The following actions will be performed:
  ∗  install ocamlfind 1.5.5

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

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[ocamlfind: ./configure] Command started
+ ./configure "-bindir" "/Users/jfh/.opam/4.02.3/bin" "-sitelib" "/Users/jfh/.opam/4.02.3/lib" "-mandir" "/Users/jfh/.opam/4.02.3/man" "-config" "/Users/jfh/.opam/4.02.3/lib/findlib.conf" (CWD=/Users/jfh/.opam/4.02.3/build/ocamlfind.1.5.5)
- Welcome to findlib version 1.5.5
- Configuring core...
- Checking for #remove_directory...
- Testing threading model...
- systhread_supported: true
- Testing DLLs...
- Testing whether ppxopt can be supported...
- Configuring libraries...
- native dynlink: found
- labltk: not present
- ocamlbuild: found
- camlp4: using camlp4, style 310
- compiler-libs: found
- dbm: not present (normal since OCaml-4.00)
- bytes: found, installing fake library
- Configuration for dynlink written to site-lib-src/dynlink/META
- Configuration for graphics written to site-lib-src/graphics/META
- Configuration for num written to site-lib-src/num/META
- Configuration for num-top written to site-lib-src/num-top/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 camlp4 written to site-lib-src/camlp4/META
- Configuration for ocamlbuild written to site-lib-src/ocamlbuild/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: (extractor built) ok
- 
- About the OCAML core installation:
-     Standard library:      /Users/jfh/.opam/4.02.3/lib/ocaml
-     Binaries:              /Users/jfh/.opam/4.02.3/bin
-     Manual pages:          /Users/jfh/.opam/4.02.3/man
-     Multi-threading type:  posix
- The directory of site-specific packages will be
-     site-lib:              /Users/jfh/.opam/4.02.3/lib
- The configuration file is written to:
-     findlib config file:   /Users/jfh/.opam/4.02.3/lib/findlib.conf
- Software will be installed:
-     Libraries:             in <site-lib>/findlib
-     Binaries:              /Users/jfh/.opam/4.02.3/bin
-     Manual pages:          /Users/jfh/.opam/4.02.3/man
-     topfind script:        /Users/jfh/.opam/4.02.3/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.
[ocamlfind: make all] Command started
+ make "all" (CWD=/Users/jfh/.opam/4.02.3/build/ocamlfind.1.5.5)
- 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/jfh/.opam/4.02.3/lib/findlib.conf' | \
-               ../../tools/patch '@STDLIB@' '/Users/jfh/.opam/4.02.3/lib/ocaml' | \
-               sed -e 's;@AUTOLINK@;true;g' \
-                   -e 's;@SYSTEM@;macosx;g' \
-                    >findlib_config.ml
- ocamlc -I +compiler-libs -g -c findlib_config.ml
- ocamlc -I +compiler-libs -g -c fl_split.ml
- ocamlc -I +compiler-libs -g -c fl_metatoken.ml
- ocamlc -I +compiler-libs -g -c fl_meta.ml
- ocamlc -I +compiler-libs -c fl_metascanner.mli
- ocamlc -I +compiler-libs -g -c fl_metascanner.ml
- ocamlc -I +compiler-libs -c fl_topo.mli
- ocamlc -I +compiler-libs -g -c fl_topo.ml
- ocamlc -I +compiler-libs -c fl_package_base.mli
- ocamlc -I +compiler-libs -g -c fl_package_base.ml
- ocamlc -I +compiler-libs -c findlib.mli
- ocamlc -I +compiler-libs -g -c findlib.ml
- ocamlc -I +compiler-libs -g -c fl_args.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
- ocamlc -I +compiler-libs -g -c ocaml_args.ml
- ocamlc -I +compiler-libs -g -c frontend.ml
- ocamlc -I +compiler-libs -custom -o ocamlfind -g findlib.cma unix.cma \
-                  ocaml_args.cmo frontend.cmo
- Makefile:160: depend: No such file or directory
- File "fl_split.ml", line 114, characters 10-21:
- Warning 3: deprecated: String.copy
- File "fl_split.ml", line 118, characters 43-62:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 119, characters 37-56:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 123, characters 34-47:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 124, characters 34-47:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 126, characters 26-39:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 127, characters 45-64:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
 - File "fl_split.ml", line 128, characters 38-57:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 136, characters 13-26:
- Warning 3: deprecated: String.create
- Use Bytes.create instead.
- File "fl_split.ml", line 140, characters 1-19:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_meta.mll", line 57, characters 13-26:
- Warning 3: deprecated: String.create
- Use Bytes.create instead.
- File "fl_meta.mll", line 61, characters 11-29:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_meta.mll", line 62, characters 11-22:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_metascanner.ml", line 111, characters 23-32:
- Warning 3: deprecated: Sort.list
- Use List.sort instead.
- File "fl_metascanner.ml", line 372, characters 20-29:
- Warning 3: deprecated: Sort.list
- Use List.sort instead.
- File "frontend.ml", line 32, characters 9-20:
- Warning 3: deprecated: String.copy
- File "frontend.ml", line 34, characters 24-36:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "frontend.ml", line 1769, characters 16-29:
- Warning 3: deprecated: String.create
- Use Bytes.create instead.
- if [ "true" = "true" ]; then                 \
-               cp topfind.ml.in topfind.ml;                             \
-       else                                                             \
-               sed -e '/PPXOPT_BEGIN/,/PPXOPT_END/ d' topfind.ml.in     \
-                       > topfind.ml ;                                   \
-       fi
- ocamlc -I +compiler-libs -c topfind.mli
- ocamlc -I +compiler-libs -g -c topfind.ml
- ocamlc -I +compiler-libs -a -o findlib_top.cma topfind.cmo
- USE_CYGPATH="0"; \
-       export USE_CYGPATH; \
-       cat topfind_rd1.p | \
-               ../../tools/patch '@SITELIB@' '/Users/jfh/.opam/4.02.3/lib' \
-                   >topfind
- ocamlc -I +compiler-libs -c num_top_printers.mli
- ocamlc -I +compiler-libs -g -c num_top_printers.ml
- ocamlc -I +compiler-libs -c num_top.mli
- ocamlc -I +compiler-libs -g -c num_top.ml
- ocamlc -I +compiler-libs -a -o num_top.cma num_top_printers.cmo num_top.cmo
- /Applications/Xcode.app/Contents/Developer/usr/bin/make all-config
- USE_CYGPATH="0"; \
-       export USE_CYGPATH; \
-       cat findlib.conf.in | \
-               tools/patch '@SITELIB@' '/Users/jfh/.opam/4.02.3/lib' >findlib.conf
- if ocamlc.opt >/dev/null 2>&1; then \
-               echo 'ocamlc="ocamlc.opt"' >>findlib.conf; \
-       fi
- if ocamlopt.opt >/dev/null 2>&1; then \
-               echo 'ocamlopt="ocamlopt.opt"' >>findlib.conf; \
-       fi
- if ocamldep.opt >/dev/null 2>&1; then \
-               echo 'ocamldep="ocamldep.opt"' >>findlib.conf; \
-       fi
- if ocamldoc.opt >/dev/null 2>&1; then \
-               echo 'ocamldoc="ocamldoc.opt"' >>findlib.conf; \
-       fi
[ocamlfind: make opt] Command started
+ make "opt" (CWD=/Users/jfh/.opam/4.02.3/build/ocamlfind.1.5.5)
- for p in findlib; do ( cd src/$p; /Applications/Xcode.app/Contents/Developer/usr/bin/make opt ) || exit; done
- ocamldep *.ml *.mli >depend
- ocamlopt -I +compiler-libs -c findlib_config.ml
- ocamlopt -I +compiler-libs -c fl_split.ml
- ocamlopt -I +compiler-libs -c fl_metatoken.ml
- ocamlopt -I +compiler-libs -c fl_meta.ml
- ocamlopt -I +compiler-libs -c fl_metascanner.ml
- ocamlopt -I +compiler-libs -c fl_topo.ml
- ocamlopt -I +compiler-libs -c fl_package_base.ml
- ocamlopt -I +compiler-libs -c findlib.ml
- ocamlopt -I +compiler-libs -c fl_args.ml
- File "fl_split.ml", line 114, characters 10-21:
- Warning 3: deprecated: String.copy
- File "fl_split.ml", line 118, characters 43-62:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 119, characters 37-56:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 123, characters 34-47:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 124, characters 34-47:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 126, characters 26-39:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 127, characters 45-64:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 128, characters 38-57:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 136, characters 13-26:
- Warning 3: deprecated: String.create
- Use Bytes.create instead.
- File "fl_split.ml", line 140, characters 1-19:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_meta.mll", line 57, characters 13-26:
- Warning 3: deprecated: String.create
- Use Bytes.create instead.
- File "fl_meta.mll", line 61, characters 11-29:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_meta.mll", line 62, characters 11-22:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_metascanner.ml", line 111, characters 23-32:
- Warning 3: deprecated: Sort.list
- Use List.sort instead.
- File "fl_metascanner.ml", line 372, characters 20-29:
- Warning 3: deprecated: Sort.list
- Use List.sort instead.
- ocamlopt -I +compiler-libs -a -o findlib.cmxa findlib_config.cmx fl_split.cmx fl_metatoken.cmx fl_meta.cmx fl_metascanner.cmx fl_topo.cmx fl_package_base.cmx findlib.cmx fl_args.cmx
- if [ 1 -gt 0 ]; then \
-           ocamlopt -I +compiler-libs -shared -o findlib.cmxs findlib_config.cmx fl_split.cmx fl_metatoken.cmx fl_meta.cmx fl_metascanner.cmx fl_topo.cmx fl_package_base.cmx findlib.cmx fl_args.cmx; \
-       fi
- ocamlopt -I +compiler-libs -c ocaml_args.ml
- ocamlopt -I +compiler-libs -c frontend.ml
- File "frontend.ml", line 32, characters 9-20:
- Warning 3: deprecated: String.copy
- File "frontend.ml", line 34, characters 24-36:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "frontend.ml", line 1769, characters 16-29:
- Warning 3: deprecated: String.create
- Use Bytes.create instead.
- ocamlopt -I +compiler-libs -o ocamlfind_opt findlib.cmxa unix.cmxa \
-                  ocaml_args.cmx frontend.cmx
[ocamlfind: make install] Command started
+ make "install" (CWD=/Users/jfh/.opam/4.02.3/build/ocamlfind.1.5.5)
- mkdir -p "/Users/jfh/.opam/4.02.3/bin"
- mkdir -p "/Users/jfh/.opam/4.02.3/man"
- /Applications/Xcode.app/Contents/Developer/usr/bin/make install-config
- mkdir -p "`dirname \"/Users/jfh/.opam/4.02.3/lib/findlib.conf\"`"
- !!! Keeping old /Users/jfh/.opam/4.02.3/lib/findlib.conf !!!
- test -f "/Users/jfh/.opam/4.02.3/lib/findlib.conf" || cp findlib.conf "/Users/jfh/.opam/4.02.3/lib/findlib.conf"
- for p in findlib; do ( cd src/$p; /Applications/Xcode.app/Contents/Developer/usr/bin/make install ); done
- mkdir -p "/Users/jfh/.opam/4.02.3/lib/findlib"
- mkdir -p "/Users/jfh/.opam/4.02.3/bin"
- test 1 -eq 0 || cp topfind "/Users/jfh/.opam/4.02.3/lib/ocaml"
- files=`../../tools/collect_files ../../Makefile.config findlib.cmi findlib.mli findlib.cma topfind.cmi topfind.mli fl_package_base.mli fl_package_base.cmi fl_metascanner.mli fl_metascanner.cmi fl_metatoken.cmi findlib_top.cma findlib.cmxa findlib.a findlib.cmxs META` && \
-       cp $files "/Users/jfh/.opam/4.02.3/lib/findlib"
- f="ocamlfind"; { test -f ocamlfind_opt && f="ocamlfind_opt"; }; \
-       cp $f "/Users/jfh/.opam/4.02.3/bin/ocamlfind"
- # the following "if" block is only needed for 4.00beta2
- if [ 1 -eq 0 -a -f "/Users/jfh/.opam/4.02.3/lib/ocaml/compiler-libs/topdirs.cmi" ]; then \
-           cd "/Users/jfh/.opam/4.02.3/lib/ocaml/compiler-libs/"; \
-           cp topdirs.cmi toploop.cmi "/Users/jfh/.opam/4.02.3/lib/findlib/"; \
-       fi
- /Applications/Xcode.app/Contents/Developer/usr/bin/make install-meta
- for x in `ls site-lib-src`; do if [ "$x" != "CVS" -a -f "site-lib-src/$x/META" ]; then mkdir -p "/Users/jfh/.opam/4.02.3/lib/$x"; cp site-lib-src/$x/META "/Users/jfh/.opam/4.02.3/lib/$x"; fi; done
- cd src/findlib; /Applications/Xcode.app/Contents/Developer/usr/bin/make install-num-top
- mkdir -p "/Users/jfh/.opam/4.02.3/lib/num-top"
- cp num_top.cma num_top.cmi num_top_printers.cmi \
-               "/Users/jfh/.opam/4.02.3/lib/num-top"
- if [ 1 -eq 1 ]; then \
-               cp tools/safe_camlp4 "/Users/jfh/.opam/4.02.3/bin"; \
-       fi
- /Applications/Xcode.app/Contents/Developer/usr/bin/make install-doc
- mkdir -p /Users/jfh/.opam/4.02.3/man/man1 /Users/jfh/.opam/4.02.3/man/man3 /Users/jfh/.opam/4.02.3/man/man5
- cp doc/ref-man/ocamlfind.1 /Users/jfh/.opam/4.02.3/man/man1
- cp doc/ref-man/META.5 doc/ref-man/site-lib.5 doc/ref-man/findlib.conf.5 /Users/jfh/.opam/4.02.3/man/man5
[ocamlfind: ocamlfind remove] Command started
+ ocamlfind "remove" "bytes" (CWD=/Users/jfh/.opam/4.02.3/build/ocamlfind.1.5.5)

On the more important question, does opam install ocamlfind --verbose give you any additional information you can share with us?

Lots of output here; I trimmed off the bits after it decided to start uninstalling…

The following actions will be performed:
  ∗  install ocamlfind 1.5.5

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

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[ocamlfind: ./configure] Command started
+ ./configure "-bindir" "/Users/jfh/.opam/4.02.3/bin" "-sitelib" "/Users/jfh/.opam/4.02.3/lib" "-mandir" "/Users/jfh/.opam/4.02.3/man" "-config" "/Users/jfh/.opam/4.02.3/lib/findlib.conf" (CWD=/Users/jfh/.opam/4.02.3/build/ocamlfind.1.5.5)
- Welcome to findlib version 1.5.5
- Configuring core...
- Checking for #remove_directory...
- Testing threading model...
- systhread_supported: true
- Testing DLLs...
- Testing whether ppxopt can be supported...
- Configuring libraries...
- native dynlink: found
- labltk: not present
- ocamlbuild: found
- camlp4: using camlp4, style 310
- compiler-libs: found
- dbm: not present (normal since OCaml-4.00)
- bytes: found, installing fake library
- Configuration for dynlink written to site-lib-src/dynlink/META
- Configuration for graphics written to site-lib-src/graphics/META
- Configuration for num written to site-lib-src/num/META
- Configuration for num-top written to site-lib-src/num-top/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 camlp4 written to site-lib-src/camlp4/META
- Configuration for ocamlbuild written to site-lib-src/ocamlbuild/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: (extractor built) ok
- 
- About the OCAML core installation:
-     Standard library:      /Users/jfh/.opam/4.02.3/lib/ocaml
-     Binaries:              /Users/jfh/.opam/4.02.3/bin
-     Manual pages:          /Users/jfh/.opam/4.02.3/man
-     Multi-threading type:  posix
- The directory of site-specific packages will be
-     site-lib:              /Users/jfh/.opam/4.02.3/lib
- The configuration file is written to:
-     findlib config file:   /Users/jfh/.opam/4.02.3/lib/findlib.conf
- Software will be installed:
-     Libraries:             in <site-lib>/findlib
-     Binaries:              /Users/jfh/.opam/4.02.3/bin
-     Manual pages:          /Users/jfh/.opam/4.02.3/man
-     topfind script:        /Users/jfh/.opam/4.02.3/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.
[ocamlfind: make all] Command started
+ make "all" (CWD=/Users/jfh/.opam/4.02.3/build/ocamlfind.1.5.5)
- 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/jfh/.opam/4.02.3/lib/findlib.conf' | \
-               ../../tools/patch '@STDLIB@' '/Users/jfh/.opam/4.02.3/lib/ocaml' | \
-               sed -e 's;@AUTOLINK@;true;g' \
-                   -e 's;@SYSTEM@;macosx;g' \
-                    >findlib_config.ml
- ocamlc -I +compiler-libs -g -c findlib_config.ml
- ocamlc -I +compiler-libs -g -c fl_split.ml
- ocamlc -I +compiler-libs -g -c fl_metatoken.ml
- ocamlc -I +compiler-libs -g -c fl_meta.ml
- ocamlc -I +compiler-libs -c fl_metascanner.mli
- ocamlc -I +compiler-libs -g -c fl_metascanner.ml
- ocamlc -I +compiler-libs -c fl_topo.mli
- ocamlc -I +compiler-libs -g -c fl_topo.ml
- ocamlc -I +compiler-libs -c fl_package_base.mli
- ocamlc -I +compiler-libs -g -c fl_package_base.ml
- ocamlc -I +compiler-libs -c findlib.mli
- ocamlc -I +compiler-libs -g -c findlib.ml
- ocamlc -I +compiler-libs -g -c fl_args.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
- ocamlc -I +compiler-libs -g -c ocaml_args.ml
- ocamlc -I +compiler-libs -g -c frontend.ml
- ocamlc -I +compiler-libs -custom -o ocamlfind -g findlib.cma unix.cma \
-                  ocaml_args.cmo frontend.cmo
- Makefile:160: depend: No such file or directory
- File "fl_split.ml", line 114, characters 10-21:
- Warning 3: deprecated: String.copy
- File "fl_split.ml", line 118, characters 43-62:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 119, characters 37-56:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 123, characters 34-47:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 124, characters 34-47:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 126, characters 26-39:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 127, characters 45-64:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.


- File "fl_split.ml", line 128, characters 38-57:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 136, characters 13-26:
- Warning 3: deprecated: String.create
- Use Bytes.create instead.
- File "fl_split.ml", line 140, characters 1-19:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_meta.mll", line 57, characters 13-26:
- Warning 3: deprecated: String.create
- Use Bytes.create instead.
- File "fl_meta.mll", line 61, characters 11-29:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_meta.mll", line 62, characters 11-22:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_metascanner.ml", line 111, characters 23-32:
- Warning 3: deprecated: Sort.list
- Use List.sort instead.
- File "fl_metascanner.ml", line 372, characters 20-29:
- Warning 3: deprecated: Sort.list
- Use List.sort instead.
- File "frontend.ml", line 32, characters 9-20:
- Warning 3: deprecated: String.copy
- File "frontend.ml", line 34, characters 24-36:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "frontend.ml", line 1769, characters 16-29:
- Warning 3: deprecated: String.create
- Use Bytes.create instead.
- if [ "true" = "true" ]; then                 \
-               cp topfind.ml.in topfind.ml;                             \
-       else                                                             \
-               sed -e '/PPXOPT_BEGIN/,/PPXOPT_END/ d' topfind.ml.in     \
-                       > topfind.ml ;                                   \
-       fi
- ocamlc -I +compiler-libs -c topfind.mli
- ocamlc -I +compiler-libs -g -c topfind.ml
- ocamlc -I +compiler-libs -a -o findlib_top.cma topfind.cmo
- USE_CYGPATH="0"; \
-       export USE_CYGPATH; \
-       cat topfind_rd1.p | \
-               ../../tools/patch '@SITELIB@' '/Users/jfh/.opam/4.02.3/lib' \
-                   >topfind
- ocamlc -I +compiler-libs -c num_top_printers.mli
- ocamlc -I +compiler-libs -g -c num_top_printers.ml
- ocamlc -I +compiler-libs -c num_top.mli
- ocamlc -I +compiler-libs -g -c num_top.ml
- ocamlc -I +compiler-libs -a -o num_top.cma num_top_printers.cmo num_top.cmo
- /Applications/Xcode.app/Contents/Developer/usr/bin/make all-config
- USE_CYGPATH="0"; \
-       export USE_CYGPATH; \
-       cat findlib.conf.in | \
-               tools/patch '@SITELIB@' '/Users/jfh/.opam/4.02.3/lib' >findlib.conf
- if ocamlc.opt >/dev/null 2>&1; then \
-               echo 'ocamlc="ocamlc.opt"' >>findlib.conf; \

-       fi
- if ocamlopt.opt >/dev/null 2>&1; then \
-               echo 'ocamlopt="ocamlopt.opt"' >>findlib.conf; \
-       fi
- if ocamldep.opt >/dev/null 2>&1; then \
-               echo 'ocamldep="ocamldep.opt"' >>findlib.conf; \
-       fi
- if ocamldoc.opt >/dev/null 2>&1; then \
-               echo 'ocamldoc="ocamldoc.opt"' >>findlib.conf; \
-       fi
[ocamlfind: make opt] Command started
+ make "opt" (CWD=/Users/jfh/.opam/4.02.3/build/ocamlfind.1.5.5)
- for p in findlib; do ( cd src/$p; /Applications/Xcode.app/Contents/Developer/usr/bin/make opt ) || exit; done
- ocamldep *.ml *.mli >depend
- ocamlopt -I +compiler-libs -c findlib_config.ml
- ocamlopt -I +compiler-libs -c fl_split.ml
- ocamlopt -I +compiler-libs -c fl_metatoken.ml
- ocamlopt -I +compiler-libs -c fl_meta.ml
- ocamlopt -I +compiler-libs -c fl_metascanner.ml
- ocamlopt -I +compiler-libs -c fl_topo.ml
- ocamlopt -I +compiler-libs -c fl_package_base.ml
- ocamlopt -I +compiler-libs -c findlib.ml
- ocamlopt -I +compiler-libs -c fl_args.ml
- File "fl_split.ml", line 114, characters 10-21:
- Warning 3: deprecated: String.copy
- File "fl_split.ml", line 118, characters 43-62:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 119, characters 37-56:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 123, characters 34-47:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 124, characters 34-47:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 126, characters 26-39:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 127, characters 45-64:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 128, characters 38-57:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 136, characters 13-26:
- Warning 3: deprecated: String.create
- Use Bytes.create instead.
- File "fl_split.ml", line 140, characters 1-19:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_meta.mll", line 57, characters 13-26:
- Warning 3: deprecated: String.create
- Use Bytes.create instead.
- File "fl_meta.mll", line 61, characters 11-29:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.

- File "fl_meta.mll", line 62, characters 11-22:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_metascanner.ml", line 111, characters 23-32:
- Warning 3: deprecated: Sort.list
- Use List.sort instead.
- File "fl_metascanner.ml", line 372, characters 20-29:
- Warning 3: deprecated: Sort.list
- Use List.sort instead.
- ocamlopt -I +compiler-libs -a -o findlib.cmxa findlib_config.cmx fl_split.cmx fl_metatoken.cmx fl_meta.cmx fl_metascanner.cmx fl_topo.cmx fl_package_base.cmx findlib.cmx fl_args.cmx
- if [ 1 -gt 0 ]; then \
-           ocamlopt -I +compiler-libs -shared -o findlib.cmxs findlib_config.cmx fl_split.cmx fl_metatoken.cmx fl_meta.cmx fl_metascanner.cmx fl_topo.cmx fl_package_base.cmx findlib.cmx fl_args.cmx; \
-       fi
- ocamlopt -I +compiler-libs -c ocaml_args.ml
- ocamlopt -I +compiler-libs -c frontend.ml
- File "frontend.ml", line 32, characters 9-20:
- Warning 3: deprecated: String.copy
- File "frontend.ml", line 34, characters 24-36:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "frontend.ml", line 1769, characters 16-29:
- Warning 3: deprecated: String.create
- Use Bytes.create instead.
- ocamlopt -I +compiler-libs -o ocamlfind_opt findlib.cmxa unix.cmxa \
-                  ocaml_args.cmx frontend.cmx
[ocamlfind: make install] Command started
+ make "install" (CWD=/Users/jfh/.opam/4.02.3/build/ocamlfind.1.5.5)
- mkdir -p "/Users/jfh/.opam/4.02.3/bin"
- mkdir -p "/Users/jfh/.opam/4.02.3/man"
- /Applications/Xcode.app/Contents/Developer/usr/bin/make install-config
- mkdir -p "`dirname \"/Users/jfh/.opam/4.02.3/lib/findlib.conf\"`"
- !!! Keeping old /Users/jfh/.opam/4.02.3/lib/findlib.conf !!!
- test -f "/Users/jfh/.opam/4.02.3/lib/findlib.conf" || cp findlib.conf "/Users/jfh/.opam/4.02.3/lib/findlib.conf"
- for p in findlib; do ( cd src/$p; /Applications/Xcode.app/Contents/Developer/usr/bin/make install ); done
- mkdir -p "/Users/jfh/.opam/4.02.3/lib/findlib"
- mkdir -p "/Users/jfh/.opam/4.02.3/bin"
- test 1 -eq 0 || cp topfind "/Users/jfh/.opam/4.02.3/lib/ocaml"
- files=`../../tools/collect_files ../../Makefile.config findlib.cmi findlib.mli findlib.cma topfind.cmi topfind.mli fl_package_base.mli fl_package_base.cmi fl_metascanner.mli fl_metascanner.cmi fl_metatoken.cmi findlib_top.cma findlib.cmxa findlib.a findlib.cmxs META` && \
-       cp $files "/Users/jfh/.opam/4.02.3/lib/findlib"
- f="ocamlfind"; { test -f ocamlfind_opt && f="ocamlfind_opt"; }; \
-       cp $f "/Users/jfh/.opam/4.02.3/bin/ocamlfind"
- # the following "if" block is only needed for 4.00beta2
- if [ 1 -eq 0 -a -f "/Users/jfh/.opam/4.02.3/lib/ocaml/compiler-libs/topdirs.cmi" ]; then \
-           cd "/Users/jfh/.opam/4.02.3/lib/ocaml/compiler-libs/"; \
-           cp topdirs.cmi toploop.cmi "/Users/jfh/.opam/4.02.3/lib/findlib/"; \
-       fi
- /Applications/Xcode.app/Contents/Developer/usr/bin/make install-meta
- for x in `ls site-lib-src`; do if [ "$x" != "CVS" -a -f "site-lib-src/$x/META" ]; then mkdir -p "/Users/jfh/.opam/4.02.3/lib/$x"; cp site-lib-src/$x/META "/Users/jfh/.opam/4.02.3/lib/$x"; fi; done
- cd src/findlib; /Applications/Xcode.app/Contents/Developer/usr/bin/make install-num-top
- mkdir -p "/Users/jfh/.opam/4.02.3/lib/num-top"
- cp num_top.cma num_top.cmi num_top_printers.cmi \
-               "/Users/jfh/.opam/4.02.3/lib/num-top"
- if [ 1 -eq 1 ]; then \
-               cp tools/safe_camlp4 "/Users/jfh/.opam/4.02.3/bin"; \


-       fi
- /Applications/Xcode.app/Contents/Developer/usr/bin/make install-doc
- mkdir -p /Users/jfh/.opam/4.02.3/man/man1 /Users/jfh/.opam/4.02.3/man/man3 /Users/jfh/.opam/4.02.3/man/man5
- cp doc/ref-man/ocamlfind.1 /Users/jfh/.opam/4.02.3/man/man1
- cp doc/ref-man/META.5 doc/ref-man/site-lib.5 doc/ref-man/findlib.conf.5 /Users/jfh/.opam/4.02.3/man/man5
[ocamlfind: ocamlfind remove] Command started
+ ocamlfind "remove" "bytes" (CWD=/Users/jfh/.opam/4.02.3/build/ocamlfind.1.5.5)
[ocamlfind: ./configure] Command started
+ ./configure "-bindir" "/Users/jfh/.opam/4.02.3/bin" "-sitelib" "/Users/jfh/.opam/4.02.3/lib" "-mandir" "/Users/jfh/.opam/4.02.3/man" "-config" "/Users/jfh/.opam/4.02.3/lib/findlib.conf" (CWD=/Users/jfh/.opam/4.02.3/build/ocamlfind.1.5.5)
- Welcome to findlib version 1.5.5
- Configuring core...
- Checking for #remove_directory...
- Testing threading model...
- systhread_supported: true
- Testing DLLs...
- Testing whether ppxopt can be supported...
- Configuring libraries...
- native dynlink: found
- labltk: not present
- ocamlbuild: found
- camlp4: using camlp4, style 310
- compiler-libs: found
- dbm: not present (normal since OCaml-4.00)
- bytes: found, installing fake library
- Configuration for dynlink written to site-lib-src/dynlink/META
- Configuration for graphics written to site-lib-src/graphics/META
- Configuration for num written to site-lib-src/num/META
- Configuration for num-top written to site-lib-src/num-top/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 camlp4 written to site-lib-src/camlp4/META
- Configuration for ocamlbuild written to site-lib-src/ocamlbuild/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: (extractor built) ok
- 
- About the OCAML core installation:
-     Standard library:      /Users/jfh/.opam/4.02.3/lib/ocaml
-     Binaries:              /Users/jfh/.opam/4.02.3/bin
-     Manual pages:          /Users/jfh/.opam/4.02.3/man
-     Multi-threading type:  posix
- The directory of site-specific packages will be
-     site-lib:              /Users/jfh/.opam/4.02.3/lib
- The configuration file is written to:
-     findlib config file:   /Users/jfh/.opam/4.02.3/lib/findlib.conf
- Software will be installed:
-     Libraries:             in <site-lib>/findlib
-     Binaries:              /Users/jfh/.opam/4.02.3/bin
-     Manual pages:          /Users/jfh/.opam/4.02.3/man
-     topfind script:        /Users/jfh/.opam/4.02.3/lib/ocaml
- Topfind ppxopt support:    yes
- Toolbox:                   no
- Link custom runtime:       yes
- Need bytes compatibility:  no

- 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.
[ocamlfind: make uninstall] Command started
+ make "uninstall" (CWD=/Users/jfh/.opam/4.02.3/build/ocamlfind.1.5.5)
- /Applications/Xcode.app/Contents/Developer/usr/bin/make uninstall-doc
- rm -f /Users/jfh/.opam/4.02.3/man/man1/ocamlfind.1
- rm -f /Users/jfh/.opam/4.02.3/man/man3/Findlib.3
- rm -f /Users/jfh/.opam/4.02.3/man/man3/Topfind.3
- rm -f /Users/jfh/.opam/4.02.3/man/man5/META.5
- rm -f /Users/jfh/.opam/4.02.3/man/man5/site-lib.5

====
So…does that help any?

I’ve tried reporting the output of the verbose install, but it keeps disappearing; there’s probably some limit that I’m not aware of. So here are a few bits that seem as if they might be the relevant ones:

The following actions will be performed:
  ∗  install ocamlfind 1.5.5

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

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[ocamlfind: ./configure] Command started
+ ./configure "-bindir" "/Users/jfh/.opam/4.02.3/bin" "-sitelib" "/Users/jfh/.opam/4.02.3/lib" "-mandir" "/Users/jfh/.opam/4.02.3/man" "-config" "/Users/jfh/.opam/4.02.3/lib/findlib.conf" (CWD=/Users/jfh/.opam/4.02.3/build/ocamlfind.1.5.5)
- Welcome to findlib version 1.5.5
- Configuring core...
- Checking for #remove_directory...
- Testing threading model...
- systhread_supported: true
- Testing DLLs...
- Testing whether ppxopt can be supported...
- Configuring libraries...
- native dynlink: found
- labltk: not present
- ocamlbuild: found
- camlp4: using camlp4, style 310
- compiler-libs: found
- dbm: not present (normal since OCaml-4.00)
- bytes: found, installing fake library
- Configuration for dynlink written to site-lib-src/dynlink/META

(lots more config stuff, then “make all” begins, and I start getting warnings after the first 15 files or so):

...
- ocamlc -I +compiler-libs -g -c findlib.ml
- ocamlc -I +compiler-libs -g -c fl_args.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
- ocamlc -I +compiler-libs -g -c ocaml_args.ml
- ocamlc -I +compiler-libs -g -c frontend.ml
- ocamlc -I +compiler-libs -custom -o ocamlfind -g findlib.cma unix.cma \
-                  ocaml_args.cmo frontend.cmo
- Makefile:160: depend: No such file or directory
- File "fl_split.ml", line 114, characters 10-21:
- Warning 3: deprecated: String.copy
- File "fl_split.ml", line 118, characters 43-62:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 119, characters 37-56:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 123, characters 34-47:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.
- File "fl_split.ml", line 124, characters 34-47:
- Warning 3: deprecated: String.set
- Use Bytes.set instead.

THere’s a bunch more of that, and we move on to “make opt”, which generates many of the same kinds of warnings. And finally, we get to “make install”

+ make "install" (CWD=/Users/jfh/.opam/4.02.3/build/ocamlfind.1.5.5)
- mkdir -p "/Users/jfh/.opam/4.02.3/bin"
- mkdir -p "/Users/jfh/.opam/4.02.3/man"
- /Applications/Xcode.app/Contents/Developer/usr/bin/make install-config
- mkdir -p "`dirname \"/Users/jfh/.opam/4.02.3/lib/findlib.conf\"`"
- !!! Keeping old /Users/jfh/.opam/4.02.3/lib/findlib.conf !!!
- test -f "/Users/jfh/.opam/4.02.3/lib/findlib.conf" || cp findlib.conf "/Users/jfh/.opam/4.02.3/lib/findlib.conf"
- for p in findlib; do ( cd src/$p; /Applications/Xcode.app/Contents/Developer/usr/bin/make install ); done
- mkdir -p "/Users/jfh/.opam/4.02.3/lib/findlib"
- mkdir -p "/Users/jfh/.opam/4.02.3/bin"
- test 1 -eq 0 || cp topfind "/Users/jfh/.opam/4.02.3/lib/ocaml"
- files=`../../tools/collect_files ../../Makefile.config findlib.cmi findlib.mli findlib.cma topfind.cmi topfind.mli fl_package_base.mli fl_package_base.cmi fl_metascanner.mli fl_metascanner.cmi fl_metatoken.cmi findlib_top.cma findlib.cmxa findlib.a findlib.cmxs META` && \
-       cp $files "/Users/jfh/.opam/4.02.3/lib/findlib"
- f="ocamlfind"; { test -f ocamlfind_opt && f="ocamlfind_opt"; }; \
-       cp $f "/Users/jfh/.opam/4.02.3/bin/ocamlfind"
- # the following "if" block is only needed for 4.00beta2
- if [ 1 -eq 0 -a -f "/Users/jfh/.opam/4.02.3/lib/ocaml/compiler-libs/topdirs.cmi" ]; then \
-           cd "/Users/jfh/.opam/4.02.3/lib/ocaml/compiler-libs/"; \
-           cp topdirs.cmi toploop.cmi "/Users/jfh/.opam/4.02.3/lib/findlib/"; \
-       fi
- /Applications/Xcode.app/Contents/Developer/usr/bin/make install-meta
- for x in `ls site-lib-src`; do if [ "$x" != "CVS" -a -f "site-lib-src/$x/META" ]; then mkdir -p "/Users/jfh/.opam/4.02.3/lib/$x"; cp site-lib-src/$x/META "/Users/jfh/.opam/4.02.3/lib/$x"; fi; done
- cd src/findlib; /Applications/Xcode.app/Contents/Developer/usr/bin/make install-num-top
- mkdir -p "/Users/jfh/.opam/4.02.3/lib/num-top"
- cp num_top.cma num_top.cmi num_top_printers.cmi \
-               "/Users/jfh/.opam/4.02.3/lib/num-top"
- if [ 1 -eq 1 ]; then \
-               cp tools/safe_camlp4 "/Users/jfh/.opam/4.02.3/bin"; \
-       fi
- /Applications/Xcode.app/Contents/Developer/usr/bin/make install-doc
- mkdir -p /Users/jfh/.opam/4.02.3/man/man1 /Users/jfh/.opam/4.02.3/man/man3 /Users/jfh/.opam/4.02.3/man/man5
- cp doc/ref-man/ocamlfind.1 /Users/jfh/.opam/4.02.3/man/man1
- cp doc/ref-man/META.5 doc/ref-man/site-lib.5 doc/ref-man/findlib.conf.5 /Users/jfh/.opam/4.02.3/man/man5
[ocamlfind: ocamlfind remove] Command started
+ ocamlfind "remove" "bytes" (CWD=/Users/jfh/.opam/4.02.3/build/ocamlfind.1.5.5)
[ocamlfind: ./configure] Command started
+ ./configure "-bindir" "/Users/jfh/.opam/4.02.3/bin" "-sitelib" "/Users/jfh/.opam/4.02.3/lib" "-mandir" "/Users/jfh/.opam/4.02.3/man" "-config" "/Users/jfh/.opam/4.02.3/lib/findlib.conf" (CWD=/Users/jfh/.opam/4.02.3/build/ocamlfind.1.5.5)
- Welcome to findlib version 1.5.5
- Configuring core...
- Checking for #remove_directory...
- Testing threading model...

and after a little more, this:

-     Manual pages:          /Users/jfh/.opam/4.02.3/man
-     topfind script:        /Users/jfh/.opam/4.02.3/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.
[ocamlfind: make uninstall] Command started
+ make "uninstall" (CWD=/Users/jfh/.opam/4.02.3/build/ocamlfind.1.5.5)
- /Applications/Xcode.app/Contents/Developer/usr/bin/make uninstall-doc
- rm -f /Users/jfh/.opam/4.02.3/man/man1/ocamlfind.1

which seems like it’s an admission of defeat, but maybe I’m misreading it.

Could you please report the output of opam config report ? It seems odd, you are installing an older version of ocamlfind. You can try to install the latest version with opam install ocamlfind.1.7.3.

Here’s opam config report; in the meantime I’ll try the install ocamlfind.1.7.3.

# 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  4.02.3
# last-update     2015-10-27 18:02

Also:

Johns-MacBook-Pro:Rackette2 jfh$ opam install ocamlfind.1.7.3
[ERROR] No package matches ocamlfind.1.7.3.

Try opam update and opam install ocamlfind again.

opam update results:

Johns-MacBook-Pro:Rackette2 jfh$ opam update

=-=- Updating package repositories =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[default] synchronized from https://opam.ocaml.org

Updates available for 4.02.3, apply them with 'opam upgrade':
===== ∗  6   ↗  1 =====

So…do I do the “upgrade”? Without doing that, because you didn’t say to, I went ahead and tried
opam install ocamlfind again, and got this:

Johns-MacBook-Pro:Rackette2 jfh$ opam install ocamlfind
The following actions will be performed:
  ∗  install base-ocamlbuild base 
  ∗  install conf-m4         1                [required by ocamlfind]
  ∗  install ocamlbuild      0    
  ∗  install ocamlfind       1.7.3
===== ∗  4 =====
Do you want to continue ? [Y/n] y

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

[default] https://opam.ocaml.org/archives/ocamlfind.1.7.3+opam.tar.gz downloaded

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
∗  installed base-ocamlbuild.base
∗  installed ocamlbuild.0
∗  installed conf-m4.1
Processing  4/4: [ocamlfind: make uninstall]
#=== ERROR while installing ocamlfind.1.7.3 ===================================#
# opam-version 1.2.2
# os           darwin
# command      install -m 0755 /Users/jfh/.opam/4.02.3/build/ocamlfind.1.7.3/src/findlib/ocamlfind /Users/jfh/.opam/4.02.3/bin/ocamlfind
# path         /Users/jfh/.opam/4.02.3/build/ocamlfind.1.7.3
# exit-code    127
# env-file     /Users/jfh/.opam/log/log-9477-e4db2f.env
# stdout-file  /Users/jfh/.opam/log/log-9477-e4db2f.out
# stderr-file  /Users/jfh/.opam/log/log-9477-e4db2f.err



=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The following actions failed
  ∗  install ocamlfind 1.7.3
The following changes have been performed
  ∗  install base-ocamlbuild base
  ∗  install conf-m4         1   
  ∗  install ocamlbuild      0   

The former state can be restored with:
    opam switch import "~/.opam/4.02.3/backup/state-20171001202940.export"

Do you have . in your PATH ? If so remove it.

That seems to have helped (getting rid of “.” in my path, I mean):

Johns-MacBook-Pro:Rackette2 jfh$ opam update

=-=- Updating package repositories =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[default] synchronized from https://opam.ocaml.org

Updates available for 4.02.3, apply them with 'opam upgrade':
===== ∗  3   ↗  1 =====
Johns-MacBook-Pro:Rackette2 jfh$ opam install ocamlfind
The following actions will be performed:
  ∗  install ocamlfind 1.7.3

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

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
∗  installed ocamlfind.1.7.3
Done.
Johns-MacBook-Pro:Rackette2 jfh$ 

Buoyed with enthusiasm by that success, I went ahead and tried
opam init
opam install ocp-indent

The first worked fine (apparently). The second failed … but in a new place this time!:

Johns-MacBook-Pro:Rackette2 jfh$ opam install ocp-indent
The following actions will be performed:
  ∗  install result     1.2                   [required by cmdliner]
  ∗  install base-bytes base                  [required by ocp-indent]
  ∗  install ocp-build  1.99.19-beta          [required by ocp-indent]
  ∗  install topkg      0.9.1                 [required by cmdliner]
  ↗  upgrade cmdliner   0.9.8 to 1.0.2        [required by ocp-indent]
  ∗  install ocp-indent 1.6.1         
===== ∗  5   ↗  1 =====
Do you want to continue ? [Y/n] y

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[default] https://opam.ocaml.org/archives/cmdliner.1.0.2+opam.tar.gz downloaded
[default] https://opam.ocaml.org/archives/result.1.2+opam.tar.gz downloaded
[default] https://opam.ocaml.org/archives/ocp-indent.1.6.1+opam.tar.gz downloaded
[default] https://opam.ocaml.org/archives/topkg.0.9.1+opam.tar.gz downloaded
[default] https://opam.ocaml.org/archives/ocp-build.1.99.19-beta+opam.tar.gz downloaded

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
⊘  removed   cmdliner.0.9.8
∗  installed base-bytes.base
∗  installed result.1.2
[ERROR] The compilation of topkg failed at "ocaml pkg/pkg.ml build --pkg-name topkg --dev-pkg false".
∗  installed ocp-build.1.99.19-beta

#=== ERROR while installing topkg.0.9.1 =======================================#
# opam-version 1.2.2
# os           darwin
# command      ocaml pkg/pkg.ml build --pkg-name topkg --dev-pkg false
# path         /Users/jfh/.opam/4.02.3/build/topkg.0.9.1
# compiler     4.02.3
# exit-code    2
# env-file     /Users/jfh/.opam/4.02.3/build/topkg.0.9.1/topkg-10511-736596.env
# stdout-file  /Users/jfh/.opam/4.02.3/build/topkg.0.9.1/topkg-10511-736596.out
# stderr-file  /Users/jfh/.opam/4.02.3/build/topkg.0.9.1/topkg-10511-736596.err
### stdout ###
# Cannot find file topfind.
### stderr ###
# Unknown directive `require'.



=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The following actions were aborted
  ∗  install cmdliner   1.0.2
  ∗  install ocp-indent 1.6.1
The following actions failed
  ∗  install topkg 0.9.1
The following changes have been performed
  ⊘  remove  cmdliner   0.9.8       
  ∗  install base-bytes base        
  ∗  install ocp-build  1.99.19-beta
  ∗  install result     1.2         

The former state can be restored with:
    opam switch import "~/.opam/4.02.3/backup/state-20171001203709.export"

The explanation is here Unix is a brittle thing.

Did you eval $(opam config env) ?

Note that in general system switches (those that use the system compiler) are less used and tested and tricky w.r.t. to environment issues.

If you run into too much problems I’d advise to use a “regular” switch (that will entail compiling a new ocaml though) see here. It will also make sure your students are all using the same version of the compiler (if they use brew now they will get a 4.05.0 compiler, not 4.02.3 like you have now, it seems you also didn’t brew update for some time).

By the way, just an aside: It is very dangerous to have . in your PATH, ever, opam build problems or not. I got out of the habit almost 30 years ago and I recommend, regardless of whether you are using OCaml or not, never to do it. If you leave it in your path, one day something bad will happen to you.

1 Like

I did not $(opam config env); frankly, at this point I’m just typing what you tell me, because I have no idea what these various things are doing. Sigh. But since you suggested it, I tried it

Johns-MacBook-Pro:Rackette2 jfh$ $(opam config env)
-bash: CAML_LD_LIBRARY_PATH="/Users/jfh/.opam/4.02.3/lib/stublibs";: No such file or directory

Hmm. Disappointing. But I recall that the version of this I’ve seen most often is a little different:

Johns-MacBook-Pro:Rackette2 jfh$ eval `opam config env`
Johns-MacBook-Pro:Rackette2 jfh$

and that seems to have worked.

And following that, the opam install ocp-indent seems to have done what’s needed, too.

And following THAT, everything seems to be working (i.e., Atom is no longer throwing up warnings about a missing ocp-indent).

Now I need to go back and try to figure out what it is that just happened, so that I can (perhaps) help my students do a similar install.

[Thanks for the tip about the “.” in my path – I confess I have no idea how it got there, but I must have put it there SOMEhow in the last 1.5 years that I’ve owned this machine.]

Thanks very much for the help here. I’ll be back with more questions, I’m sure, but for now, I’m a lot happier than I was 3 hours ago, and it’s not often one can say that. :slight_smile:

You forgot the eval on that line. With that it would also have worked.

This command is needed to update your shell environment so that it can find the tools and libraries that opam installs in ~/.opam. Just issue opam config env on the cli, this will output on stdout the environment variables it sets up for your reading pleasure.

We are here to help.

Also @spike there is this mailing list for people using OCaml in education. But it’s not very active and I don’t know if there’s a lot of subscribers.