UnsatisfiedLinkError while doing "make test" on OS X - SOLVED
Rick Innis
rick at INNIS.CA
Wed Mar 2 12:52:56 PST 2005
Resolved it. Needed to add -single_module to my linker flags. Next time
I'll RTFM before posting :-)
On Mar 2, 2005, at 15:25, Rick Innis wrote:
> Wondering is anyone else is running into this. I'm trying to build the
> Java mapscript classes on OS X (10.3.8), and get an
> UnsatisfiedLinkError when I run "make test"
>
> java.lang.UnsatisfiedLinkError:
> /Library/Java/Extensions/libmapscript.jnilib:
> at java.lang.ClassLoader$NativeLibrary.load(Native Method)
> at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586)
> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1511)
> at java.lang.Runtime.loadLibrary0(Runtime.java:788)
> at java.lang.System.loadLibrary(System.java:834)
> at DumpShp.main(DumpShp.java:32)
> make: *** [test] Error 255
>
> libmapscript.jnilib is the OS X name for libmapscript.so; it's created
> using gcc -dynamiclib instead of gcc -shared.
>
> I know that the JVM is finding the library, otherwise I'd get a
> different message, but it's failing to load it. Has anyone run into and
> resolved this problem on OS X previously, or have any hints on how to
> resolve it?
>
> One possible cause may lie in libmap. I'm currently linking against
> libmap.a, and in trying to build libmap.so (to see if that resolves the
> issue above) I'm getting an error from ld:
>
> common symbols not allowed with MH_DYLIB output format with the
> -multi_module option
> mapparser.o definition of common _msyychar (size 4)
> mapparser.o definition of common _msyylval (size 48)
> mapparser.o definition of common _msyynerrs (size 4)
> mapparser.o definition of common _msyyresult (size 4)
> maplexer.o definition of common _msyyleng (size 4)
> maplexer.o definition of common _msyynumber (size 8)
> maplexer.o definition of common _msyytext (size 4)
> maptime.o definition of common _ms_num_limited_pattern (size 4)
>
> I'm vague on what this means, though from the list of symbols it gives
> I'm hazarding a guess that it's related to yacc and lex output, since
> most of the symbols it's complaining about are in mapparser.o and
> maplexer.o.
>
> Any insights anyone can provide will be gratefully received. Thanks,
>
> --Rick.
>
More information about the MapServer-users
mailing list