Compile .mod files under debian

The basics of how to develop, test, and use models.
Post Reply
solippo
Posts: 3
Joined: Sat Apr 17, 2010 6:06 am

Compile .mod files under debian

Post by solippo »

Hi,
I am using NEURON under debian-based OS, i tried to compile .mod files using

Code: Select all

nrnivmodl
but it doesn't work.
Here the output:

Code: Select all

 /usr/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status
make: *** [libnrnmech.la] Errore 1
Is there any solution for this problem?
I apologize for my bad English.
Thanks,
Filippo.
ted
Site Admin
Posts: 6299
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Compile .mod files under debian

Post by ted »

Use the Forum's "Search" feature to look for ncurses. You will get multiple hits. Read the one with the title
Be sure your Linux can compile source code

So check to make sure that you have installed your linux distribution's "software development environment", and if you have already done that, verify that ncurses has been installed--if it hasn't been installed, find the package that contains ncurses and install it.
solippo
Posts: 3
Joined: Sat Apr 17, 2010 6:06 am

Re: Compile .mod files under debian

Post by solippo »

Thanks for reply,
I have installed succesfully ncurses 5.7 but "nrnivmodl" still not works, it reports yet the same error.
Maybe i have to install it in the neuron folder?
ted
Site Admin
Posts: 6299
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Compile .mod files under debian

Post by ted »

solippo wrote:Maybe i have to install it in the neuron folder?
Wouldn't do that.

See if ncurses-devel has been installed, and if it hasn't been, then install it. Did that take care of the problem?

If that doesn't work, try to find where libncurses is located and tell me what you discover--
ls /lib/*ncurse*
ls /usr/lib/*ncurse*
solippo
Posts: 3
Joined: Sat Apr 17, 2010 6:06 am

Re: Compile .mod files under debian

Post by solippo »

Done! I have installed libncurses5-dev, now it works. Thank you!
Best,
Filippo.
ted
Site Admin
Posts: 6299
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Compile .mod files under debian

Post by ted »

All right! Go forth and conquer the field of computational neuroscience, or at least your particular corner of it!
Russell
Posts: 1
Joined: Tue Jul 03, 2007 1:43 am
Location: Melbourne

Re: Compile .mod files under debian

Post by Russell »

Hi,

When ever I try to compile .mod files under Ubuntu 11.04 (natty), make gives the error message:

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

I think the problem is something to do with my development environment.

$ gcc -print-search-dirs | grep '^programs:'

yielded:

programs: =/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/:/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/:/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/:/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/:/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/:/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/../../../../../i686-linux-gnu/bin/i686-linux-gnu/4.5.2/:/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/../../../../../i686-linux-gnu/bin/

In the process of writing this I fixed the problem by installing readline-devel in synaptics but this problem occupied me for a while and solution not obvious so I will post anyway in case someone else has this problem.
ted
Site Admin
Posts: 6299
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Compile .mod files under debian

Post by ted »

Thanks for posting that. Sooner or later, everyone who compiles from source code under Linux runs into similar issues. The first time around it can really be baffling, especially when the missing item is part of a library with a nontrivially different name. And, for various reasons, library names do change from time to time. "devel" in a library name is often a clue that it contains many things, perhaps even the missing object that one seeks.
Post Reply