[vtkusers] VTK Build Problems

Jeremy Stout stout.jeremy at gmail.com
Wed Jun 29 09:49:05 EDT 2005


Using the suggested library paths resolved some of my problems. I was
still getting the "-fPIC" errors, so I recompiled MPI with the
following commandline:

CFLAGS="-fPIC" FFLAGS="-fPIC" ./configure --with-comm=shared  && make

That command assumes you are currently in the MPICH directory. After I
did that, everything compiled fine. I'm going to try writing a couple
of small VTK parallel programs in the next couple of days.

However, this brings me to my latest problem:

[stout at pollux1 preprocessor]$ java PreprocessorFrame
Exception in thread "main" java.lang.UnsatisfiedLinkError:
/home/stout/vtk/bin/libvtkCommonJava.so:
/home/stout/vtk/bin/libvtkCommonJava.so: cannot open shared object
file: No such file or directory
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
        at java.lang.Runtime.loadLibrary0(Runtime.java:822)
        at java.lang.System.loadLibrary(System.java:992)
        at vtk.vtkPanel.<clinit>(vtkPanel.java:26)
        at PreprocessorFrame.setupDisplayPanel(PreprocessorFrame.java:336)
        at PreprocessorFrame.<init>(PreprocessorFrame.java:100)
        at PreprocessorFrame.main(PreprocessorFrame.java:1068)

PreprocessorFrame is a program that makes use of vtkPanel. I've setup
my LD_LIBRARY_PATh and PATH variables to point to the directory where
vtkCommonJava.so is being stored, but I am still getting that error
message. I've tried compiling vtk as a shared library, but I still get
the same error message.

Jeremy Stout

