|
I thought of another thing you could try. You could test, whether it
is the 64bit java, or java 6 that is giving the binding a hard time.
To do that you could just regenerate the libsbml.jar file with java
1.5.0. When you start it with the -d64 and -server flag you run in a
64bit data model, which of course would require 64bit JNI files.
If all this does still not work, you could try for SoyLatte, which
promises Java 6 / Java 7 (even for 32bit, alas without the cocoa
integration):
http://landonf.bikemonkey.org/static/soylatte/
Frank
On Feb 23, 2009, at 3:41 AM, Neil Swainston wrote:
> Hi Frank et al,
>
> Thanks for looking into this further.
>
> Attempting to isolate this issue by compiling and running the test
> program echoSBML was annoying in so far as that it worked fine...
>
> swainston3:c++ neilswainston$ pwd
> /Developer/Applications/libsbml-3.3.1/examples/c++
>
> swainston3:c++ neilswainston$ make
> g++ -arch x86_64 -Wall -I/usr/include/libxml2 -I../../include -
> L../../
> src -o convertSBML convertSBML.cpp util.c -lsbml -L/usr/lib -lxml2 -lz
> -lpthread -licucore -lm -lstdc++ -lm
> g++ -arch x86_64 -Wall -I/usr/include/libxml2 -I../../include -
> L../../
> src -o echoSBML echoSBML.cpp -lsbml -L/usr/lib -lxml2 -lz -lpthread -
> licucore -lm -lstdc++ -lm
> g++ -arch x86_64 -Wall -I/usr/include/libxml2 -I../../include -
> L../../
> src -o printSBML printSBML.cpp util.c -lsbml -L/usr/lib -lxml2 -lz -
> lpthread -licucore -lm -lstdc++ -lm
> g++ -arch x86_64 -Wall -I/usr/include/libxml2 -I../../include -
> L../../
> src -o readSBML readSBML.cpp util.c -lsbml -L/usr/lib -lxml2 -lz -
> lpthread -licucore -lm -lstdc++ -lm
> g++ -arch x86_64 -Wall -I/usr/include/libxml2 -I../../include -
> L../../
> src -o translateMath translateMath.cpp -lsbml -L/usr/lib -lxml2 -lz -
> lpthread -licucore -lm -lstdc++ -lm
> g++ -arch x86_64 -Wall -I/usr/include/libxml2 -I../../include -
> L../../
> src -o validateSBML validateSBML.cpp util.c -lsbml -L/usr/lib -lxml2 -
> lz -lpthread -licucore -lm -lstdc++ -lm
> g++ -arch x86_64 -Wall -I/usr/include/libxml2 -I../../include -
> L../../
> src -o printMath printMath.cpp util.c -lsbml -L/usr/lib -lxml2 -lz -
> lpthread -licucore -lm -lstdc++ -lm
> g++ -arch x86_64 -Wall -I/usr/include/libxml2 -I../../include -
> L../../
> src -o printUnits printUnits.cpp util.c -lsbml -L/usr/lib -lxml2 -lz -
> lpthread -licucore -lm -lstdc++ -lm
> g++ -arch x86_64 -Wall -I/usr/include/libxml2 -I../../include -
> L../../
> src -o createExampleSBML createExampleSBML.cpp -lsbml -L/usr/lib -
> lxml2 -lz -lpthread -licucore -lm -lstdc++ -lm
>
> swainston3:c++ neilswainston$ ./echoSBML /Users/neilswainston/Desktop/
> in.xml /Users/neilswainston/Desktop/out.xml
>
> swainston3:c++ neilswainston$
>
> out.xml was generated fine with no issues, crashes or anything
> nasty...
>
> As I'm sure you know, echoSBML contains the same call to readSBML that
> caused the crash that you identified in your previous mail. (???!!)
>
> Sure that this doesn't clarify anything, but again, help or advice
> would be appreciated.
>
> Cheers,
>
> Neil.
>
> On 20 Feb 2009, at 19:31, Frank Bergmann wrote:
>
>> Hello Neil,
>>
>> bad news, I also get your crash with your binaries:
>>
>> Invalid memory access of location 00000000 rip=83da8ae1
>>
>> Segmentation fault
>>
>> the debugger claims it to be a bad access here:
>>
>> 1 libsbml.dylib 0x000000011306320b
>> LibXMLParser::~LibXMLParser() + 107
>> 2 libsbml.dylib 0x000000011306c074
>> XMLInputStream::~XMLInputStream() + 134
>> 3 libsbml.dylib 0x000000011306c121
>> XMLInputStream::~XMLInputStream() + 21
>> 4 libsbml.dylib 0x0000000113031d3e
>> SBMLReader::readInternal(char const*, bool) + 842
>> 5 libsbml.dylib 0x00000001130327d6
>> SBMLReader::readSBML(std::basic_string<char, std::char_traits<char>,
>> std::allocator<char> > const&) + 42
>> 6 libsbmlj.jnilib 0x0000000112f63370
>> Java_org_sbml_libsbml_libsbmlJNI_SBMLReader_1readSBML + 212
>>
>> which of course makes no sense whatsoever as the free in
>> ~LibXMLParser() is guarded. So at this point the question to ask is,
>> whether the 64bit binaries of libsbml work as expected. So you might
>> want to try to build the echoSBML c/c++ example (for 64bit) and try
>> that. this would isolate the problem.
>>
>> Maybe this is the point to ask Akiya to step in. As he might be more
>> familiar with the issue.
>>
>> best
>> Frank
>>
>> On Feb 20, 2009, at 9:09 AM, Neil Swainston wrote:
>>
>>> Hi Frank,
>>>
>>> Thanks for the suggestions. I'll look into those.
>>>
>>> In the mean time, however, I've zipped up the libraries and left
>>> them
>>> here..,
>>>
>>> ftp://ftp.dbkgroup.org/pub/libsbml.zip
>>>
>>> If you or anyone else has five minutes to look over them, then that
>>> would be great.
>>>
>>> Best wishes,
>>>
>>> Neil.
>>>
>>> On 19 Feb 2009, at 17:12, Frank Bergmann wrote:
>>>
>>>> hello neil,
>>>>
>>>> thank you for the detailed answer. unfortunately we don't really
>>>> know
>>>> what went wrong at all, was there any output in console.app, that
>>>> related to it? Have you tried running with the -d64 bit flag, to
>>>> ensure you are in 64bit data mode (and yes i know that java6 is
>>>> only
>>>> for 64bit, but it doesn't hurt trying). What you might want to do,
>>>> is
>>>> to ensure that the library contains debug symbols and then try and
>>>> attach gdb to at least glean where things go wrong.
>>>>
>>>> or you could zip up all your libraries (ad jar files) and put them
>>>> somewhere for us to check.
>>>>
>>>> best
>>>> Frank
>>>>
>>>>
>>>> On Feb 19, 2009, at 1:42 AM, Neil Swainston wrote:
>>>>
>>>>> Hi Frank,
>>>>>
>>>>> Thanks for your response.
>>>>>
>>>>> I'll try to fill in some gaps...
>>>>>
>>>>> My build procedure was as follows:
>>>>>
>>>>> Ensure that java -version and javac -version displayed version
>>>>> 1.6.
>>>>>
>>>>> export CXXFLAGS="-arch x86_64"
>>>>> export CFLAGS="-arch x86_64"
>>>>> export LDFLAGS="-arch x86_64"
>>>>> ./configure --with-java
>>>>> make
>>>>> make install
>>>>>
>>>>> All ran without errors. If its of any interest, the output after
>>>>> running ./configure was as follows:
>>>>>
>>>>> ----------------------------------------------------------------------
>>>>> libSBML version 3.3.1
>>>>> ----------------------------------------------------------------------
>>>>>
>>>>> More information and the latest version are available online at
>>>>> http://sbml.org/Software/libSBML
>>>>>
>>>>> Please report problems using the issue tracker at
>>>>> http://sbml.org/software/libsbml/issue-tracker
>>>>>
>>>>> To contact the developers directly, email libsbml-team@caltech.edu
>>>>>
>>>>> Configured on host "swainston3.mib.man.ac.uk"
>>>>> host type = darwin
>>>>> host vendor = apple
>>>>> host operating system = darwin9.6.0
>>>>> host CPU architecture = i386
>>>>>
>>>>> General build flags:
>>>>> CC = gcc
>>>>> CXX = g++
>>>>> CFLAGS = -arch x86_64
>>>>> CXXFLAGS = -arch x86_64
>>>>> CPPFLAGS = -DMACOSX
>>>>> LDFLAGS = -arch x86_64
>>>>> LIBS = -lm -lz -lbz2
>>>>>
>>>>> XML parser library configuration:
>>>>> XML library = libxml2
>>>>> CPPFLAGS for XML = -I/usr/include/libxml2
>>>>> LDFLAGS for XML =
>>>>> LIBS for XML = -L/usr/lib -lxml2 -lz -lpthread -
>>>>> licucore -lm
>>>>>
>>>>> Other libSBML configuration settings:
>>>>> Installation $prefix = /usr/local
>>>>> Using Java with path = /usr/bin/java
>>>>> Using zlib with path = autodetect
>>>>> Using bzip2 with path = autodetect
>>>>>
>>>>> Other potentially important settings:
>>>>> Compression support enabled for .zip, .gz and .bz2 files
>>>>> Value of $DYLD_LIBRARY_PATH =
>>>>> Value of $CLASSPATH for Java =
>>>>> ----------------------------------------------------------------------
>>>>>
>>>>> This generated the required files in /usr/local/lib.
>>>>>
>>>>> Attempting to compile and run one of the small test programs with
>>>>> these files returned the following error:
>>>>>
>>>>> swainston3:java neilswainston$ pwd
>>>>> /Developer/Applications/libsbml-3.3.1/examples/java
>>>>> swainston3:java neilswainston$ javac -cp /usr/local/lib/
>>>>> libsbmlj.jar
>>>>> readSBML.java
>>>>> swainston3:java neilswainston$ java -cp .:/usr/local/lib/
>>>>> libsbmlj.jar -
>>>>> Djava.library.path=/usr/local/lib/ readSBML /Users/neilswainston/
>>>>> Desktop/sbml.xml
>>>>> Invalid memory access of location 00000000 rip=82fa4ae1
>>>>>
>>>>> Segmentation fault
>>>>>
>>>>> Looking at the libraries more closely...
>>>>>
>>>>> file returns the following:
>>>>>
>>>>> swainston3:~ neilswainston$ file /usr/local/lib/libsbml.dylib
>>>>> /usr/local/lib/libsbml.dylib: Mach-O 64-bit dynamically linked
>>>>> shared
>>>>> library x86_64
>>>>>
>>>>> swainston3:~ neilswainston$ file /usr/local/lib/libsbmlj.jnilib
>>>>> /usr/local/lib/libsbmlj.jnilib: Mach-O 64-bit bundle x86_64
>>>>>
>>>>> otool returns the following:
>>>>>
>>>>> swainston3:~ neilswainston$ otool -L /usr/local/lib/
>>>>> libsbmlj.jnilib
>>>>> /usr/local/lib/libsbmlj.jnilib:
>>>>> ../libsbml.dylib (compatibility version 0.0.0, current version
>>>>> 3.3.1)
>>>>> /usr/lib/libxml2.2.dylib (compatibility version 9.0.0, current
>>>>> version 9.16.0)
>>>>> /usr/lib/libz.1.dylib (compatibility version 1.0.0, current
>>>>> version
>>>>> 1.2.3)
>>>>> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
>>>>> version 111.1.3)
>>>>> /usr/lib/libicucore.A.dylib (compatibility version 1.0.0, current
>>>>> version 36.0.0)
>>>>> /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current
>>>>> version 1.0.4)
>>>>> /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current
>>>>> version 7.4.0)
>>>>> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
>>>>> version 1.0.0)
>>>>>
>>>>> swainston3:~ neilswainston$ otool -L /usr/local/lib/
>>>>> libsbmlj.jnilib
>>>>> /usr/local/lib/libsbmlj.jnilib:
>>>>> ../libsbml.dylib (compatibility version 0.0.0, current version
>>>>> 3.3.1)
>>>>> /usr/lib/libxml2.2.dylib (compatibility version 9.0.0, current
>>>>> version 9.16.0)
>>>>> /usr/lib/libz.1.dylib (compatibility version 1.0.0, current
>>>>> version
>>>>> 1.2.3)
>>>>> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
>>>>> version 111.1.3)
>>>>> /usr/lib/libicucore.A.dylib (compatibility version 1.0.0, current
>>>>> version 36.0.0)
>>>>> /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current
>>>>> version 1.0.4)
>>>>> /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current
>>>>> version 7.4.0)
>>>>> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
>>>>> version 1.0.0)
>>>>>
>>>>>
>>>>> So, I'm a little stuck... Sadly I cannot really continue with
>>>>> Java 5
>>>>> as I'm needing all manner of webservice goodies that come shipped
>>>>> with
>>>>> Java 6.
>>>>>
>>>>> Any help, as ever, would be appreciated.
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Neil.
>>>>>
>>>>>
>>>>> On 18 Feb 2009, at 17:48, Frank Bergmann wrote:
>>>>>
>>>>>> Hello Neil,
>>>>>>
>>>>>> IMHO its still to early for Java6 on OSX, there are still too
>>>>>> many
>>>>>> 32bit machines around. Still to your problem at hand, could you
>>>>>> please
>>>>>> verify that the libsbml binaries you have list the following
>>>>>> architectures:
>>>>>>
>>>>>> if you run: file <libsbmlj.jnilib/dylib/libsbml.dylib>
>>>>>>
>>>>>> you want to have listed there: i386, ppc AND x86_64 (maybe even
>>>>>> ppc64,
>>>>>> as there was that one developer preview of Java6 for ppc64), and
>>>>>> that
>>>>>> is for all dependency librarys, (Just for good measure, otool -L
>>>>>> shows
>>>>>> all dependency libraries).
>>>>>>
>>>>>> Oh and then of course you want to make sure that the correct
>>>>>> library
>>>>>> is being picked up, by making sure that the java.library.path is
>>>>>> set
>>>>>> up correctly ...
>>>>>>
>>>>>> thats all we can say without more information
>>>>>>
>>>>>> cheers
>>>>>> Frank
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Feb 18, 2009, at 2:19 AM, Neil Swainston wrote:
>>>>>>
>>>>>>> Hi all,
>>>>>>>
>>>>>>> Sorry to go over old ground here, but I still didn't manage to
>>>>>>> get
>>>>>>> libsbml working with 64-bit Java v6 on a Mac. (There's an old
>>>>>>> thread
>>>>>>> also named 'Using libsbml from Java on MacOSX' on the forum).
>>>>>>>
>>>>>>> I'm sure that someone out there in cyberland is happily using
>>>>>>> Macs,
>>>>>>> libsbml and 64-bit Java 6 in perfect tandem? If so, I envy you
>>>>>>> greatly
>>>>>>> and seek your advice.
>>>>>>>
>>>>>>> I'm assuming that by default, libsbml is built as 32-bit, so
>>>>>>> when
>>>>>>> 64-
>>>>>>> bit Java attempts to call the libraries via JNI, problems arise.
>>>>>>>
>>>>>>> I've attempted to build libsbml with -x64 flags (as suggested by
>>>>>>> Frank
>>>>>>> - many thanks) but this doesn't seem to work.
>>>>>>>
>>>>>>> Any advice would be hugely appreciated.
>>>>>>>
>>>>>>> Cheers.
>>>>>>>
>>>>>>> Neil.
>>>>>>>
>>>>>>> Neil Swainston
>>>>>>> Experimental Officer
>>>>>>>
>>>>>>> Manchester Centre for Integrative Systems Biology
>>>>>>> Manchester Interdisciplinary Biocentre
>>>>>>> University of Manchester
>>>>>>> Manchester M1 7DN
>>>>>>> England
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ____________________________________________________________
>>>>>>> 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
>>>>>
>>>>>
>>>>> Neil Swainston
>>>>> Experimental Officer
>>>>>
>>>>> Manchester Centre for Integrative Systems Biology
>>>>> Manchester Interdisciplinary Biocentre
>>>>> University of Manchester
>>>>> Manchester M1 7DN
>>>>> England
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ____________________________________________________________
>>>>> 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
>>>
>>>
>>> Neil Swainston
>>> Experimental Officer
>>>
>>> Manchester Centre for Integrative Systems Biology
>>> Manchester Interdisciplinary Biocentre
>>> University of Manchester
>>> Manchester M1 7DN
>>> England
>>>
>>>
>>>
>>>
>>>
>>> ____________________________________________________________
>>> 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
>
>
> Neil Swainston
> Experimental Officer
>
> Manchester Centre for Integrative Systems Biology
> Manchester Interdisciplinary Biocentre
> University of Manchester
> Manchester M1 7DN
> England
>
>
>
>
>
> ____________________________________________________________
> 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
|