Error compiling in Ubuntu 14.04

Post Reply
patoorio
Posts: 81
Joined: Wed Jan 30, 2008 12:46 pm

Error compiling in Ubuntu 14.04

Post by patoorio »

Hi,

I'm compiling Neuron 7.3 under the new Ubuntu 14.04 and get this error:

Code: Select all

In file included from ./ACG.h:21:0,
                 from ACG.cpp:24:
./RNG.h:48:5: error: '_G_uint32_t' does not name a type
     _G_uint32_t u;
     ^
./RNG.h:53:5: error: '_G_uint32_t' does not name a type
     _G_uint32_t u[2];
     ^
And the errors continue with a long list of " '_G_uint32_t' does not name a type", both in RNG.h and ACG.h
I'm not sure if there is some library missing but I doubt it because it is the first time I see this error. Any ideas?

Thank you!
ted
Site Admin
Posts: 6289
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Error compiling in Ubuntu 14.04

Post by ted »

Have you tried the latest development code from the mercurial repository?
ssalgado
Posts: 6
Joined: Mon Apr 28, 2014 11:48 am

Re: Error compiling in Ubuntu 14.04

Post by ssalgado »

Ok, I deleted everything and installed the latest source through hg clone.
Now it doesn't promt the above mentioned error, and it looks to go through make and make install. However, when attempting to make neuron a python module using

Code: Select all

cd src/nrnpython
python setup.py install
it gives the following error:

Code: Select all

error: package directory '/home/simon/neuron/nrn/share/nrn/lib/python/neuron' does not exist
I checked the directory and indeed it doesn't exist. So I took a look at the make log and I found

Code: Select all

make[3]: Entering directory `/home/simon/neuron/nrn/share/lib/python'
Making install in neuron
make[4]: Entering directory `/home/simon/neuron/nrn/share/lib/python/neuron'
Making install in rxd
make[5]: Entering directory `/home/simon/neuron/nrn/share/lib/python/neuron/rxd'
Making install in geometry3d
make[6]: Entering directory `/home/simon/neuron/nrn/share/lib/python/neuron/rxd/geometry3d'
make[7]: Entering directory `/home/simon/neuron/nrn/share/lib/python/neuron/rxd/geometry3d'
echo ../../../../../../share/lib/python/neuron/rxd/geometry3d/ctng.pyx -o ctng.cpp
../../../../../../share/lib/python/neuron/rxd/geometry3d/ctng.pyx -o ctng.cpp
echo ../../../../../../share/lib/python/neuron/rxd/geometry3d/surfaces.pyx -o surfaces.cpp
../../../../../../share/lib/python/neuron/rxd/geometry3d/surfaces.pyx -o surfaces.cpp
echo ../../../../../../share/lib/python/neuron/rxd/geometry3d/graphicsPrimitives.pyx -o graphicsPrimitives.cpp
../../../../../../share/lib/python/neuron/rxd/geometry3d/graphicsPrimitives.pyx -o graphicsPrimitives.cpp
if test ! -f graphicsPrimitives.cpp ; then \
		cp ../../../../../../share/lib/python/neuron/rxd/geometry3d/graphicsPrimitives.cpp  . ; \
	fi
cp: cannot stat ‘../../../../../../share/lib/python/neuron/rxd/geometry3d/graphicsPrimitives.cpp’: No such file or directory
make[7]: *** [install-exec-am] Error 1
make[7]: Leaving directory `/home/simon/neuron/nrn/share/lib/python/neuron/rxd/geometry3d'
make[6]: *** [install-am] Error 2
make[6]: Leaving directory `/home/simon/neuron/nrn/share/lib/python/neuron/rxd/geometry3d'
make[5]: *** [install-recursive] Error 1
make[5]: Leaving directory `/home/simon/neuron/nrn/share/lib/python/neuron/rxd'
make[4]: *** [install-recursive] Error 1
make[4]: Leaving directory `/home/simon/neuron/nrn/share/lib/python/neuron'
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory `/home/simon/neuron/nrn/share/lib/python'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/simon/neuron/nrn/share/lib'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/simon/neuron/nrn/share'
make: *** [install-recursive] Error 1
This is the content of the mentioned directory

Code: Select all

simon@neurociencia:~/neuron/nrn/share/nrn/lib$ ls
auditscripts  hoc
And this is where I'm stuck now. any help would be greatly appreciated.
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: Error compiling in Ubuntu 14.04

Post by hines »

