Forums

F.A.Q. F.A.Q.    Register Register    Login Login    Home Home
Search Search
SBML Discussions » sbml-interoperability » library conflicts under java
Show: Today's Posts  :: Message Navigator
| Subscribe to topic 
Return to the default flat view Create a new topic Submit Reply
AuthorTopic
Lucian Smith


Posts: 183
Registered:
July 2008
Re: library conflicts under java 11 Feb '10 10:45 Go to previous messageGo to previous message

* Akiya Jouraku <jouraku@bio.keio.ac.jp> [2010-02-11 08:25] writes:
> Hello Lucian,
>
> Regarding your problem, I have the following questions:
>
> (1) Could you let us know the following information?
>
> 1) version of Ubuntu
> 2) architecture (i386 or x86_64)
> 3) vendor/version of Java (e.g. Sun/1.6.0_07, OpenJDK/1.6.0_0)

Ubuntu 9.04, i386, and Sun 1.6.0_16-b01

> (2) Could you send us a clash log generated by JVM ?

I don't have any clash log, just a segmentation fault, sadly. I tried
strace, but I think it was running stuff in parallel, so the bit where it
crashed is hidden somewhere in that huge output.

> (3) Does the odesolver work fine on your environment?

Yes, they both work fine separately. And my sample code works fine if I
reverse the order of loading the libraries (load libsbml first, then the
odesolver). And for the heck of it, I tried also loading a different
library that was *not* compiled for java just to see what happened, and if
I load odesolver -> random thing -> sbmlj, it crashes when it tries to
load sbmlj, but if I load random thing -> odesolver -> sbmlj, it runs
fine.

(this is true for two completely different shared libraries that were
hanging out in /usr/local/lib--cellml, which I had compiled myself, and
vtkCommon, which was part of some package I downloaded.)

It is so weird!

> (4) Is JSim compiled on the same host?

Yes. It is possible that there could be some flag used for a library here
that is somehow incompatible with a flag used to compile the JSim
libraries. JSim was developed on RedHat, and I had to extensively modify
the Makefile system to get it to compile on Ubuntu without really knowing
what I was doing, but I don't really know where to start.

Since the first email, I've tried my sample program on Windows using the
pre-compiled libraries for both JSim and libSBML, and encountered no
problems. I'm about to go try it on a RedHat system to see if the error
follows me there...

Thanks for following up!

-Lucian

>
>
> Thanks,
>
> Akiya
>
> Lucian Smith <lpsmith@spod-central.org> wrote
> > So, I'm working on a smallish project to use libsbml under java for use
> > with a different project, written in java (JSim). However, the libsbml
> > library and the other project's library seem to be clashing, and I'm not
> > sure where to look to start debugging the problem.
> >
> > (I'm using ubuntu and a version of libsbmlj that I compiled myself from
> > the 4.0.1 source distribution)
> >
> >
> > Here's a small java class that demonstrates the problem:
> >
> >
> > import org.sbml.libsbml.*;
> >
> > public class test {
> > public static void main(String[] args) {
> > System.out.println("Hello world.");
> > System.loadLibrary("odesolver");
> > System.out.println("Loaded odesolver");
> > System.loadLibrary("sbmlj");
> > System.out.println("Loaded sbmlj.");
> > SBMLReader reader = new SBMLReader();
> > System.out.println("Ran something using libsbml");
> > }
> > }
> >
> > Compiling this with javac works fine if I set the classpath to point at
> > the libsbmlj.jar file and the various .jar files that the 'odesolver'
> > uses.
> >
> > Then running it under java, I use the same classpath, and point
> > java.library.path to the directory with libsbml*.so and the directory with
> > the odesolver's .so files.
> >
> > I get the following:
> >
> > Hello world.
> > Loaded odesolver
> > Segmentation fault
> >
> >
> > If I reverse the order in which I load the libraries, suddenly everything
> > works!
> >
> > Hello world.
> > Loaded sbmlj.
> > Loaded odesolver
> > Ran something using libsbml
> >
> > (I did run nm on the various .so files, but didn't find any conflicts in
> > the text symbols, at least.)
> >
> > Anyone have some insight as to what's going wrong? Thanks!
> >
> > -Lucian
> > ____________________________________________________________
> > To manage your sbml-interoperability list subscription, visit
> > https://utils.its.caltech.edu/mailman/listinfo/sbml-interoperability
> >
> > For a web interface to the sbml-interoperability mailing list, visit
> > http://sbml.org/Forums/
> >
> > For questions or feedback about the sbml-interoperability list,
> > contact sbml-team@caltech.edu
> ____________________________________________________________
> To manage your sbml-interoperability list subscription, visit
> https://utils.its.caltech.edu/mailman/listinfo/sbml-interoperability
>
> For a web interface to the sbml-interoperability mailing list, visit
> http://sbml.org/Forums/
>
> For questions or feedback about the sbml-interoperability list,
> contact sbml-team@caltech.edu
____________________________________________________________
To manage your sbml-interoperability list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/sbml-interoperability

For a web interface to the sbml-interoperability mailing list, visit
http://sbml.org/Forums/

For questions or feedback about the sbml-interoperability list,
contact sbml-team@caltech.edu

      

SubjectPosterDate
Read Message   library conflicts under java Lucian Smith10 Feb '10 12:14
Read Message   Re: library conflicts under java ajouraku11 Feb '10 00:13
Read Message   Re: library conflicts under java  Lucian Smith11 Feb '10 10:45
Read Message   Re: library conflicts under java ajouraku11 Feb '10 23:48
Read Message   Re: library conflicts under java Lucian Smith12 Feb '10 11:13
Read Message   Re: library conflicts under java ajouraku14 Feb '10 02:14
Read Message   Re: library conflicts under java Lucian Smith16 Feb '10 11:06
Previous Topic:Re: [sbml-discuss] Problem running SBMLEditor on Mac OS X
Next Topic:unsetCharge
Go to forum:
-=] Back to Top [=-

Powered by FUDforum. (Copyright Advanced Internet Designs Inc.)

Please use our issue tracking system for any questions or suggestions about this website.