compile on opensuse 12.3 with gcc 4.7.2 and glibc 2.17

Post Reply
mergen

compile on opensuse 12.3 with gcc 4.7.2 and glibc 2.17

Post by mergen »

It took me some time to get neuron to run on opensuse 12.3 with gcc 4.7.2 with glibc 2.17-4.4.1

I had to do the following steps in addition to the given instructions.

1) after iv ./cofigure, make and make install generated the following file structure:
./iv/share , ./iv/incluce , ./iv/x86_64/bin , ./iv/x86_64/lib64
I had to the content of ./iv/x86_64/lib64 to ./iv/lib

2) in nrn I had to fix the /src/gnu/RNG.h by commenting out the if-Condition in line 26. Now the else case is always used. Reason: Datatype _G_uint32_t was removed from _G_config.h.

3) after running make I had to copy ./nrn/x86_64/lib64 to ./nrn/lib

4) make install was unable to generate the necessary sub-folders. Step by step I generated each sub-folder by hand.

5) to run the neurondemo i had to copy the file libtool to ./nrn

Finally the question is there a nicer way to get it to run?
ted
Site Admin
Posts: 6289
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: compile on opensuse 12.3 with gcc 4.7.2 and glibc 2.17

Post by ted »

Which version were you installing? The latest official release (7.3)?
zcf

version of: opensuse 13.4, gcc 4.8.3, glibc 2.19

Post by zcf »

I had the same trouble as post above by mergen. In addition, I cannot run make install if I use the --with-nrnpython flag.

Below is the error I got.

g++ -pthread -shared build/temp.linux-x86_64-2.7/inithoc.o -L/home/chenfei/neuron/nrn-7.3/x86_64/lib -L/home/chenfei/neuron/iv/lib -L/usr/lib64 -lnrnpython -lnrnoc -loc -lnrniv -livoc -lmemacs -lmeschach -lneuron_gnu -lnrnmpi -lscopmath -lsparse13 -lsundials -lIVhines -lreadline -lpython2.7 -o build/lib.linux-x86_64-2.7/neuron/hoc.so -Wl,-R/home/chenfei/neuron/nrn-7.3/x86_64/lib -Wl,-R/home/chenfei/neuron/iv/lib
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lnrnpython
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lnrnoc
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -loc
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lnrniv
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -livoc
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lmemacs
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lmeschach
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lneuron_gnu
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lnrnmpi
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lscopmath
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lsparse13
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lsundials
collect2: error: ld returned 1 exit status
error: command 'g++' failed with exit status 1
Makefile:1067: recipe for target 'install-exec-hook' failed
make[3]: *** [install-exec-hook] Error 1
make[3]: Leaving directory '/home/chenfei/neuron/nrn-7.3'
Makefile:978: recipe for target 'install-exec-am' failed
make[2]: *** [install-exec-am] Error 2
make[2]: Leaving directory '/home/chenfei/neuron/nrn-7.3'
Makefile:924: recipe for target 'install-am' failed
make[1]: *** [install-am] Error 2
make[1]: Leaving directory '/home/chenfei/neuron/nrn-7.3'
Makefile:624: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
ted
Site Admin
Posts: 6289
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: compile on opensuse 12.3 with gcc 4.7.2 and glibc 2.17

Post by ted »

Which source code did you use--the tar.gz file from the v. 7.3 distribution, one of the alpha version tar.gz files (if so, which one?), or did you start by cloning NEURON's mercurial repository?
zcf

Re: compile on opensuse 12.3 with gcc 4.7.2 and glibc 2.17

Post by zcf »

Exactly the tar file of version 7.3 was used.

However, now I used the following source code: http://www.neuron.yale.edu/ftp/neuron/v ... 245.tar.gz

With this code I did not encounter the trouble posted earlier.

If there are any further questions I will be happy to provide you with the information.

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

Re: compile on opensuse 12.3 with gcc 4.7.2 and glibc 2.17

Post by ted »

There have been many improvements and bug fixes since 7.3's standard distribution tar.gz was created. I'm glad that the alpha version worked.
zcf

Re: compile on opensuse 12.3 with gcc 4.7.2 and glibc 2.17

Post by zcf »

Hello,

I have one more question with openSUSE mentioned above, today I tried nrn7.3 and iv18, it worked with python2, but with python3, it has the following error:

./configure --prefix=`pwd` --with-iv=$HOME/neuron/iv --with-nrnpython=/usr/bin/python3

Makefile:562: recipe for target 'nrnpython.lo' failed
make[4]: *** [nrnpython.lo] Error 1
make[4]: Leaving directory '/home/chenfei/neuron/nrn/src/nrnpython'
Makefile:449: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/home/chenfei/neuron/nrn/src/nrnpython'
Makefile:487: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/chenfei/neuron/nrn/src'
Makefile:624: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/chenfei/neuron/nrn'
Makefile:481: recipe for target 'all' failed
make: *** [all] Error 2
ted
Site Admin
Posts: 6289
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: compile on opensuse 12.3 with gcc 4.7.2 and glibc 2.17

