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

opam will not build on Mac OS X 10.7.5 #2103

Closed
FranklinChen opened this issue Apr 6, 2015 · 5 comments
Closed

opam will not build on Mac OS X 10.7.5 #2103

FranklinChen opened this issue Apr 6, 2015 · 5 comments

Comments

@FranklinChen
Copy link

On my 2008 MacBook, I cannot build opam, even though OCaml itself works fine.

$ ocaml -version
The OCaml toplevel, version 4.02.1
$ ./configure
$ make lib-ext
make -C src_ext lib-ext
[ -e  extlib-1.5.3.tar.gz ] || curl  -OL http://ocaml-extlib.googlecode.com/files/extlib-1.5.3.tar.gz
ocaml ../shell/md5check.ml extlib-1.5.3.tar.gz 3de5f4e0a95fda7b2f3819c4a655b17c
extlib-1.5.3.tar.gz has the expected MD5.
mkdir -p tmp
cd tmp && tar xfz ../extlib-1.5.3.tar.gz
rm -rf extlib
mv tmp/* extlib
rmdir tmp
[ -e  ocaml-re-1.2.0.tar.gz ] || curl  -OL https://github.com/ocaml/ocaml-re/archive/ocaml-re-1.2.0.tar.gz
ocaml ../shell/md5check.ml ocaml-re-1.2.0.tar.gz 5cbfc137683ef2b0e91f931577f2e673
ocaml-re-1.2.0.tar.gz has the expected MD5.
mkdir -p tmp
cd tmp && tar xfz ../ocaml-re-1.2.0.tar.gz
rm -rf re
mv tmp/* re
rmdir tmp
[ -e  cmdliner-0.9.7.tbz ] || curl  -OL http://erratique.ch/software/cmdliner/releases/cmdliner-0.9.7.tbz
ocaml ../shell/md5check.ml cmdliner-0.9.7.tbz 46d7553b95f623f811df2a844fb448fb
cmdliner-0.9.7.tbz has the expected MD5.
mkdir -p tmp
cd tmp && tar xfj ../cmdliner-0.9.7.tbz
rm -rf cmdliner
mv tmp/* cmdliner
rmdir tmp
patching file src/cmdliner.ml
[ -e  ocamlgraph-1.8.5.tar.gz ] || curl  -OL http://ocamlgraph.lri.fr/download/ocamlgraph-1.8.5.tar.gz
ocaml ../shell/md5check.ml ocamlgraph-1.8.5.tar.gz 75dde65bfc3f9b07e795343d369aa84d
ocamlgraph-1.8.5.tar.gz has the expected MD5.
mkdir -p tmp
cd tmp && tar xfz ../ocamlgraph-1.8.5.tar.gz
rm -rf graph
mv tmp/* graph
rmdir tmp
[ -e  cudf-0.7.tar.gz ] || curl  -OL https://gforge.inria.fr/frs/download.php/file/33593/cudf-0.7.tar.gz
ocaml ../shell/md5check.ml cudf-0.7.tar.gz 2047222fcf78278c6a24ac619fc39abb
cudf-0.7.tar.gz has the expected MD5.
mkdir -p tmp
cd tmp && tar xfz ../cudf-0.7.tar.gz
rm -rf cudf
mv tmp/* cudf
rmdir tmp
[ -e  dose3-3.3.tar.gz ] || curl  -OL https://gforge.inria.fr/frs/download.php/file/34277/dose3-3.3.tar.gz
ocaml ../shell/md5check.ml dose3-3.3.tar.gz ea947804c636059bb8b64dbda5c1df08
dose3-3.3.tar.gz has the expected MD5.
mkdir -p tmp
cd tmp && tar xfz ../dose3-3.3.tar.gz
rm -rf dose
mv tmp/* dose
rmdir tmp
patching file algo/defaultgraphs.ml
patching file algo/depsolver.ml
patching file algo/depsolver_int.ml
patching file algo/diagnostic.ml
patching file algo/dominators.ml
patching file algo/flatten.ml
patching file algo/statistics.ml
patching file algo/strongconflicts.ml
patching file algo/strongconflicts_int.ml
patching file algo/strongdeps.ml
patching file algo/strongdeps_int.ml
patching file applications/ceve.ml
patching file applications/challenged.ml
patching file applications/deb-buildcheck.ml
patching file applications/deb-coinstall.ml
patching file applications/distcheck.ml
patching file applications/dominators-graph.ml
patching file applications/outdated.ml
patching file applications/smallworld.ml
patching file applications/strong-deps.ml
patching file common/cudfAdd.ml
patching file common/cudfSolver.ml
patching file common/edosSolver.ml
patching file common/input.ml
patching file common/url.ml
patching file common/util.ml
patching file common/util.mli
patching file cv/cvcudf.ml
patching file deb/apt.ml
patching file deb/architecture.ml
patching file deb/debcudf.ml
patching file deb/debutil.ml
patching file deb/edsp.ml
patching file deb/format822.ml
patching file deb/packages.ml
patching file deb/sources.ml
patching file doseparse/stdDebug.ml
patching file doseparse/stdLoaders.ml
patching file doseparse/stdOptions.ml
patching file doseparse/stdUtils.ml
patching file eclipse/packages.ml
patching file eclipse/version.ml
patching file opencsw/packages.ml
patching file opencsw/version.ml
patching file rpm/hdlists.ml
patching file rpm/packages.ml
patching file rpm/rpmcudf.ml
patching file applications/ceve.ml
patching file applications/challenged.ml
patching file common/input.ml
patching file common/input.mli
patching file doseparse/stdLoaders.ml
patching file algo/depsolver.ml
[ -e  uutf-0.9.3.tbz ] || curl  -OL http://erratique.ch/software/uutf/releases/uutf-0.9.3.tbz
ocaml ../shell/md5check.ml uutf-0.9.3.tbz 708c0421e158b390c7cc341f37b40add
uutf-0.9.3.tbz has the expected MD5.
mkdir -p tmp
cd tmp && tar xfj ../uutf-0.9.3.tbz
rm -rf uutf
mv tmp/* uutf
rmdir tmp
[ -e  jsonm-0.9.1.tbz ] || curl  -OL http://erratique.ch/software/jsonm/releases/jsonm-0.9.1.tbz
ocaml ../shell/md5check.ml jsonm-0.9.1.tbz 631a5dabdada83236c83056f60e42685
jsonm-0.9.1.tbz has the expected MD5.
mkdir -p tmp
cd tmp && tar xfj ../jsonm-0.9.1.tbz
rm -rf jsonm
mv tmp/* jsonm
rmdir tmp
cp graph/src/sig.mli graph/src/sig.ml
cp graph/src/sig_pack.mli graph/src/sig_pack.ml
cp graph/src/dot_ast.mli graph/src/dot_ast.ml
make -f ../OCamlMakefile subprojs SUBTARGET=bcl
ocamlc.opt -c -I extlib/ extlib/enum.mli
ocamlc.opt -c -I extlib/ extlib/enum.ml
ocamlc.opt -c -I extlib/ extlib/extHashtbl.mli
ocamlc.opt -c -I extlib/ extlib/extHashtbl.ml
ocamlc.opt -c -I extlib/ extlib/extList.mli
ocamlc.opt -c -I extlib/ extlib/extList.ml
ocamlc.opt -c -I extlib/ extlib/extString.mli
ocamlc.opt -c -I extlib/ extlib/extString.ml
File "extlib/extString.ml", line 28, characters 9-15:
Warning 3: deprecated: create
Use Bytes.create instead.
File "extlib/extString.ml", line 30, characters 2-12:
Warning 3: deprecated: unsafe_set
File "extlib/extString.ml", line 125, characters 2-8:
Warning 3: deprecated: create
Use Bytes.create instead.
File "extlib/extString.ml", line 172, characters 9-15:
Warning 3: deprecated: create
Use Bytes.create instead.
File "extlib/extString.ml", line 174, characters 21-31:
Warning 3: deprecated: unsafe_set
File "extlib/extString.ml", line 179, characters 10-16:
Warning 3: deprecated: create
Use Bytes.create instead.
File "extlib/extString.ml", line 181, characters 2-12:
Warning 3: deprecated: unsafe_set
File "extlib/extString.ml", line 211, characters 12-25:
Warning 3: deprecated: String.create
Use Bytes.create instead.
File "extlib/extString.ml", line 214, characters 14-26:
Warning 3: deprecated: String.set
Use Bytes.set instead.
File "extlib/extString.ml", line 230, characters 12-18:
Warning 3: deprecated: create
Use Bytes.create instead.
File "extlib/extString.ml", line 249, characters 28-39:
Warning 3: deprecated: String.copy
ocamlc.opt -c -I extlib/ extlib/global.mli
ocamlc.opt -c -I extlib/ extlib/global.ml
ocamlc.opt -c -I extlib/ extlib/install.ml
ocamlc.opt -c -I extlib/ extlib/IO.mli
ocamlc.opt -c -I extlib/ extlib/IO.ml
File "extlib/IO.ml", line 65, characters 9-22:
Warning 3: deprecated: String.create
Use Bytes.create instead.
File "extlib/IO.ml", line 119, characters 9-22:
Warning 3: deprecated: String.create
Use Bytes.create instead.
File "extlib/IO.ml", line 176, characters 13-26:
Warning 3: deprecated: String.create
Use Bytes.create instead.
File "extlib/IO.ml", line 293, characters 6-23:
Warning 3: deprecated: String.unsafe_set
File "extlib/IO.ml", line 709, characters 12-25:
Warning 3: deprecated: String.create
Use Bytes.create instead.
File "extlib/IO.ml", line 726, characters 12-25:
Warning 3: deprecated: String.create
Use Bytes.create instead.
File "extlib/IO.ml", line 728, characters 2-19:
Warning 3: deprecated: String.unsafe_set
File "extlib/IO.ml", line 745, characters 4-21:
Warning 3: deprecated: String.unsafe_set
ocamlc.opt -c -I extlib/ extlib/option.mli
ocamlc.opt -c -I extlib/ extlib/option.ml
ocamlc.opt -c -I extlib/ extlib/pMap.mli
ocamlc.opt -c -I extlib/ extlib/pMap.ml
ocamlc.opt -c -I extlib/ extlib/refList.mli
ocamlc.opt -c -I extlib/ extlib/refList.ml
ocamlc.opt -c -I extlib/ extlib/std.mli
ocamlc.opt -c -I extlib/ extlib/std.ml
File "extlib/std.ml", line 52, characters 16-29:
Warning 3: deprecated: String.create
Use Bytes.create instead.
File "extlib/std.ml", line 65, characters 37-50:
Warning 3: deprecated: String.create
Use Bytes.create instead.
File "extlib/std.ml", line 67, characters 13-26:
Warning 3: deprecated: String.create
Use Bytes.create instead.
File "extlib/std.ml", line 162, characters 14-27:
Warning 3: deprecated: Obj.final_tag
Replaced by custom_tag.
ocamlc.opt -c -I extlib/ extlib/uChar.mli
ocamlc.opt -c -I extlib/ extlib/uChar.ml
ocamlc.opt -c -I extlib/ extlib/unzip.mli
ocamlc.opt -c -I extlib/ extlib/unzip.ml
File "extlib/unzip.ml", line 172, characters 12-25:
Warning 3: deprecated: String.create
Use Bytes.create instead.
File "extlib/unzip.ml", line 179, characters 9-22:
Warning 3: deprecated: String.create
Use Bytes.create instead.
File "extlib/unzip.ml", line 191, characters 1-18:
Warning 3: deprecated: String.unsafe_set
File "extlib/unzip.ml", line 259, characters 1-18:
Warning 3: deprecated: String.unsafe_set
File "extlib/unzip.ml", line 436, characters 9-22:
Warning 3: deprecated: String.create
Use Bytes.create instead.
ocamlc.opt -c -I extlib/ extlib/uTF8.mli
ocamlc.opt -c -I extlib/ extlib/uTF8.ml
ocamlc.opt -c -I extlib/ extlib/optParse.mli
ocamlc.opt -c -I extlib/ extlib/optParse.ml
ocamlc.opt -c -I extlib/ extlib/dynArray.mli
ocamlc.opt -c -I extlib/ extlib/dynArray.ml
ocamlc.opt -c -I extlib/ extlib/dllist.mli
ocamlc.opt -c -I extlib/ extlib/dllist.ml
ocamlc.opt -c -I extlib/ extlib/bitSet.mli
ocamlc.opt -c -I extlib/ extlib/bitSet.ml
File "extlib/bitSet.ml", line 23, characters 40-53:
Warning 3: deprecated: String.create
Use Bytes.create instead.
File "extlib/bitSet.ml", line 28, characters 64-75:
Warning 3: deprecated: String.fill
Use Bytes.fill instead.
ocamlc.opt -c -I extlib/ extlib/base64.mli
ocamlc.opt -c -I extlib/ extlib/base64.ml
File "extlib/base64.ml", line 98, characters 4-21:
Warning 3: deprecated: String.unsafe_set
ocamlc.opt -c -I extlib/ extlib/extArray.mli
ocamlc.opt -c -I extlib/ extlib/extArray.ml
ocamlc.opt -c -I extlib/ extlib/extLib.ml
make[4]: *** No rule to make target `-L/usr/local/lib.cma', needed by `extlib.cma'.  Stop.
make[3]: *** [byte-code-library] Error 2
make[2]: *** [subproj_extlib] Error 2
make[1]: *** [build] Error 2
make: *** [lib-ext] Error 2
@AltGr
Copy link
Member

AltGr commented Apr 7, 2015

make[4]: *** No rule to make target `-L/usr/local/lib.cma', needed by `extlib.cma'.  Stop.

Ow, that's weird, looks like a bug in make/OCamlMakefile/OPAM's Makefiles ? Do you have any make related environment variables set ? What version of make are you using ?

An alternative to building with lib-ext would be to bootstrap using binary opam to install the required dependencies.

Thanks for reporting!

@FranklinChen
Copy link
Author

$ make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0
$ env | grep -i make
MAKELEVEL=
MAKEFLAGS=

I cannot run a binary opam because I'm on a 2008 MacBook for which https://github.com/ocaml/opam/releases/download/1.2.1/opam-1.2.1-x86_64-Darwin simply seg-faults.

@AltGr
Copy link
Member

AltGr commented Apr 10, 2015

Hm, annoying indeed. It's hard to see what happens.
You can test the build of extlib specifically (from scratch) with:

make -C src_ext SUBPROJS=extlib clean extlib.stamp ncl

The output here ends thusly, including the command that it fails to generate on your laptop:

ocamlc.opt -c -I extlib/ extlib/extArray.mli
ocamlopt.opt -c -I extlib/ extlib/extArray.ml
ocamlopt.opt -c -I extlib/ extlib/extLib.ml
ocamlopt.opt -a       -I extlib/     -ccopt -Lextlib/    -o extlib.cmxa extlib/enum.cmx extlib/extHashtbl.cmx extlib/extList.cmx extlib/extString.cmx extlib/global.cmx extlib/install.cmx extlib/IO.cmx extlib/option.cmx extlib/pMap.cmx extlib/refList.cmx extlib/std.cmx extlib/uChar.cmx extlib/unzip.cmx extlib/uTF8.cmx extlib/optParse.cmx extlib/dynArray.cmx extlib/dllist.cmx extlib/bitSet.cmx extlib/base64.cmx extlib/extArray.cmx extlib/extLib.cmx

@FranklinChen
Copy link
Author

Using make -C src_ext SUBPROJS=extlib clean extlib.stamp ncl I get as far as this:

ocamlc.opt -c -I extlib/ extlib/base64.mli
ocamlopt.opt -c -I extlib/ extlib/base64.ml
File "extlib/base64.ml", line 98, characters 4-21:
Warning 3: deprecated: String.unsafe_set
ocamlc.opt -c -I extlib/ extlib/extArray.mli
ocamlopt.opt -c -I extlib/ extlib/extArray.ml
ocamlopt.opt -c -I extlib/ extlib/extLib.ml
make[3]: *** No rule to make target `-L/usr/local/lib.cmxa', needed by `extlib.cmxa'.  Stop.
make[2]: *** [native-code-library] Error 2
make[1]: *** [subproj_extlib] Error 2
make: *** [ncl] Error 2

@FranklinChen
Copy link
Author

I found out my problem was purely my fault, a result of a stray LIBS environment variable setting that led to its usage by the build process!

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

2 participants