-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined reference to ‘memcpy@GLIBC_2.1’ compiling error #2949
Comments
I think it would be worth knowing the conda version; and also what libc gcc is actually using (from stackoverflow) should do the trick:
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 ?) |
My conda version is The output from
|
I am trying to reproduce on a Virtual box guest (Ubuntu 23.10). Installing https://repo.anaconda.com/archive/Anaconda3-2024.06-1-Linux-x86_64.sh
With I had some mod files in a neuron source folder,
I note that there are a number of differences with your environment (python3.9 and conda 4.10.3) and I don't know whether your problem is related to some specific mod file. With respect to the last are you able to do a successful nrnivmodl from a folder analogous to
You might have to temporarily rename the x86_64 folder there first. |
I am working on conda upgraded on the server to a newer version. I have found that the error appears after I copy a mod file into the folder I am trying to compile. Fortunately, I tested |
I likely don't understand. I'm interpreting your last comment as that you have a folder with the property that when you copy a mod file into it, the mod file will no longer compile. Is that the correct interpretation? If so, what is the full pathname of that folder? And what the the contents (all the filenames) in that folder. i.e. the output of |
Correct. I am using the NEURON version of this single cell model from NeuroML-DB . The error appears when I copy an external mod file into the cell model's main folder. The pathname is
|
The path and file list you sent above doesn't raise any red flags with me. Though I'm not sure what would :) If you send me a zip file of that folder (without the x86_64 or output subfolders), I'll try it out on my ubuntu virtualbox guest. The zip command would be ( executed in the parent folder of ``NMLCL000073-NEURON-C```)
and please send to michael.hines@yale.edu . |
Perhaps it would be possible to avoid fruitless experiments on my side by having a zoom meeting with you so that I can see what is going on. We can arrange via email. |
@kedoxey On my machine I see:
I'm curious what you observe on your machine. The above matches well with the wheel version of libnrniv.so
|
For these two commands I get
|
I did not expect your |
I'm not sure if anything changed, but I was able to successfully compile my mod folder without the memcpy error after our meeting. I am going to contact a systems administrator for the server to look into it further. |
I'm certainly confused by the variability exhibited by the error. On my machine, I actually have a lot of libc.so.6 instances and some do not have
|
Thought I'd see what chatgpt has to say about the issue. We've already explored a few of its suggestions. But having the linker run in verbose mode seems like it might be usefully informative. when linking with g++ on ubuntu, how can one determine the libraries used (in particular libc.so.6). I having trouble with nrnivmodl from a pip install neuron which quite variably exhibits the error ...x86_64-conda-linux-gnu/bin/ld: /home/kedoxey/.conda/envs/python3_9-NEW/lib/python3.9/site-packages/neuron/.data/lib/libnrniv.so: undefined reference to memcpy@GLIBC_2.14 When linking with Here's how you can approach this: 1. Check the Linking CommandWhen g++ -v ... This will show you the detailed linking process, including the libraries being used. 2. Inspect Shared Library DependenciesTo check which libraries are linked by an executable or shared library, you can use the ldd /home/kedoxey/.conda/envs/python3_9-NEW/lib/python3.9/site-packages/neuron/.data/lib/libnrniv.so If 3. Check the GLIBC VersionTo check the version of glibc installed on your system, use: ldd --version The version number is shown at the top of the output. For example, if the version is 2.31, then 4. Examine Symbol Versions in LibrariesYou can use the objdump -T /home/kedoxey/.conda/envs/python3_9-NEW/lib/python3.9/site-packages/neuron/.data/lib/libnrniv.so | grep memcpy or readelf -Ws /home/kedoxey/.conda/envs/python3_9-NEW/lib/python3.9/site-packages/neuron/.data/lib/libnrniv.so | grep memcpy This will show you the versions of 5. Verify Library Path ConsistencyEnsure that the libraries in your conda environment are compatible with your system's glibc version. Conda environments sometimes use libraries that may not match the versions available on the system. You may need to update or reconfigure your conda environment. 6. Check for Version CompatibilityEnsure that the version of 7. Consider Conda-Specific IssuesIf you’re using conda, it may be helpful to ensure that all dependencies are correctly aligned within your conda environment. Sometimes recreating the environment or using a different channel can resolve such issues. By using these steps, you should be able to diagnose and potentially resolve the issue with undefined references related to |
To explore the linking information I created a python virtual environment
then modified the makefile associated with nrnivmodl
and edited nrnmech_makefile and modified the relevant line by inserting a -v to read
then
generates the output
In my case, given
|
An issue was posted to the NEURON forum
https://www.neuron.yale.edu/phpBB/viewtopic.php?t=4694
The author writes:
and gives details of the link error and environment. The problem occurs with both 8.2.4 and current master. My last message was
The text was updated successfully, but these errors were encountered: