ocaml-ctypes
ocaml-ctypes copied to clipboard
compiling ctypes-foreign doesn't find libffi in 4.11.2+musl+static+flambda; 4.11.2+flambda fine.
libffi is installed on my Ubuntu 18.04
/usr/share/info/libffi.info.gz
/usr/share/doc/libffi6
/usr/share/doc/libffi-dev
/usr/share/doc-base/libffi
/usr/lib/x86_64-linux-gnu/libffi.a
/usr/lib/x86_64-linux-gnu/libffi.so.6.0.4
/usr/lib/x86_64-linux-gnu/libffi.so
/usr/lib/x86_64-linux-gnu/pkgconfig/libffi.pc
/usr/lib/x86_64-linux-gnu/libffi_pic.a
/usr/lib/x86_64-linux-gnu/libffi.so.6
Compiling with regular 4.11.2+flambda finds it without problem. Compiling with 4.11.2+musl+static+flambda (from opam switch) complains that
# The following required C libraries are missing: libffi.
# Please install them and retry. If they are installed in a non-standard location
# or need special flags, set the environment variables <LIB>_CFLAGS and <LIB>_LIBS
# accordingly and retry.
#
# For example, if libffi is installed in /opt/local, you can type:
#
# export LIBFFI_CFLAGS=-I/opt/local/include
# export LIBFFI_LIBS="-L/opt/local/lib -lffi"
# Makefile:186: recipe for target 'test-libffi' failed
I've tried the said exports with the directories found above, to no avail. My goal is to create a statically-linked executable for a program that uses ctypes-foreign and a C library.