Problems Compiling 6.1 with Java on XP

Post Reply
athan
Posts: 3
Joined: Mon Feb 12, 2007 11:37 am
Contact:

Problems Compiling 6.1 with Java on XP

Post by athan »

I am having much difficulty trying to compile NEURON version 6.1 with Java. It's been quite some since I worked with make files and the like so I would greatly appreciate any help people can offer.

To make sure I was using the latest version of NEURON I downloaded it and installed it so that my computer is now working with 6.1 instead of 5.9. I then downloaded iv-17.tar.gz and nrn-6.1-tar.gz and began to follow the instructions here: http://www.neuron.yale.edu/neuron/insta ... mswin.html
with the phrase "--wtih-nrnjava" in the NEURON configure step.

The make step for NEURON produces several warnings but I think the biggest error is the following:
------------------------------------
make[5]: Leaving directory `/home/athan/neuron/nrn/src/nrnjava/nrnccmb'
make[5]: Entering directory `/home/athan/neuron/nrn/src/nrnjava'
if /bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../.. -I../../src/oc -I../../src/oc -I../../src/parallel -I. -I../../src/nrncvode -I../../src/ivos -I../../src/sundials -I../../src/nrnpython -I../../src/nrniv -I../../src/CVODE -I../../src/nrncvode -I../../src/sparse13 -I../../src/gnu -I. -I../../src/ivoc -I../../src/nrnoc -I../oc -I../../src/oc -I/home/athan/neuron/iv/include -DOOP=1 -DCABLE=1 -DUSECVODE=1 -DUSEMATRIX=1 -DUSEBBS=1 -I/cygdrive/c/Program -IFiles/Java/jdk1.5.0/include -I/cygdrive/c/Program -IFiles/Java/jdk1.5.0/include/win32 -g -O2 -MT njvm.lo -MD -MP -MF ".deps/njvm.Tpo" -c -o njvm.lo njvm.cpp; \
then mv -f ".deps/njvm.Tpo" ".deps/njvm.Plo"; else rm -f ".deps/njvm.Tpo"; exit 1; fi
mkdir .libs
g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../.. -I../../src/oc -I../../src/oc -I../../src/parallel -I. -I../../src/nrncvode -I../../src/ivos -I../../src/sundials -I../../src/nrnpython -I../../src/nrniv -I../../src/CVODE -I../../src/nrncvode -I../../src/sparse13 -I../../src/gnu -I. -I../../src/ivoc -I../../src/nrnoc -I../oc -I../../src/oc -I/home/athan/neuron/iv/include -DOOP=1 -DCABLE=1 -DUSECVODE=1 -DUSEMATRIX=1 -DUSEBBS=1 -I/cygdrive/c/Program -IFiles/Java/jdk1.5.0/include -I/cygdrive/c/Program -IFiles/Java/jdk1.5.0/include/win32 -g -O2 -MT njvm.lo -MD -MP -MF .deps/njvm.Tpo -c njvm.cpp -DPIC -o .libs/njvm.o
njvm.cpp: In function `void initialize_jvm2()':
njvm.cpp:314: error: `JNI_ENOMEM' undeclared (first use this function)
njvm.cpp:314: error: (Each undeclared identifier is reported only once for each function it appears in.)
njvm.cpp:317: error: `JNI_EINVAL' undeclared (first use this function)
make[5]: *** [njvm.lo] Error 1
make[5]: Leaving directory `/home/athan/neuron/nrn/src/nrnjava'
------------------------------------
If somebody feels like wading through the entire messages, I can send the 900+ lines of stderr and stdout from the make task as well as the config log.

Now I don't know if it's because the make failed or that the instructions are old, but the files that I'm asked to replace do not exist in the next step for compiling NEURON. In the directory C:\nrn6.1\bin, there are no files called cygIVhines-3.dll and cygnrniv.dll. From reading another post, it looks like cygnrniv.dll should be hocmodule.dll which does exist in the directory. However, the other dll's in the bin directory are cygiconv-2, cygintl-3, cygintl-8, cygncurses-8, cygreadline6, cygwin1, libpython2.5, libW11. I can't figure out if one of these is supposed to correspond to cygIVhines-3. Also at this point, the only thing in the iv/i686/bin directory is the file idemo.exe. Could this be due to the fact that the NEURON make didn't work?

Any help is much appreciated. Thanks!
hines
Site Admin
Posts: 1691
Joined: Wed May 18, 2005 3:32 pm

Post by hines »

The instructions are up to date but the important change that caused them to be written (switch from static linking of nrniv.exe to using dlls in order to be able to abandon the old private dynamic loader I used for loading nrnmech.dll in favor of the standard mswin methods) postdated my last build of nrniv using the --with-nrnjava configuration option (I no longer do a default build with Java and instead default build using --with-nrnpython).
I am currently swamped with work completing the thread project and some promised NEURON + Python improvements so may not be able to try a build this week. However, the first step on your machine is to successfully complete a build in the absence of the --with-nrnjava configure option and make sure things work in that case (if you have not
already done so). It is conceivable that your problem with java will go away if you
resolve the default build issues on your machine. And that is a prerequisite for
incorporating any changes I come up with that are needed to successfully use the
--with-nrnjava option.
I'll mention it here when I get it to build on my mswin xp laptop.
Post Reply