Problems with 'make' when trying to install NEURON with MPI+Python (Ubuntu 16.04)

acnavasolive
Posts: 17
Joined: Mon Feb 19, 2018 11:02 am
Contact:

Re: Problems with 'make' when trying to install NEURON with MPI+Python (Ubuntu 16.04)

Post by acnavasolive » Tue Sep 18, 2018 10:00 am

Same errors happen if I repeat with:

Code: Select all

$ make distclean
$ ./configure --prefix=`pwd` --with-paranrn --with-iv=$HOME/neuron/iv --with-nrnpython=/home/andrea/anaconda3/envs/py27/bin/python --disable-rx3d >& /home/andrea/Escritorio/configure.txt
$ make -j install >& /home/andrea/Escritorio/make.txt

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

Re: Problems with 'make' when trying to install NEURON with MPI+Python (Ubuntu 16.04)

Post by hines » Tue Sep 18, 2018 10:12 am

Shall I try installing NEURON again?
I don't see much chance of success unless something substantive changes on your system. This is not a problem I have ever encountered.
https://debian-administration.org/artic ... x_problems
What I would do next. is
base="build-essential libreadline-dev libx11-dev libxext-devlibncurses-dev zlib1g-dev"
sudo apt-get --reinstall install $base
And then build nrn from a clean set of sources.

acnavasolive
Posts: 17
Joined: Mon Feb 19, 2018 11:02 am
Contact:

Re: Problems with 'make' when trying to install NEURON with MPI+Python (Ubuntu 16.04)

Post by acnavasolive » Wed Sep 19, 2018 7:31 am

I installed them but still same errors.


I have now been focusing on those undefined references previous to the compilation error, such:

Code: Select all

