Page 1 of 1

nrnivmodl compiling in Linux

Posted: Fri Jun 29, 2012 7:20 pm
by dzocchi
I'm using ubuntu 2.6.38 and installed Neuron from the 32 bit deb file. When trying to compile mod files from another model, I get the following error:

/usr/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status
make: *** [libnrnmech.la] Error 1

I have been searching the forums but can't really find anything that helps much. Does anyone know what the problem could be?

Thanks!

Re: nrnivmodl compiling in Linux

Posted: Sat Jun 30, 2012 2:23 pm
by ted
Use your distribution's package manager to discover and install the package(s) that it needs for development or compilation of programs that use ncurses.

A comment: despite its general excellence in most other areas, Ubuntu has been the principal source of questions like this. For some reason or other, it doesn't offer users a simple option like "install everything I need to develop and compile programs written in C or C++."

Re: nrnivmodl compiling in Linux

Posted: Fri Mar 08, 2013 2:01 pm
by tom_morse
In ubuntu it is convenient to use synaptic as a package manager. If you don't have it you can add it with a command like

Code: Select all

sudo apt-get install synaptic
When I used synaptic to discover what was missing (I typed ncurses in the synaptic search box when i received the ncurses missing message) I cured the problem by installing libncurses5-dev (in synaptic you can mark it for install and then apply).

Re: nrnivmodl compiling in Linux

Posted: Tue Oct 29, 2013 7:56 am
by sanjaybioe
Dear Tom, what if it is opensuse 13.1? I too get the same error on lncurses.

Re: nrnivmodl compiling in Linux

Posted: Tue Oct 29, 2013 11:14 am
by ted
Use your distribution's package manager to discover and install the package(s) that it needs for development or compilation of programs that use ncurses.

Re: nrnivmodl compiling in Linux

Posted: Sat Mar 24, 2018 4:41 am
by oren
Hi usually when I get this problem in a new computer (ubuntu) I do the following:

Code: Select all

sudo apt-get install libncurses-dev

Re: nrnivmodl compiling in Linux

Posted: Tue Jun 19, 2018 6:48 pm
by luadam4c
I needed this as well (Ubuntu 18.04 LTS):

Code: Select all

sudo apt-get install gcc
For some reason synaptic didn't pick this up.

Re: nrnivmodl compiling in Linux

Posted: Fri Jan 25, 2019 6:37 pm
by rgerkin
If anyone gets here running NEURON with a miniconda installation, this is why it is happening and how to solve it:

Your default gcc may be on the miniconda path (/path/to/miniconda/bin), and it will look in your miniconda path for libraries, too (/path/to/miniconda/lib). apt-get won't install the ncurses libraries there, and miniconda's gcc won't look to where it does install. But you can do:

Code: Select all

conda install -c anaconda ncurses
And then run nrnivmodl as:

Code: Select all

nrnivmodl -loadflags "-L/path/to/miniconda/lib"
and then nrnivmodl will find the ncurses libraries and your mod files should compile.

Re: nrnivmodl compiling in Linux

Posted: Mon Jan 28, 2019 10:35 pm
by ted
Thanks, rgerkin. Installation and configuration tips are always welcome.