|
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
|