Problem compiling on Mac
Trying t o run the test-bundle.script from ASDF on Mac with ECL 16.1.2 gets a compilation failure.
# if you have an ASDF checkout
make
cd test
./run-tests.sh ecl test-bundle.script
Get this output
Undefined symbols for architecture x86_64:
"_sample_function", referenced from:
_L1sample_function in dll-user.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
TEST ABORTED: Error code 1 when executing
(RUN-PROGRAM "/usr/bin/clang" ("-o"
"/Users/rpg/lisp/asdf/build/fasls/ecl-16.1.2-unknown-macosx-x64/asdf/test/dll-user-tmpZ1OVAW0Y.fas"
"-L/opt/local/lib/"
"/private/var/folders/xq/ll1d80qs7hnbw3253yc1_x6m0000gn/T/eclinitW0Ztbt.o"
"/Users/rpg/lisp/asdf/build/fasls/ecl-16.1.2-unknown-macosx-x64/asdf/test/dll-user.o"
"-bundle" "-L/opt/local/lib"
"-Wl,-headerpad_max_install_names" "-arch"
"x86_64" "-L/opt/local/lib"
"-Wl,-headerpad_max_install_names" "-arch"
"x86_64" "-lecl" "-lpthread" "-lm"))
ECL 16.1.2 Mac OS X 10.11
A key thing in the above call is that it seems to mix inconsistent compilation options. The compiler used is the Apple compiler -- /usr/bin/clang
-- but the libraries used are those installed by MacPorts -- /opt/local/lib
. I'm not certain that's why it's failing, but it looks suspicious. Perhaps ECL is choosing the compiler itself, but letting the libraries come from my personal environment, instead of getting libraries consistent with the compiler choice?