./.libs/libnrniv.so: undefined reference to `vtable for std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21'
and, as you said before,
That makes me wonder if you have an incomplete g++ development environment or one that has inconsistent
libraries
it seems related to differences between my g++ and gcc versions and yours (https://stackoverflow.com/questions/333 ... -stdstring)

This was also suggested in another NEURON post: viewtopic.php?t=3880

But after trying with:

Code: Select all

$ make distclean
$ ./configure CXXFLAGS='-D_GLIBCXX_USE_CXX11_ABI=0' --prefix=`pwd` --with-iv=$HOME/neuron/iv --with-nrnpython=/home/andrea/anaconda3/envs/py27/bin/python --with-paranrn --disable-rx3d > configure.txt
$ make -j install
also:

Code: Select all

$ make distclean
$ ./configure CFLAGS='-D_GLIBCXX_USE_CXX11_ABI=0' --prefix=`pwd` --with-iv=$HOME/neuron/iv --with-nrnpython=/home/andrea/anaconda3/envs/py27/bin/python --with-paranrn --disable-rx3d > configure.txt
$ make -j install
and both of them:

Code: Select all

$ make distclean
$ ./configure CXXFLAGS='-D_GLIBCXX_USE_CXX11_ABI=0' CFLAGS='-D_GLIBCXX_USE_CXX11_ABI=0' --prefix=`pwd` --with-iv=$HOME/neuron/iv --with-nrnpython=/home/andrea/anaconda3/envs/py27/bin/python --with-paranrn --disable-rx3d > configure.txt
$ make -j install
I still have the same errors as before:

Code: Select all

collect2: error: ld returned 1 exit status
Makefile:746: fallo en las instrucciones para el objetivo 'nrniv'
make[2]: *** [nrniv] Error 1
make[2]: se sale del directorio '/home/andrea/neuron/nrn/src/nrniv'
Makefile:518: fallo en las instrucciones para el objetivo 'install-recursive'
make[1]: *** [install-recursive] Error 1
make[1]: se sale del directorio '/home/andrea/neuron/nrn/src'
Makefile:655: fallo en las instrucciones para el objetivo 'install-recursive'
make: *** [install-recursive] Error 1
I was wondering if maybe I can install another set of libraries (same version as yours) and make NEURON use those ones.
I currently have:
  • g++ 4:5.3.1-1ubuntu1
  • g++-5 5.4.0-6ubuntu1~16.04.10
  • gcc 4:5.3.1-1ubuntu1
  • gcc-5 5.4.0-6ubuntu1~16.04.10



From this post:
# Install build tools needed to compile and link NEURON
# ubuntu example

base="build-essential libreadline-dev libx11-dev libxext-dev
libncurses-dev zlib1g-dev"
bld="git automake libtool flex bison"
mpi="libopenmpi-dev" # if desire parallel
py="python3-dev python3-scipy cython3" # and/or python-dev etc.

sudo apt install $base $bld $mpi $py
I am also wondering whether the problem can come from using python 2.7, instead of 3. I suppose it has not much to do with this problem, but just to make sure it's not it.

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

Re: Problems with 'make' when trying to install NEURON with MPI+Python (Ubuntu 16.04)

Post by hines » Wed Sep 19, 2018 8:06 am

I'm traveling and have a Mac powerbook with a virtual box guest ubuntu 16.4 with gcc 5.4.0.
Are you using a tar.gz or the GitHub repository files? I would try the latter
git clone http://github.com/neuronsimulator/nrn
cd nrn
sh build.sh
./configure ... etc.

It may be worth while to focus on a stripped down build and restore the optional packages one at a time to see if the problem is associated with
one of them. Each time do a make distclean

./configure --prefix=`pwd` --without-iv
./configure --prefix=`pwd`
./configure --prefix=`pwd`--with-nrnpython --disable-rx3d. -disable-pysetup

acnavasolive
Posts: 17
Joined: Mon Feb 19, 2018 11:02 am
Contact:

Re: Problems with 'make' when trying to install NEURON with MPI+Python (Ubuntu 16.04)

Post by acnavasolive » Wed Sep 19, 2018 11:44 am

Ok. I have now tried with the git version, compiling it with different options. These are my results:

Successfully installed:
  • ./configure --prefix=/home/andrea/neuron/neuronbin --with-iv=/home/andrea/neuron/iv
  • ./configure --prefix=/home/andrea/neuron/neuronbin --with-iv=/home/andrea/neuron/iv --with-paranrn --with-mpi --disable-rx3d
Unsuccessfully:
  • ./configure --prefix=`pwd` --with-iv=$HOME/neuron/iv --with-nrnpython=/home/andrea/anaconda3/envs/py27/bin/python --with-paranrn --with-mpi --disable-rx3d
  • ./configure --prefix=`pwd` --with-iv=$HOME/neuron/iv --with-nrnpython=/home/andrea/anaconda3/envs/py27/bin/python --with-paranrn --disable-rx3d
  • ./configure --prefix=`pwd` --with-iv=$HOME/neuron/iv --with-nrnpython=/home/andrea/anaconda3/envs/py27/bin/python --disable-rx3d
  • ./configure CXXFLAGS='-D_GLIBCXX_USE_CXX11_ABI=0' --prefix=`pwd` --with-iv=$HOME/neuron/iv --with-nrnpython=/home/andrea/anaconda3/envs/py27/bin/python --with-paranrn --with-mpi --disable-rx3d
If I try to do it without specifying the use of my python 2.7 environment, and I just add "--with-nrnpython" like:
  • ./configure --prefix=/home/andrea/neuron/neuronbin --with-iv=$HOME/neuron/iv --with-nrnpython --with-paranrn --with-mpi --disable-rx3d
the config doesn't finish:

Code: Select all

checking if python include files and libraries work... configure: error: could not run a test that used the python library.
Examine config.log to see error details. Something wrong with
	PYLIB=-L/usr/lib -lpython3.5m -lpthread -ldl  -lutil -lexpat                   -L/usr/lib -lz  -lexpat -R/usr/lib
or
	PYLIBDIR=/usr/lib
or
	PYLIBLINK=-L/usr/lib -lpython3.5m -lpthread -ldl  -lutil -lexpat                   -L/usr/lib -lz  -lexpat
or
	PYINCDIR=/usr/include/python3.5m
The last time, some two years ago, I tried to install NEURON with the python3 version, but then it didn't work. That's why I created the python 2.7 environment. Is it possible to use python 3 with this new version of NEURON?

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

Re: Problems with 'make' when trying to install NEURON with MPI+Python (Ubuntu 16.04)

Post by hines » Thu Sep 20, 2018 7:54 am

Ok. So the issue is related to anaconda python. turns out there are a number of google error references for
vtable for std::__cxx11:: basic_stringbuf
and I notice on that may be relevant.
As it turns out,e GCC 5 introduced new implementations of std::string and std::list. You can try the workaround here to see if you can get the linking process to complete successfully, but the safest option is to fall back to using GCC 4.8.
What version of gcc are you using.?
The neuron sources are supposed to work with any python3.

acnavasolive
Posts: 17
Joined: Mon Feb 19, 2018 11:02 am
Contact:

Re: Problems with 'make' when trying to install NEURON with MPI+Python (Ubuntu 16.04)

Post by acnavasolive » Thu Sep 20, 2018 8:09 am

I have trying to focus on those errors too.

As all these errors mention the GLIBCXX_3.4.21 and GLIBCXX_3.4.20,
  • /home/andrea/neuron/iv/x86_64/lib/libIVhines.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21'
  • /home/andrea/neuron/iv/x86_64/lib/libIVhines.so: undefined reference to `vtable for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21'
  • /home/andrea/neuron/iv/x86_64/lib/libIVhines.so: undefined reference to `VTT for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21'
  • /home/andrea/neuron/iv/x86_64/lib/libIVhines.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)@GLIBCXX_3.4.21'
  • /home/andrea/neuron/iv/x86_64/lib/libIVhines.so: undefined reference to `std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::_M_sync(char*, unsigned long, unsigned long)@GLIBCXX_3.4.21'
  • /home/andrea/neuron/iv/x86_64/lib/libIVhines.so: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_ostringstream()@GLIBCXX_3.4.21'
  • /home/andrea/neuron/iv/x86_64/lib/libIVhines.so: undefined reference to `vtable for std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21'
Do you know why does it insists in this 3.4.21 version? Anyway, I have tried with the GCC 3.4 version, although I cannot find the multilib libraries for the 3.4.2, but for the 3.4.6.

It was suggested here (https://ubuntuforums.org/showthread.php?t=2262566) that the 4.9 should be alright, but it doesn't work either.

My original version was 5.4.

acnavasolive
Posts: 17
Joined: Mon Feb 19, 2018 11:02 am
Contact:

Re: Problems with 'make' when trying to install NEURON with MPI+Python (Ubuntu 16.04)

Post by acnavasolive » Thu Sep 20, 2018 10:38 am

It's finally installed!

I tried with the GCC4.8 and it worked!

Thank you so much!!

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

Re: Problems with 'make' when trying to install NEURON with MPI+Python (Ubuntu 16.04)

Post by hines » Thu Sep 20, 2018 12:15 pm

Well, good. However I am truly astonished by this requirement. What specific anaconda version is this?

acnavasolive
Posts: 17
Joined: Mon Feb 19, 2018 11:02 am
Contact:

Re: Problems with 'make' when trying to install NEURON with MPI+Python (Ubuntu 16.04)

Post by acnavasolive » Fri Sep 21, 2018 4:07 am

Code: Select all

Current conda install:

               platform : linux-64
          conda version : 4.3.30
       conda is private : False
      conda-env version : 4.3.30
    conda-build version : not installed
         python version : 2.7.13.final.0
       requests version : 2.14.2
       root environment : /home/andrea/anaconda3  (writable)
    default environment : /home/andrea/anaconda3
       envs directories : /home/andrea/anaconda3/envs
                          /home/andrea/.conda/envs
             user-agent : conda/4.3.30 requests/2.14.2 CPython/2.7.13 Linux/4.4.0-128-generic debian/stretch/sid glibc/2.23    
                UID:GID : 1002:1000

acnavasolive
Posts: 17
Joined: Mon Feb 19, 2018 11:02 am
Contact:

Re: Problems with 'make' when trying to install NEURON with MPI+Python (Ubuntu 16.04)

Post by acnavasolive » Fri Sep 21, 2018 5:05 am

Ok, we have understand what was the cause of it:

My $PATH was something like:

/home/andrea/anaconda3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/cuda-8.0/bin:/usr/local/cuda-8.0/lib64:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin

so when libstdc++.so.6 was searched, it went directly to anaconda3, as there was one in anaconda3/lib/. But this libstdc++.so.6 had GLIBCXX_3.4.1, GLIBCXX_3.4.2, ... up to GLIBCXX_3.4.19, not 21.

At some point, we removed the /home/andrea/anaconda3/bin from $PATH for random reasons, just at the same moment that we used the GCC 4.8 version. So the truly solution was the $PATH related one.

Post Reply