Start over with a fresh clone and
hg update ansi
That will give you the latest 7.3 version. The 7.4 trunk requires cython to construct graphicsPrimitives.cpp and a few others (a tar.gz distribution has these included). I thought that the configure would give an error message and stop in this case
but I guess it is back to the drawing board for that.
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: Error compiling in Ubuntu 14.04

Post by hines »

I should mention that a manual

Code: Select all

cd src/nrnpython
python setup.py install
Is no longer needed and the setup will be automatically run during the 'make install' process. Be default it ends up in
<prefix>/lib/python
so a PYTHONPATH can be helpful. But note:

Code: Select all

./configure --help
...
  --enable-pysetup=installoption
                          Execute 'python setup.py install installoption' as
                          the last installation step. --disable-pysetup or an
                          installoption of 'no' means do NOT execute 'python
                          setup.py...' The default installoption is
                          '--home=<prefix>'
ssalgado
Posts: 6
Joined: Mon Apr 28, 2014 11:48 am

Re: Error compiling in Ubuntu 14.04

Post by ssalgado »

hines wrote:Start over with a fresh clone and
hg update ansi
That will give you the latest 7.3 version. The 7.4 trunk requires cython to construct graphicsPrimitives.cpp and a few others (a tar.gz distribution has these included). I thought that the configure would give an error message and stop in this case
but I guess it is back to the drawing board for that.
This made the trick. After that, I had to manually adjust the PATH and everything was running smoothly.
Thanks for the support and helpful advices.
jrogala
Posts: 4
Joined: Thu Apr 24, 2014 3:45 am

Re: Error compiling in Ubuntu 14.04

Post by jrogala »

Hi,
I got latest 7.3 version and tried to compile it on my ubuntu 14.04. I got error while configuring nrn:
./configure --prefix=$HOME/neuron/nrn --with-iv=$HOME/neuron/iv --with-nrnpython --with-paranrn

Code: Select all

checking if python include files and libraries work... yes
checking for cython... cython
checking for mpicc... no
checking for hcc... no
checking for mpcc... no
checking for mpcc_r... no
checking for mpxlc... no
checking for cmpicc... no
checking for MPI_Init... no
checking for MPI_Init in -lmpi... no
checking for MPI_Init in -lmpich... no
configure: error: Cannot compile MPI program
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: Error compiling in Ubuntu 14.04

Post by hines »

you must not have mpi installed. I use
mpich-3.1 (stable release) from http://www.mpich.org/downloads/ and build from the sources using configure arguments
'--enable-shared' '--disable-f77' '--disable-fc'
Looks like they have a package there for Trusty Tahr.
Or you can build openmpi.
jrogala
Posts: 4
Joined: Thu Apr 24, 2014 3:45 am

Re: Error compiling in Ubuntu 14.04

Post by jrogala »

I already have MPI installed, this is mpich 2-1.4.1 is that wrong version for 7.3 ? I used it on ubuntu 13.04 and neuron 7.2
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: Error compiling in Ubuntu 14.04

Post by hines »

Is mpicc in your PATH?
jrogala
Posts: 4
Joined: Thu Apr 24, 2014 3:45 am

Re: Error compiling in Ubuntu 14.04

Post by jrogala »

yes in bash: export PATH=/home/jacek/mpich2/bin:$PATH
export PATH=/home/jacek/mpich2/include:$PATH
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: Error compiling in Ubuntu 14.04

Post by hines »

There is a kind of 2+2=5 problem here. What is the result of
which mpicc
(Note that there is no need for /home/jacek/mpich2/include to be in the path.
/home/jacek/mpich2/bin should be sufficient)
If the above does not work, what are the contents of
/home/jacek/mpich2/bin
jrogala
Posts: 4
Joined: Thu Apr 24, 2014 3:45 am

Re: Error compiling in Ubuntu 14.04

Post by jrogala »

I deleted from bash include path and it helped to run configure, but then it stuck with the same error as in the first post, so I run hg clone http://www.neuron.yale.edu/hg/neuron/nrn. But looks like I took wrong repository since I get:
jacek@jacek:~/N/nrn$ sudo ./configure --prefix=$HOME/neuron/nrn --with-iv=$HOME/neuron/iv --with-nrnpython --with-paranrn
sudo: ./configure: command not found
ted
Site Admin
Posts: 6289
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Error compiling in Ubuntu 14.04

Post by ted »

First you must run build.sh (step 2 on this page http://www.neuron.yale.edu/neuron/download/getdevel)
Post Reply