mknrndll fils with undefined reference

NMODL and the Channel Builder.
Post Reply
JimH
Posts: 54
Joined: Tue Apr 10, 2007 3:36 pm
Location: Duke University

mknrndll fils with undefined reference

Post by JimH » Thu Sep 05, 2019 2:50 pm

I recently updated to NEURON 7.7 from NEURON 7.2 and was trying to recompile a mod file. I tried recompiling one of my mod files and the compilation failed with:

undefined reference to 'hoc_register_dparam_size' at line 75 in the mkrndll.mak file (NEURON version 7.7.2.7.7 2b7985ba)

After a lot of searching I found that another post on this forum which mentioned something about deleting old object files (.o) and c files (.c). I also deleted some old lo and la files that I had moved into that directory when having problems on a mac (I didn't know where to find the resulting lib file and thought the lo and la files might help)

viewtopic.php?f=8&t=3318

Deleting those files fixed the problem.

I was hoping to understand:
1. Why this step was needed. What exactly was causing the problem (if that can be deduced from the reported error)?
2. Whether or not this would be considered a bug or if it is expected behavior for some reason.

Thanks!

ted
Site Admin
Posts: 5590
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: mknrndll fils with undefined reference

Post by ted » Sat Sep 07, 2019 12:07 pm

Compilation of NMODL files produces .o and .c files that persist but are not required during program execution. Why? If you decide to add a new NMODL file, or revise an existing NMODL file, there's no need to recompile all the other files.

If you update NEURON, there's no guarantee that the old .o files will be compatible with the new version, so it's up to you to delete them (and to delete the old .c files too) and then recompile the NMODL files.

"Why do I have to do this? Why not delete them automatically in the first place?"

Because program updates are occasional, but reasons to compile just a few mod files are common.

JimH
Posts: 54
Joined: Tue Apr 10, 2007 3:36 pm
Location: Duke University

Re: mknrndll fils with undefined reference

Post by JimH » Sat Sep 07, 2019 1:20 pm

That makes perfect sense. Thanks!

Post Reply