On 06/01/2016 15:44, Anthony Fox wrote:
I?ve been looking into getting HOL4 working with Poly/ML 5.6 (Git version 8592e2a) on Mac OS 10.11.2 with Xcode 7.2.
When trying to build Poly/ML with
./configure --enabled-shared
I got
ld: illegal text-relocation to 'assign_word' in .libs/x86asmtemp.o from '_entryPointVector' in .libs/x86asmtemp.o for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [libpolyml.la] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
I've moved the entryPointVector into the C++ code so it can now be built with position-independent code. It meant adding a lot of external references but it does mean that --enable-shared works on Mac OS X, at least the machine I tried it on.
However, the build was successful with the default ./configure.
Once built there was a problem when calling polyc, as I was getting the error
ld: unknown option: -R/path/lib
Replacing
-Wl,-R${LIBDIR}
with
-Wl,-rpath ${LIBDIR}
I've changed this to use -rpath. It seems to work on the Linux and Mac OS X machines I've tried. I'll take out completely if there are any problems with that.
David