[CM] Re: Compiling FTH on OSX progress

Charles Turner vze26m98@optonline.net
Fri, 09 Mar 2007 11:12:38 -0500


Hi Michael-

I've made a little progress in troubleshooting the OSX compile of FTH.
It seems to be centered around some confusions with the readline
library.

I've been configuring with: ./configure --without-gmp

configure picks up on readline.h and history.h (which is a symlink to
readline.h) in OSX's /usr/include directory. There's some issue with
readline support on OSX, eg:

<http://lua-users.org/lists/lua-l/2004-09/msg00353.html>

but as of now, I'm unclear why OSX has these includes if there's no
support. (A topic for further research...)

My first thought was to simply use --with-readline-prefix=/sw in order
to reference the Fink install of GNU readline that I have. This seemed
to go well until the link stages of FTH's build, where I got a bunch of
errors.

I decided to try to build without readline as a test: ./configure
--without-gmp --without-readline and got the below-- slightly less angry
than the compile --with-readline-prefix, but exhibiting many of the same
errors:

:  ../src/array.o ../src/file.o ../src/hash.o ../src/hook.o ../src/io.o
../src/list.o ../src/misc.o ../src/numbers.o ../src/object.o
../src/port.o ../src/proc.o ../src/regexp.o ../src/string.o
../src/symbol.o ../src/utils.o ../ficl/dictionary.o ../ficl/extras.o
../ficl/fileaccess.o ../ficl/hash.o ../ficl/prefix.o
../ficl/primitives.o ../ficl/search.o ../ficl/stack.o ../ficl/system.o
../ficl/tools.o ../ficl/unix.o ../ficl/utility.o ../ficl/vm.o
../ficl/word.o `if test "Xalloca.o obstack.o regex.o" = "X"; then echo
""; else echo ../lib/*.o; fi` -o libfth.so -lm -lc 
rm -f libfth.a
ar cr libfth.a ../src/array.o ../src/file.o ../src/hash.o ../src/hook.o
../src/io.o ../src/list.o ../src/misc.o ../src/numbers.o ../src/object.o
../src/port.o ../src/proc.o ../src/regexp.o ../src/string.o
../src/symbol.o ../src/utils.o ../ficl/dictionary.o ../ficl/extras.o
../ficl/fileaccess.o ../ficl/hash.o ../ficl/prefix.o
../ficl/primitives.o ../ficl/search.o ../ficl/stack.o ../ficl/system.o
../ficl/tools.o ../ficl/unix.o ../ficl/utility.o ../ficl/vm.o
../ficl/word.o `if test "Xalloca.o obstack.o regex.o" = "X"; then echo
""; else echo ../lib/*.o; fi`
ranlib libfth.a
make fth-static
gcc  -o fth-static fth.o libfth.a -lm -lc 
/usr/bin/ld: Undefined symbols:
_fth_make_ratio_from_float
_gmp_asprintf
_mpf_clear
_mpf_init_set_d
_mpf_integer_p
collect2: ld returned 1 exit status
make[2]: *** [fth-static] Error 1
make[1]: *** [fth] Error 2
make: *** [all] Error 2

I'll start to look at some of these undefined symbols. (why
_gmp_asprintf if I'm not building with gmp?) and see if I can get a good
build.

Take care and thanks again!

Charles

<vze26m98@optonline.net>