-
Notifications
You must be signed in to change notification settings - Fork 20
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
Mac OS X installation: [ERROR] The compilation of ctypes failed at "make". #57
Comments
Seems to be installing a very, very old version of ctypes. Perhaps try
```
$ opam install ctypes.0.11.2 iocaml
```
…On Wed, Jan 25, 2017 at 11:38 AM, laowantong ***@***.***> wrote:
I have just installed a binary of OPAM with the official script
<https://raw.githubusercontent.com/ocaml/opam/master/shell/opam_installer.sh>
on Mac OS X Yosemite 10.10.5, XCode 7.2.1. Now, trying to install iocaml
works fine until make fails on ctypes. Various errors follow. Relaunching
the installation produces the following:
MacBook-Air:~ username$ opam install iocaml
The following actions will be performed:
∗ install iocamljs-kernel 0.4.8 [required by iocaml]
∗ install ctypes 0.3.4 [required by iocaml]
∗ install iocaml-kernel 0.4.8 [required by iocaml]
∗ install iocaml 0.4.8
===== ∗ 4 =====
Do you want to continue ? [Y/n] Y
=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫
[ctypes] Archive in cache
[iocaml] Archive in cache
[iocaml-kernel] Archive in cache
[iocamljs-kernel] Archive in cache
=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫
[ERROR] The compilation of iocamljs-kernel failed at "make clean min".
[ERROR] The compilation of ctypes failed at "make".
Processing 2/4: [ctypes: ocamlfind remove]
#=== ERROR while installing ctypes.0.3.4 ======================================#
# opam-version 1.2.2
# os darwin
# command make
# path /Users/username/.opam/4.02.1/build/ctypes.0.3.4
# compiler 4.02.1
# exit-code 2
# env-file /Users/username/.opam/4.02.1/build/ctypes.0.3.4/ctypes-92056-e7966f.env
# stdout-file /Users/username/.opam/4.02.1/build/ctypes.0.3.4/ctypes-92056-e7966f.out
# stderr-file /Users/username/.opam/4.02.1/build/ctypes.0.3.4/ctypes-92056-e7966f.err
### stdout ###
# [...]
# ocamlfind ocamlc -c -o _build/src/ctypes-foreign-base/libffi_abi.cmi -I _build/src/ctypes-foreign-base -I _build/src/ctypes src/ctypes-foreign-base/libffi_abi.mli
# ocamlfind ocamlc -c -o _build/src/ctypes-foreign-base/libffi_abi.cmo -I _build/src/ctypes-foreign-base -I _build/src/ctypes src/ctypes-foreign-base/libffi_abi.ml
# ocamlfind ocamlc -c -o _build/src/ctypes-foreign-base/weakRef.cmi -I _build/src/ctypes-foreign-base -I _build/src/ctypes src/ctypes-foreign-base/weakRef.mli
# ocamlfind ocamlc -c -o _build/src/ctypes-foreign-base/weakRef.cmo -I _build/src/ctypes-foreign-base -I _build/src/ctypes src/ctypes-foreign-base/weakRef.ml
# ocamlfind ocamlc -c -o _build/src/ctypes-foreign-base/ffi.cmi -I _build/src/ctypes-foreign-base -I _build/src/ctypes src/ctypes-foreign-base/ffi.mli
# ocamlfind ocamlc -c -o _build/src/ctypes-foreign-base/ffi.cmo -I _build/src/ctypes-foreign-base -I _build/src/ctypes src/ctypes-foreign-base/ffi.ml
# ocamlfind ocamlc -c -o _build/src/ctypes-foreign-base/foreign_basis.cmo -I _build/src/ctypes-foreign-base -I _build/src/ctypes src/ctypes-foreign-base/foreign_basis.ml
# ocamlfind ocamlc -a -cclib -lctypes-foreign-base_stubs -dllib -lctypes-foreign-base_stubs -o _build/ctypes-foreign-base.cma _build/src/ctypes-foreign-base/closure_properties.cmo _build/src/ctypes-foreign-base/dl.cmo _build/src/ctypes-foreign-base/ffi_stubs.cmo _build/src/ctypes-foreign-base/libffi_abi.cmo _build/src/ctypes-foreign-base/weakRef.cmo _build/src/ctypes-foreign-base/ffi.cmo _build/src/ctypes-foreign-base/foreign_basis.cmo
# cd _build/src/ctypes-foreign-base && ocamlfind ocamlc -c -ccopt -fPIC -ccopt -Wall -ccopt -O3 -ccopt -I -ccopt /Users/username/src -ccopt -I -ccopt /Users/username/tests -o dl_stubs.o /Users/username/.opam/4.02.1/build/ctypes.0.3.4/src/ctypes-foreign-base/dl_stubs.c
# cd _build/src/ctypes-foreign-base && ocamlfind ocamlc -c -ccopt -fPIC -ccopt -Wall -ccopt -O3 -ccopt -I -ccopt /Users/username/src -ccopt -I -ccopt /Users/username/tests -o ffi_call_stubs.o /Users/username/.opam/4.02.1/build/ctypes.0.3.4/src/ctypes-foreign-base/ffi_call_stubs.c
### stderr ###
# /Users/username/.opam/4.02.1/build/ctypes.0.3.4/src/ctypes-foreign-base/ffi_call_stubs.c:21:10: fatal error: 'ffi.h' file not found
# #include <ffi.h>
# ^
# 1 error generated.
# make: *** [_build/src/ctypes-foreign-base/ffi_call_stubs.o] Error 2
#=== ERROR while installing iocamljs-kernel.0.4.8 =============================#
# opam-version 1.2.2
# os darwin
# command make clean min
# path /Users/username/.opam/4.02.1/build/iocamljs-kernel.0.4.8
# compiler 4.02.1
# exit-code 2
# env-file /Users/username/.opam/4.02.1/build/iocamljs-kernel.0.4.8/iocamljs-kernel-92056-d8a4ae.env
# stdout-file /Users/username/.opam/4.02.1/build/iocamljs-kernel.0.4.8/iocamljs-kernel-92056-d8a4ae.out
# stderr-file /Users/username/.opam/4.02.1/build/iocamljs-kernel.0.4.8/iocamljs-kernel-92056-d8a4ae.err
### stdout ###
# rm -f *.cmis.js
# rm -f *.cm[ioa] iocaml_full.byte iocaml.byte iocaml.js
# rm -fr *~
# ocamlfind ocamlc -c exec.mli
# ocamlfind ocamlc -c \
# -syntax camlp4o -package js_of_ocaml.syntax,optcomp \
# -package str,dynlink,js_of_ocaml,js_of_ocaml.compiler,js_of_ocaml.toplevel \
# -I /Users/username/.opam/4.02.1/lib/ocaml/compiler-libs \
# exec.ml
### stderr ###
# ocamlfind: Package `js_of_ocaml.toplevel' not found
# make: *** [exec.cmo] Error 2
=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫
The following actions were aborted
∗ install iocaml 0.4.8
∗ install iocaml-kernel 0.4.8
The following actions failed
∗ install ctypes 0.3.4
∗ install iocamljs-kernel 0.4.8
No changes have been performed
=-=- ctypes.0.3.4 troobleshooting -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫
=> This package relies on external (system) dependencies that may be missing. `opam depext ctypes.0.3.4' may help you find the correct
installation for your system.
MacBook-Air:~ username$ opam depext ctypes.0.3.4
# Detecting depexts using flags: x86_64 osx
# No extra OS packages requirements found.
Any help in solving this would be appreciate!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#57>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFqzIy64AL_38Ej-KjMaQ2cxL9iLEv6Rks5rVzQrgaJpZM4LtYly>
.
|
It's a little surprising that the depext command isn't finding anything. Do you have Homebrew or MacPorts installed? |
@yallop Not at all. @andrewray Thanks, unfortunately that still fails:
|
@yallop is correct - you need `libffi` installed in order to find `ffi.h`
and that you might, therefore, require something like homebrew.
To fix the new problem here with iocamljs-kernel, you will need to
constrain it manually, for now I think this should work
```
opam install js_of_ocaml.2.8.3 iocaml
```
Let me know how it goes, as it is something I should fix in the opam repo.
…On Wed, Jan 25, 2017 at 11:52 AM, laowantong ***@***.***> wrote:
@yallop <https://github.com/yallop> Not at all.
@andrewray <https://github.com/andrewray> Thanks, unfortunately that
still fails:
MacBook-Air:~ username$ opam install ctypes.0.11.2 iocaml
The following actions will be performed:
∗ install conf-pkg-config 1.0 [required by ctypes]
∗ install iocamljs-kernel 0.4.8 [required by iocaml]
∗ install ctypes 0.11.2
∗ install iocaml-kernel 0.4.8 [required by iocaml]
∗ install iocaml 0.4.8
===== ∗ 5 =====
Do you want to continue ? [Y/n] Y
=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫
[iocaml] Archive in cache
[iocaml-kernel] Archive in cache
[iocamljs-kernel] Archive in cache
[default] https://opam.ocaml.org/archives/ctypes.0.11.2+opam.tar.gz downloaded
=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫
∗ installed conf-pkg-config.1.0
[ERROR] The compilation of iocamljs-kernel failed at "make clean min".
[ERROR] The compilation of ctypes failed at "make XEN=disable ctypes-foreign".
Processing 3/5: [ctypes: ocamlfind remove]
#=== ERROR while installing ctypes.0.11.2 =====================================#
# opam-version 1.2.2
# os darwin
# command make XEN=disable ctypes-foreign
# path /Users/username/.opam/4.02.1/build/ctypes.0.11.2
# compiler 4.02.1
# exit-code 2
# env-file /Users/username/.opam/4.02.1/build/ctypes.0.11.2/ctypes-96572-d0f245.env
# stdout-file /Users/username/.opam/4.02.1/build/ctypes.0.11.2/ctypes-96572-d0f245.out
# stderr-file /Users/username/.opam/4.02.1/build/ctypes.0.11.2/ctypes-96572-d0f245.err
### stdout ###
# [...]
# ocamlfind ocamlopt -bin-annot -c -o _build/src/ctypes-foreign-base/dl.cmi -package bytes -principal -short-paths -g -I _build/src/ctypes-foreign-base -I _build/src/ctypes src/ctypes-foreign-base/dl.mli
# ocamlfind ocamlc -package bytes -principal -short-paths -g -c -o _build/src/ctypes-foreign-base/dl.cmo -I _build/src/ctypes-foreign-base -I _build/src/ctypes src/ctypes-foreign-base/dl.ml
# ocamlfind ocamlopt -bin-annot -c -o _build/src/ctypes-foreign-base/libffi_abi.cmi -package bytes -principal -short-paths -g -I _build/src/ctypes-foreign-base -I _build/src/ctypes src/ctypes-foreign-base/libffi_abi.mli
# ocamlfind ocamlc -package bytes -principal -short-paths -g -c -o _build/src/ctypes-foreign-base/libffi_abi.cmo -I _build/src/ctypes-foreign-base -I _build/src/ctypes src/ctypes-foreign-base/libffi_abi.ml
# ocamlfind ocamlopt -bin-annot -c -o _build/src/ctypes-foreign-base/ctypes_ffi.cmi -package bytes -principal -short-paths -g -I _build/src/ctypes-foreign-base -I _build/src/ctypes src/ctypes-foreign-base/ctypes_ffi.mli
# ocamlfind ocamlc -package bytes -principal -short-paths -g -c -o _build/src/ctypes-foreign-base/ctypes_ffi.cmo -I _build/src/ctypes-foreign-base -I _build/src/ctypes src/ctypes-foreign-base/ctypes_ffi.ml
# ocamlfind ocamlc -package bytes -principal -short-paths -g -c -o _build/src/ctypes-foreign-base/ctypes_foreign_basis.cmo -I _build/src/ctypes-foreign-base -I _build/src/ctypes src/ctypes-foreign-base/ctypes_foreign_basis.ml
# ocamlfind ocamlc -a -principal -short-paths -g -cclib -lctypes-foreign-base_stubs -dllib -lctypes-foreign-base_stubs -package bytes -o _build/ctypes-foreign-base.cma _build/src/ctypes-foreign-base/ctypes_closure_properties.cmo _build/src/ctypes-foreign-base/ctypes_ffi_stubs.cmo _build/src/ctypes-foreign-base/ctypes_weak_ref.cmo _build/src/ctypes-foreign-base/dl.cmo _build/src/ctypes-foreign-base/libffi_abi.cmo _build/src/ctypes-foreign-base/ctypes_ffi.cmo _build/src/ctypes-foreign-base/ctypes_foreign_basis.cmo -cclib -lffi
# cd _build/src/ctypes-foreign-base && ocamlfind ocamlc -c -package bytes -ccopt -fPIC -ccopt -Wall -ccopt -g -ccopt -I -ccopt /Users/username/.opam/4.02.1/build/ctypes.0.11.2/src/ctypes -ccopt -I -ccopt /Users/username/.opam/4.02.1/build/ctypes.0.11.2/tests -o dl_stubs.o -principal -short-paths -g /Users/username/.opam/4.02.1/build/ctypes.0.11.2/src/ctypes-foreign-base/dl_stubs.c
# cd _build/src/ctypes-foreign-base && ocamlfind ocamlc -c -package bytes -ccopt -fPIC -ccopt -Wall -ccopt -g -ccopt -I -ccopt /Users/username/.opam/4.02.1/build/ctypes.0.11.2/src/ctypes -ccopt -I -ccopt /Users/username/.opam/4.02.1/build/ctypes.0.11.2/tests -o ffi_call_stubs.o -principal -short-paths -g /Users/username/.opam/4.02.1/build/ctypes.0.11.2/src/ctypes-foreign-base/ffi_call_stubs.c
### stderr ###
# /Users/username/.opam/4.02.1/build/ctypes.0.11.2/src/ctypes-foreign-base/ffi_call_stubs.c:22:10: fatal error: 'ffi.h' file not found
# #include <ffi.h>
# ^
# 1 error generated.
# make: *** [_build/src/ctypes-foreign-base/ffi_call_stubs.o] Error 2
#=== ERROR while installing iocamljs-kernel.0.4.8 =============================#
# opam-version 1.2.2
# os darwin
# command make clean min
# path /Users/username/.opam/4.02.1/build/iocamljs-kernel.0.4.8
# compiler 4.02.1
# exit-code 2
# env-file /Users/username/.opam/4.02.1/build/iocamljs-kernel.0.4.8/iocamljs-kernel-96572-c61e7b.env
# stdout-file /Users/username/.opam/4.02.1/build/iocamljs-kernel.0.4.8/iocamljs-kernel-96572-c61e7b.out
# stderr-file /Users/username/.opam/4.02.1/build/iocamljs-kernel.0.4.8/iocamljs-kernel-96572-c61e7b.err
### stdout ###
# rm -f *.cmis.js
# rm -f *.cm[ioa] iocaml_full.byte iocaml.byte iocaml.js
# rm -fr *~
# ocamlfind ocamlc -c exec.mli
# ocamlfind ocamlc -c \
# -syntax camlp4o -package js_of_ocaml.syntax,optcomp \
# -package str,dynlink,js_of_ocaml,js_of_ocaml.compiler,js_of_ocaml.toplevel \
# -I /Users/username/.opam/4.02.1/lib/ocaml/compiler-libs \
# exec.ml
### stderr ###
# ocamlfind: Package `js_of_ocaml.toplevel' not found
# make: *** [exec.cmo] Error 2
=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫
The following actions were aborted
∗ install iocaml 0.4.8
∗ install iocaml-kernel 0.4.8
The following actions failed
∗ install ctypes 0.11.2
∗ install iocamljs-kernel 0.4.8
The following changes have been performed
∗ install conf-pkg-config 1.0
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#57 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFqzI9Au-wp9DPY9nFVDF6P8OMguzbOoks5rVzdhgaJpZM4LtYly>
.
|
Installing
Don't know why it is looking for a user named Concerning:
it fails too, but I guess it's normal since |
Actually it seems that I already have
|
Can you see |
Yes, in two places:
|
@laowantong, you may be able to fix this by setting the That said, the recommended approach is to install libffi via MacPorts or Homebrew, if possible. The system-installed libffi is often so old that it lacks features required by ctypes. |
@yallop Thanks. Since all of this is far above my head, I am not quite sure which replacement is required, tentatively:
But the latter is rejected with the following message:
Sorry for having taken too much of your time, but I think I am going to give up here. I have tried the recommended approach (with homebrew) last year, with no more success, going deeper and deeper into the rabbit hole with no result at the end of the day. |
The double quotes (in the
|
OK, this one was really stupid, sorry. After the correction, installing
|
That looks like progress. Does the following help things along any further?
(The directories in the above should be the respective locations of the header file ( |
Yes, this goes further. Not sure what to do next:
... gives some new errors I think:
Same thing with the original command:
And this time, |
The For |
I have just installed a binary of OPAM with the official script on Mac OS X Yosemite 10.10.5, XCode 7.2.1. Now, trying to install iocaml works fine until
make
fails onctypes
. Various errors follow. Relaunching the installation produces the following:Any help in solving this would be appreciate!
The text was updated successfully, but these errors were encountered: