ocamllabs/ocaml-ctypes — pull request #220 by artagnon (2014-11-09 21:56:16+00:00)
Title: attempt to add bool type corresponding to the llvm i1

NOT FOR MERGE!

The idea is to find a way to represet the llvm i1 type, since llvm
ExecutionEngine also uses libffi now. It's a single bit, but I thought
I'd try to coerce it from an i8 (char). The attempt has been
unsuccessful; the build breaks with a seemingly unrelated error. Help
appreciated.

camlfind opt -shared -linkall -package bytes -o
_build/ctypes-foreign-base.cmxs
_build/src/ctypes-foreign-base/closure_properties.cmx
_build/src/ctypes-foreign-base/dl.cmx
_build/src/ctypes-foreign-base/ffi_stubs.cmx
_build/src/ctypes-foreign-base/libffi_abi.cmx
_build/src/ctypes-foreign-base/weakRef.cmx
_build/src/ctypes-foreign-base/ffi.cmx
_build/src/ctypes-foreign-base/foreign_basis.cmx
_build/src/ctypes-foreign-base/dl_stubs.o
_build/src/ctypes-foreign-base/ffi_call_stubs.o
_build/src/ctypes-foreign-base/ffi_type_stubs.o
_build/src/ctypes-foreign-base/dl_stubs.o -cclib
-L/usr/local/Cellar/libffi/3.0.13/lib -cclib -lffi

duplicate symbol _ctypes_resolve_dl_flag in:
_build/src/ctypes-foreign-base/dl_stubs.o
duplicate symbol _ctypes_dlopen in:
_build/src/ctypes-foreign-base/dl_stubs.o
duplicate symbol _ctypes_dlsym in:
_build/src/ctypes-foreign-base/dl_stubs.o
duplicate symbol _ctypes_dlclose in:
_build/src/ctypes-foreign-base/dl_stubs.o
duplicate symbol _ctypes_dlerror in:
_build/src/ctypes-foreign-base/dl_stubs.o
ld: 5 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
File "caml_startup", line 1:
Error: Error during linking
make: *** [_build/ctypes-foreign-base.cmxs] Error 2