Post by ted »

7.3? Weren't you using an alpha of version 7.4? In any case I see that the particular alpha tar.gz that you picked up last month is no longer available. I'd suggest trying the latest development code from the mercurial repository, as described at http://www.neuron.yale.edu/neuron/download/getdevel
zcf

Re: compile on opensuse 12.3 with gcc 4.7.2 and glibc 2.17

Post by zcf »

Wow, did I mess this up--clicked on the "edit" button instead of the "quote" button, and then overwrote most of what was in your reply, then discovered what I had done . . . but too late to undo the damage.

Fortunately I didn't delete what you were concerned about--
I saw warning about Numpy poped out during make of nrn.
A "warning" does not necessarily mean that an error has happened. Exactly what was the message?

--Ted "I promise never to do that again" Carnevale
zcf

Re: compile on opensuse 12.3 with gcc 4.7.2 and glibc 2.17

Post by zcf »

Below is the warning I got. You can have a look if it matters.

Actually what I concern more is the python3 question in nrn7.3. Although I can work with python2, but I prefer python3. I don't know why compiling with python3 doesn't work with nrn 7.3. I also tried with nrn 7.4 and python3, it also doesn't work. Because I can't find the package as you mentioned, I may not be able to show you the error.
Could you give me some suggestion on python3 and nrn7.3 first? Thank you in advance.


#warning "Using deprecated NumPy API, disable it by " \
^
In file included from /usr/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:26:0,
from /usr/lib64/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from ../../share/lib/python/neuron/rxd/geometry3d/surfaces.cpp:352:
/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/__multiarray_api.h:1629:1: warning: ‘int _import_array()’ defined but not used [-Wunused-function]
_import_array(void)
^
In file included from /usr/lib64/python2.7/site-packages/numpy/core/include/numpy/ufuncobject.h:317:0,
from ../../share/lib/python/neuron/rxd/geometry3d/surfaces.cpp:353:
/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/__ufunc_api.h:241:1: warning: ‘int _import_umath()’ defined but not used [-Wunused-function]
_import_umath(void)
^
gcc -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I../.././share/lib/python/neuron/rxd/geometry3d -I. -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c ../.././share/lib/python/neuron/rxd/geometry3d/marching_cubes2.c -o build/temp.linux-x86_64-2.7/../.././share/lib/python/neuron/rxd/geometry3d/marching_cubes2.o
../.././share/lib/python/neuron/rxd/geometry3d/marching_cubes2.c: In function ‘find_triangles’:
../.././share/lib/python/neuron/rxd/geometry3d/marching_cubes2.c:388:15: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
int* tt = triTable[cubeIndex];
^
gcc -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I../.././share/lib/python/neuron/rxd/geometry3d -I. -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c ../.././share/lib/python/neuron/rxd/geometry3d/llgramarea.c -o build/temp.linux-x86_64-2.7/../.././share/lib/python/neuron/rxd/geometry3d/llgramarea.o
g++ -pthread -shared build/temp.linux-x86_64-2.7/../../share/lib/python/neuron/rxd/geometry3d/surfaces.o build/temp.linux-x86_64-2.7/../.././share/lib/python/neuron/rxd/geometry3d/marching_cubes2.o build/temp.linux-x86_64-2.7/../.././share/lib/python/neuron/rxd/geometry3d/llgramarea.o -L/usr/lib64 -lpython2.7 -o build/lib.linux-x86_64-2.7/neuron/rxd/geometry3d/surfaces.so
running install_lib
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: compile on opensuse 12.3 with gcc 4.7.2 and glibc 2.17

Post by hines »

On my ubuntu 14.4 system with gccc 4.8.2 I was able to get the 7.3 standard distribution
http://www.neuron.yale.edu/ftp/neuron/v ... 7.3.tar.gz
to work with
$ python3
Python 3.4.0 (default, Apr 11 2014, 13:05:11)
and the configure line (feel free to leave out the --with-paranrn)
./configure --prefix=`pwd` --with-paranrn --with-nrnpython=python3.4
make -j 6 install
Note that my InterViews is in ../iv and i built in-place.
However I did have to manually fix up nrn-7.3/src/nrnpython/nrnpython.cpp
by changing char to const char
in three places according to
http://www.neuron.yale.edu/hg/neuron/nr ... e1de58303d
So you may wish to use the latest hg repository sources instead.
zcf

Re: compile on opensuse 12.3 with gcc 4.7.2 and glibc 2.17

Post by zcf »

Hello, I tried you suggestion on my opensuse, I changed two files mentioned in that link, now it works. Thanks.
Post Reply