From: kulyuki

Subject: C in ACL4.3/UNIX

Date: 1997-2-20 19:05


Hello,

I need to load a few WordNet C binaries into my ACL4.3/UNIX 
image. My foreign loading model is DLFCN. Here is how I
originally went about it:

gcc -c -fPIC morph.c
gcc -c -fPIC wnglobals.c
gcc -c -fPIC wnutil.c
gcc -c -fPIC stopsearch.c
gcc -c -fPIC search.c
gcc -c -fPIC binsearch.c
ld -G -o mrph.so morph.o wnglobals.o stopsearch.o search.o binsearch.o

When I tried to load mrph.so into my Lisp image, I got the following
error message:

>> USER(24): :ld mrph.so >> ; Foreign loading ./mrph.so. >> Error: loading library #p"./mrph.so" caused the following error: >> ld.so.1: /opt/local/bin/cl4.3+bigmem: fatal: relocation error: >> symbol not found: __eprintf: referenced in ./mrph.so
>> Restart actions (select using :continue): >> 0: retry the load of ./mrph.so >> 1: skip loading ./mrph.so >> [1] USER(25):
It looks like the __eprintf function is not defined or referenced in any of the above source files. What did I do wrong here? Did anyone ever get a similar error message? What causes it to happen? One peculiar thing about this is that everything compiled and ran beautifully as an independent C executable, i.e. after I put a small main() driver into morph.c and executed gcc -o mrph morph.c wnglobals.c wnutil.c stopsearch.c binsearch.c search.c mrph did what it was supposed to do. Any help will be greatly appreciated! Regards, VK