neuronsimulator / nrn

NEURON Simulator
http://nrn.readthedocs.io
Other
376 stars 113 forks source link

undefined reference to ‘memcpy@GLIBC_2.1’ compiling error #2949

Open nrnhines opened 1 week ago

nrnhines commented 1 week ago

An issue was posted to the NEURON forum https://www.neuron.yale.edu/phpBB/viewtopic.php?t=4694 The author writes:

I am attempting to compile the mod files with the command nrnivmodl . for a single cell model and keep encountering the error that there is an undefined reference to ‘memcpy@GLIBC_2.14':

and gives details of the link error and environment. The problem occurs with both 8.2.4 and current master. My last message was

So the issue seems generic with respect to our wheel build environment. I think the fact that you can launch neurondemo with its libnrniv and the libnrnmech built when the installer was created is an important clue. The issue seems focused on the nrnivmodl make process. I imagine some detail is missing in the compile or link arguments. I've created a GitHub issue to discuss with colleagues about this. Perhaps someone has a suggestion for further diagnosis/fixing. If the problem is specific to nrnivmodl and helpers then it should be more convenient for you to modify or replace the nrnmech_makefile without having to build a new wheel for each diagnostic experiment. Note. When I create a python3.12 virtual environment in env and pip install neuron, nrnmech_makefile is located in env/lib/python3.12/site-packages/neuron/.data/bin

mgeplf commented 1 week ago

I think it would be worth knowing the conda version; and also what libc gcc is actually using (from stackoverflow) should do the trick:

echo '#include <errno.h>' | gcc -xc - -E -dM | grep -E '^#define __GLIBC(|_MINOR)__ '

Making sure that the gcc that is being called is from within conda, and not the OS's version (so, perhaps /home/kedoxey/.conda/envs/python3_9-NEW/bin/../lib/gcc/x86_64-conda-linux-gnu/10.4.0/../../../../x86_64-conda-linux-gnu/bin/gcc ?)

kedoxey commented 1 week ago

My conda version is conda 4.10.3.

The output from echo ... is:

#define __GLIBC__ 2
#define __GLIBC_MINOR__ 35