[Insight-users] Re: ITK/Java/Solaris issue
Gaetan Lehmann
gaetan.lehmann at jouy.inra.fr
Fri Jun 9 09:58:51 EDT 2006
Hi,
It should work if you add it to CMAKE_EXE_LINKER_FLAGS (use t in ccmake to
toggle advanced mode).
I'm not a specialist, but I think you shouldn't have to do that if the
code is built with g++. Are you sure CMAKE_CXX_COMPILER i sconfigured as
it should ?
Gaetan
On Fri, 09 Jun 2006 15:52:03 +0200, Michael Bell <michael.bell at acm.org>
wrote:
> In order to try to solve this problem, I would like to add -lstdc++ to
> the linker when libSwigRuntimeJava is built. Where is the appropriate
> place to add this? I am willing to edit the cmake generated files if
> that is what I need to do.
>
> thanks,
> michael
>
> On 6/8/06, Michael Bell <michael.bell at acm.org> wrote:
>> All,
>>
>> I am trying to use ITK and Java on Solaris. I am starting with a
>> simple example from the Examples directory which loads an image,
>> filters it, and writes it. The build of itk with java bindings seems
>> to go fine. Then I try to compile and run:
>> %javac -classpath /home/me/lib/InsightToolkit/InsightToolkit.jar:.
>> test.java
>> so far so good
>> %javac -classpath /home/me/lib/InsightToolkit/InsightToolkit.jar:. test
>> Exception in thread "main" java.lang.UnsatisfiedLinkError:
>> /home/me/lib/InsightToolkit/libSwigRuntimeJava.so: ld.so.1: java:
>> fatal: relocation error: file
>> /home/me/lib/InsightToolkit/libSwigRuntimeJava.so: symbol
>> __gxx_personality_v0: referenced symbol not found
>> at java.lang.ClassLoader$NativeLibrary.load(Native Method)
>> at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586)
>> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1482)
>> at java.lang.Runtime.load0(Runtime.java:737)
>> at java.lang.Runtime.load(Runtime.java:725)
>> at InsightToolkit.itkbase.<clinit>(itkbase.java:60)
>> at
>> InsightToolkit.itkImage_2DJNI.<clinit>(itkImage_2DJNI.java:1504)
>> at InsightToolkit.itkImageF2.itkImageF2_New(itkImageF2.java:84)
>> at jtester.main(jtester.java:12)
>>
>> %ldd -r libSwigRuntimeJava.so
>> libgcc_s.so.1 => /vol01/prism/ian/pub/lib/libgcc_s.so.1
>> libc.so.1 => /usr/lib/libc.so.1
>> libdl.so.1 => /usr/lib/libdl.so.1
>> symbol not found: __gxx_personality_v0
>> (./libSwigRuntimeJava.so)
>> symbol not found: __gxx_personality_v0
>> (./libSwigRuntimeJava.so)
>> symbol not found: _Znwj (./libSwigRuntimeJava.so)
>> symbol not found: _ZdlPv
>> (./libSwigRuntimeJava.so)
>> /usr/platform/FJSV,GPUZC-M/lib/libc_psr.so.1
>>
>> System info:
>> SunOS virgil 5.9 Generic_118558-10 sun4us sparc FJSV,GPUZC-M Solaris
>> Java 1.4.2
>> gcc 3.3.1
>> ITK 2.6
>>
>> I am able to run the exact same program with the same version of java
>> and itk successfully on Linux. Can anyone help me understand this
>> error?
>>
>> thanks,
>> michael
>>
>> --
>> michael.bell at acm.org
>>
>
>
--
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66 fax: 01 34 65 29 09
http://voxel.jouy.inra.fr
More information about the Insight-users
mailing list