Problem compiling neuron in cygwin for Windows

Post Reply
Grado

Problem compiling neuron in cygwin for Windows

Post by Grado »

I am having difficulty compiling neuron in cygwin for Windows 7. I am trying to follow the instructions found here: http://www.neuron.yale.edu/neuron/downl ... pile_mswin

I have installed neuron using the .exe file, and have downloaded and installed cygwin. I have downloaded both iv and nrn using mercurial
hg clone http://www.neuron.yale.edu/hg/neuron/iv/
hg clone http://www.neuron.yale.edu/hg/neuron/nrn/

I have run build.sh, ./configure, make, and make install in iv without problems.
After switching to the nrn directory, build and ./configure worked. However, upon attempting to make, I get the following error:

make all-recursive
make[1]: Entering directory '/home/Grado/neuron/nrn'
Making all in src
make[2]: Entering directory '/home/Grado/neuron/nrn/src'
Making all in readline
make[3]: Entering directory '/home/Grado/neuron/nrn/src/readline'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/Grado/neuron/nrn/src/readline'
Making all in memacs
make[3]: Entering directory '/home/Grado/neuron/nrn/src/memacs'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/Grado/neuron/nrn/src/memacs'
Making all in e_editor
make[3]: Entering directory '/home/Grado/neuron/nrn/src/e_editor'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/Grado/neuron/nrn/src/e_editor'
Making all in modlunit
make[3]: Entering directory '/home/Grado/neuron/nrn/src/modlunit'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/Grado/neuron/nrn/src/modlunit'
Making all in nmodl
make[3]: Entering directory '/home/Grado/neuron/nrn/src/nmodl'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/Grado/neuron/nrn/src/nmodl'
Making all in sparse
make[3]: Entering directory '/home/Grado/neuron/nrn/src/sparse'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/Grado/neuron/nrn/src/sparse'
Making all in sparse13
make[3]: Entering directory '/home/Grado/neuron/nrn/src/sparse13'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/Grado/neuron/nrn/src/sparse13'
Making all in scopmath
make[3]: Entering directory '/home/Grado/neuron/nrn/src/scopmath'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/Grado/neuron/nrn/src/scopmath'
Making all in Random123
make[3]: Entering directory '/home/Grado/neuron/nrn/src/Random123'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/Grado/neuron/nrn/src/Random123'
Making all in nrnmpi
make[3]: Entering directory '/home/Grado/neuron/nrn/src/nrnmpi'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/Grado/neuron/nrn/src/nrnmpi'
Making all in oc
make[3]: Entering directory '/home/Grado/neuron/nrn/src/oc'
make all-am
make[4]: Entering directory '/home/Grado/neuron/nrn/src/oc'
/bin/sh ../../libtool --tag=CC --mode=link gcc -g -O2 -Wl,--enable-auto-import -o oc.exe ocmain.o ocnoiv.o nocable.o modlreg.o ockludge.o libocxt.la liboc.la ../nrnmpi/libnrnmpi.la ../memacs/libmemacs.la ../readline/libreadline.la -lncurses
libtool: link: gcc -g -O2 -Wl,--enable-auto-import -o .libs/oc.exe ocmain.o ocnoiv.o nocable.o modlreg.o ockludge.o ./.libs/libocxt.a ./.libs/liboc.a ../nrnmpi/.libs/libnrnmpi.a ../memacs/.libs/libmemacs.a ../readline/.libs/libreadline.a -lncurses
./.libs/liboc.a(cygwinprt.o): In function `hoc_Plt':
/home/Grado/neuron/nrn/src/oc/mswinprt.c:363: multiple definition of `hoc_Plt'
./.libs/liboc.a(plt.o):/home/Grado/neuron/nrn/src/oc/plt.c:11: first defined here
./.libs/liboc.a(cygwinprt.o): In function `hoc_Setcolor':
/home/Grado/neuron/nrn/src/oc/mswinprt.c:364: multiple definition of `hoc_Setcolor'
./.libs/liboc.a(plt.o):/home/Grado/neuron/nrn/src/oc/plt.c:36: first defined here
./.libs/liboc.a(cygwinprt.o): In function `hoc_Lw':
/home/Grado/neuron/nrn/src/oc/mswinprt.c:365: multiple definition of `hoc_Lw'
./.libs/liboc.a(plt.o):/home/Grado/neuron/nrn/src/oc/plt.c:44: first defined here
collect2: error: ld returned 1 exit status
Makefile:661: recipe for target 'oc.exe' failed
make[4]: *** [oc.exe] Error 1
make[4]: Leaving directory '/home/Grado/neuron/nrn/src/oc'
Makefile:505: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/home/Grado/neuron/nrn/src/oc'
Makefile:487: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/Grado/neuron/nrn/src'
Makefile:624: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/Grado/neuron/nrn'
Makefile:481: recipe for targe

There seems to be a problem with oc.exe. How do I fix this?

Thanks!
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: Problem compiling neuron in cygwin for Windows

Post by hines »

My presumption that the make output you copied is from a fresh buiild makes me completely mystified as to why there are not compile lines for readline, memacs, etc and then only
link lines when you get to oc. The error makes sense. Since nothing was compiled iti cannot find any *.o files for linking. Can you tell me the result of
gcc -v.
Also, you say that the make install for iv worked. Can you prove that by running
~/neuron/iv/x86_64/bin/idemo

This make take a few communication cycles so why don't we move to email. Send to michael dot hines at yale dot edu .
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: Problem compiling neuron in cygwin for Windows

Post by hines »

I pushed a changeset that fixes the problem.
http://www.neuron.yale.edu/hg/neuron/nr ... 6342020e76
Try again with
hg pull -u
make

I was able to reproduce your problem on cygwin by updating from gcc-4.8.2 to gcc-4.9.2
Post Reply