NEURON does not compile with Python 3.4

When Python is the interpreter, what is a good
design for the interface to the basic NEURON
concepts.

Moderator: hines

Post Reply
lneisenman
Posts: 20
Joined: Wed Dec 16, 2009 10:26 am

NEURON does not compile with Python 3.4

Post by lneisenman » Mon Apr 21, 2014 10:48 am

When trying to compile NEURON ( either the standard distribution or cloned today from the repository) with python3.4 on Ubuntu 14.04 64 bit I get the following error:
($HOME/neuron/nrn/configure --prefix=`pwd` --with-iv --with-nrnpython=python3 --srcdir=$HOME/neuron/nrn)

Larry

Code: Select all

make[4]: Entering directory `/home/larry/neuron/nrnpy3/src/nrnpython'
/bin/bash ../../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H  -I. -I/home/larry/neuron/nrn/src/nrnpython -I../.. -I../../src/nrnoc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/ivos -I../../src/sundials -I. -I/home/larry/neuron/nrn/src/nrniv -I/home/larry/neuron/nrn/src/ivoc -I/home/larry/neuron/nrn/src/nrnoc -I/home/larry/neuron/nrn/src/oc -I/home/larry/neuron/nrn/src/nrnmpi -I/home/larry/neuron/nrn/src/gnu -I/usr/include/python3.4m -I/home/larry/neuron/iv/include  -DOOP=1 -DCABLE=1 -DUSECVODE=1 -DUSEMATRIX=1 -DUSEBBS=1   -g -O2 -MT nrnpython.lo -MD -MP -MF .deps/nrnpython.Tpo -c -o nrnpython.lo /home/larry/neuron/nrn/src/nrnpython/nrnpython.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I/home/larry/neuron/nrn/src/nrnpython -I../.. -I../../src/nrnoc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/ivos -I../../src/sundials -I. -I/home/larry/neuron/nrn/src/nrniv -I/home/larry/neuron/nrn/src/ivoc -I/home/larry/neuron/nrn/src/nrnoc -I/home/larry/neuron/nrn/src/oc -I/home/larry/neuron/nrn/src/nrnmpi -I/home/larry/neuron/nrn/src/gnu -I/usr/include/python3.4m -I/home/larry/neuron/iv/include -DOOP=1 -DCABLE=1 -DUSECVODE=1 -DUSEMATRIX=1 -DUSEBBS=1 -g -O2 -MT nrnpython.lo -MD -MP -MF .deps/nrnpython.Tpo -c /home/larry/neuron/nrn/src/nrnpython/nrnpython.cpp  -fPIC -DPIC -o .libs/nrnpython.o
/home/larry/neuron/nrn/src/nrnpython/nrnpython.cpp: In function 'void nrnpython_start(int)':
/home/larry/neuron/nrn/src/nrnpython/nrnpython.cpp:171:32: error: invalid conversion from 'char* (*)(FILE*, FILE*, char*) {aka char* (*)(_IO_FILE*, _IO_FILE*, char*)}' to 'char* (*)(FILE*, FILE*, const char*) {aka char* (*)(_IO_FILE*, _IO_FILE*, const char*)}' [-fpermissive]
   PyOS_ReadlineFunctionPointer = nrnpython_getline;
                                ^
make[4]: *** [nrnpython.lo] Error 1
make[4]: Leaving directory `/home/larry/neuron/nrnpy3/src/nrnpython'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/larry/neuron/nrnpy3/src/nrnpython'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/larry/neuron/nrnpy3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/larry/neuron/nrnpy3'
make: *** [all] Error 2

hines
Site Admin
Posts: 1575
Joined: Wed May 18, 2005 3:32 pm

Re: NEURON does not compile with Python 3.4

Post by hines » Mon Apr 21, 2014 5:25 pm

I updated a prototype to satisfy Python 3.4. Try
http://www.neuron.yale.edu/hg/neuron/nr ... e1de58303d

lneisenman
Posts: 20
Joined: Wed Dec 16, 2009 10:26 am

Re: NEURON does not compile with Python 3.4

Post by lneisenman » Tue Apr 22, 2014 11:08 am

That did the trick, thanks.

Larry

Post Reply