On 6/28/05, Kenneth Gage <kenneth.gage at gmail.com> wrote:
> Jeremy -
> 
> If you don't mind, let me know how your compiled MPI works with VTK.
> My build is bombing out with some unresolved symbols in the TCL
> portion of the build.  If yours works, could you post your compile
> flags for the MPI build?
> 
> Thanks!
> Ken
> 
> On 6/27/05, Jeremy Stout <stout.jeremy at gmail.com> wrote:
> > Thanks for the tips on the Library path, I'll try that out. As for
> > MPI, I recompiled it with -fPIC before writing my first mail. The
> > compiler didn't give me any error messages when I used that flag, so I
> > am going to assume that worked.
> >
> > Jeremy Stout
> >
> > On 6/27/05, Kenneth Gage <kenneth.gage at gmail.com> wrote:
> > > Jeremy -
> > >
> > > To get the latest 64-bit sun Java to work, I had to the add the
> > > following paths like so under bash
> > >
> > > $>LD_LIBRARY_PATH=/path/to/jdk/jdk1.5.0_04/jre/lib/amd64/xawt:/path/to/jdk/jdk1.5.0_04/jre/lib/amd64/server
> > > $>export LD_LIBRARY_PATH
> > >
> > > You can then run make and make install.
> > >
> > > The xawt directory will allow libmawt.so to be found and the server
> > > directory allows libjvm.so to be found.
> > >
> > > The -fPIC warning you see on the MPI stuff means that the MPI
> > > libraries need to be recompiled with -fPIC in the compiler directives.
> > >  Unfortunately, you will received the same result using the included
> > > LAM-MPI libraries (to the best of my knowledge, I'm using FC4) so at
> > > this point it looks like recompiling some MPI flavor is the only
> > > option.
> > >
> > >
> > > HTH -
> > >
> > > Ken
> > >
> > >
> > > On 6/27/05, Jeremy Stout <stout.jeremy at gmail.com> wrote:
> > > > I am trying to build the nightly version of VTK on a Fedora Core 3
> > > > X86_64 system with MPI, Parallel, and Java support. I am able to get
> > > > it to compile with MPI, but as I turn on the Java switch, problems
> > > > start to arise. Here is a summary of the error messages I am getting:
> > > >
> > > > With i586 version of Java/No MPI/with VTK_USE_PARALLEL:
> > > > Building shared library /home/stout/vtk/bin/libvtkRenderingJava.so...
> > > > /usr/bin/ld: skipping incompatible
> > > > /home/stout/jdk1.5.0_04/jre/lib/i386/libjawt.so when searching for
> > > > -ljawt
> > > > /usr/bin/ld: cannot find -ljawt
> > > > collect2: ld returned 1 exit status
> > > > make[3]: *** [/home/stout/vtk/bin/libvtkRenderingJava.so] Error 1
> > > > make[2]: *** [default_target] Error 2
> > > > make[1]: *** [default_target_Rendering] Error 2
> > > > make: *** [default_target] Error 2
> > > >
> > > > With AM64 version of Java/MPI/with VTK_USE_PARALLEL:
> > > > Building shared library /home/stout/vtk/bin/libvtkParallelJava.so...
> > > > /usr/bin/ld: /usr/local/common/mpich/lib/libmpich.a(initfcmn.o):
> > > > relocation R_X86_64_32 against `mpipriv_' can not be used when making
> > > > a shared object; recompile with -fPIC
> > > > /usr/local/common/mpich/lib/libmpich.a: could not read symbols: Bad value
> > > > collect2: ld returned 1 exit status
> > > > make[3]: *** [/home/stout/vtk/bin/libvtkParallelJava.so] Error 1
> > > > make[2]: *** [default_target] Error 2
> > > > make[1]: *** [default_target_Parallel] Error 2
> > > > make: *** [default_target] Error 2
> > > >
> > > > With AMD 64 version of Java/No MPI/with VTK_USE_PARALLEL:
> > > > /home/stout/vtk/Wrapping/Java: building default_target
> > > > Building dependencies. cmake.depends...
> > > > Building object file VTKJava.o...
> > > > Building executable /home/stout/vtk/bin/VTKJavaExecutable...
> > > > /usr/bin/ld: warning: libmawt.so, needed by
> > > > /usr/local/common/jdk1.5.0_03/jre/lib/amd64/libjawt.so, not found (try
> > > > using -rpath or -rpath-link)
> > > > /usr/bin/ld: warning: libjvm.so, needed by
> > > > /usr/local/common/jdk1.5.0_03/jre/lib/amd64/libjawt.so, not found (try
> > > > using -rpath or
> > > > -rpath-link)/usr/local/common/jdk1.5.0_03/jre/lib/amd64/libjava.so:
> > > > undefined reference to `JVM_MaxObjectInspectionAge at SUNWprivate_1.1'
> > > > /usr/local/common/jdk1.5.0_03/jre/lib/amd64/libjava.so: undefined
> > > > reference to `JVM_Halt at SUNWprivate_1.1'/usr/local/common/jdk1.5.0_03/jre/lib/amd64/libjava.so:
> > > > undefined reference to
> > > > `JVM_ClassLoaderDepth at SUNWprivate_1.1'/usr/local/common/jdk1.5.0_03/jre/lib/amd64/libjava.so:
> > > > undefined reference to
> > > > `JVM_GetClassDeclaredConstructors at SUNWprivate_1.1'/usr/local/common/jdk1.5.0_03/jre/lib/amd64/libverify.so:
> > > > undefined reference to
> > > > `JVM_GetCPMethodNameUTF at SUNWprivate_1.1'/usr/local/common/jdk1.5.0_03/jre/lib/amd64/libjava.so:
> > > > undefined reference to `JVM_LatestUserDefinedLoader at SUNWprivate_1.1'
> > > > /usr/local/common/jdk1.5.0_03/jre/lib/amd64/libjava.so: undefined
> > > > reference to `JVM_Read at SUNWprivate_1.1'/usr/local/common/jdk1.5.0_03/jre/lib/amd64/libverify.so:
> > > > undefined reference to
> > > > `JVM_GetMethodIxModifiers at SUNWprivate_1.1'/usr/local/common/jdk1.5.0_03/jre/lib/amd64/libjava.so:
> > > > undefined reference to
> > > > `JVM_FindSignal at SUNWprivate_1.1'/usr/local/common/jdk1.5.0_03/jre/lib/amd64/libjava.so:
> > > > undefined reference to
> > > > `JVM_GetStackTraceElement at SUNWprivate_1.1'/usr/local/common/jdk1.5.0_03/jre/lib/amd64/libverify.so:
> > > > undefined reference to `JVM_GetClassMethodsCount at SUNWprivate_1.1'
> > > > /usr/local/common/jdk1.5.0_03/jre/lib/amd64/libverify.so: undefined
> > > > reference to `JVM_GetClassMethodsCount at SUNWprivate_1.1'
> > > > /usr/local/common/jdk1.5.0_03/jre/lib/amd64/libverify.so: undefined
> > > > reference to `JVM_IsSameClassPackage at SUNWprivate_1.1'
> > > > /usr/local/common/jdk1.5.0_03/jre/lib/amd64/libjava.so: undefined
> > > > reference to `JVM_SetArrayElement at SUNWprivate_1.1'
> > > > /usr/local/common/jdk1.5.0_03/jre/lib/amd64/libjava.so: undefined
> > > > reference to `JVM_IHashCode at SUNWprivate_1.1'
> > > > /usr/local/common/jdk1.5.0_03/jre/lib/amd64/libjava.so: undefined
> > > > reference to `JVM_GetClassConstantPool at SUNWprivate_1.1'
> > > > /usr/local/common/jdk1.5.0_03/jre/lib/amd64/libjava.so: undefined
> > > > reference to `JVM_GetDeclaredClasses at SUNWprivate_1.1'
> > > > /usr/local/common/jdk1.5.0_03/jre/lib/amd64/libjava.so: undefined
> > > > reference to `JVM_UnloadLibrary at SUNWprivate_1.1'/usr/local/common/jdk1.5.0_03/jre/lib/amd64/libjava.so:
> > > > undefined reference to
> > > > `JVM_Close at SUNWprivate_1.1'/usr/local/common/jdk1.5.0_03/jre/lib/amd64/libjava.so:
> > > > undefined reference to
> > > > `JVM_CompilerCommand at SUNWprivate_1.1'/usr/local/common/jdk1.5.0_03/jre/lib/amd64/libjava.so:
> > > > undefined reference to
> > > > `JVM_RegisterSignal at SUNWprivate_1.1'/usr/local/common/jdk1.5.0_03/jre/lib/amd64/libjava.so:
> > > > undefined reference to
> > > > `JVM_ConstantPoolGetClassAt at SUNWprivate_1.1'/usr/local/common/jdk1.5.0_03/jre/lib/amd64/libjava.so:
> > > > undefined reference to `JVM_Interrupt at SUNWprivate_1.1'
> > > > *insert numerous other error messages*
> > > >
> > > > With AM64 version of Java/MPI/without VTK_USE_PARALLEL:
> > > > Same set of error message as the previous example
> > > >
> > > > I edited my LD_LIBRARY_PATH variable to point to the /lib/amd64/ java
> > > > libraries, but didn't seem to affect anything. Any help in this matter
> > > > would be appreciated.
> > > >
> > > > Jeremy Stout
> > > > _______________________________________________
> > > > This is the private VTK discussion list.
> > > > Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> > > > Follow this link to subscribe/unsubscribe:
> > > > http://www.vtk.org/mailman/listinfo/vtkusers
> > > >
> > >
> > >
> > > --
> > > Kenneth Gage
> > > MD-PhD Student
> > > McGowan Institute for Regenerative Medicine
> > > University of Pittsburgh
> > > Pittsburgh, PA 15203-2155
> > >
> >
> 
> 
> --
> Kenneth Gage
> MD-PhD Student
> McGowan Institute for Regenerative Medicine
> University of Pittsburgh
> Pittsburgh, PA 15203-2155
>



More information about the vtkusers mailing list