Menu

#707 Dynamic modules linking fails on Mac OS X

build problems
open
None
5
2017-10-04
2017-10-04
No

Build fails on MacOSX with clang:

rm -rf full
rm -rf dynmod; mkdir dynmod
MAKE=/Library/Developer/CommandLineTools/usr/bin/make CLISP="/Users/sds/src/clisp/current/build-g/clisp  -E UTF-8 -Emisc 1:1 -norc" ./clisp-link add base full asdf rawsock postgresql #|| (rm -rf full ; exit 1)
make[1]: Nothing to be done for `clisp-module'.
make[1]: Nothing to be done for `clisp-module'.
gcc -dynamiclib -o /Users/sds/src/clisp/current/build-g/dynmod/lib-rawsock.so rawsock.o -W -Wswitch -Wcomment -Wpointer-arith -Wreturn-type -Wmissing-declarations -Wimplicit -Wno-sign-compare -Wno-format-nonliteral -Wno-shift-negative-value -fwrapv -fno-strict-aliasing -ggdb -O0 -DDEBUG_OS_ERROR -DDEBUG_SPVW -DDEBUG_BYTECODE -DSAFETY=3 -DUNIX_BINARY_DISTRIB -DENABLE_UNICODE -DDYNAMIC_FFI -DDYNAMIC_MODULES -DNO_GETTEXT -fno-common -DPIC -install_name /lib-rawsock.so
Undefined symbols for architecture x86_64:
  "_I_to_UL", referenced from:
      _C_subr_rawsock_configdev in rawsock.o

and many many many more missing symbols.
if I manually add

./modules.o ../base/bogomips.o ../base/calls.o ../base/gettext.o ../base/readline.o ../base/regexi.o ../lisp.a ../libgnu.a

to the command line, the file lib-rawsock.so is 4M - it contains the whole CLISP.

how do we do dynamic linking on macosx?

Discussion


Log in to post a comment.

MongoDB Logo MongoDB