Missing .o files and cannot find ../../nmodlconf.h:

Post Reply
dcampbell

Missing .o files and cannot find ../../nmodlconf.h:

Post by dcampbell »

When compiling neuron(hg tip) on a debian (squeeze, python 2.7.7) sparc machine, I get many errors about missing .o files. This was the first:

Code: Select all

make  all-recursive
make[1]: Entering directory `/usr/local/src/neuron'
Making all in src
make[2]: Entering directory `/usr/local/src/neuron/src'
Making all in e_editor
make[3]: Entering directory `/usr/local/src/neuron/src/e_editor'
source='hoc_e.c' object='hoc_e.o' libtool=no \
	DEPDIR=.deps depmode=none /bin/sh ../../depcomp \
	mpicc -DHAVE_CONFIG_H -I. -I../.. -I../../src/nrnoc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/ivos -I../../src/sundials -I../../src/nrnpython -I../../src/oc    -g -O2 -c hoc_e.c
/bin/sh ../../libtool --tag=CC   --mode=link mpicc  -g -O2   -o hoc_e hoc_e.o  -lm -ldl
libtool: link: mpicc -g -O2 -o hoc_e hoc_e.o  -lm -ldl
cc: hoc_e.o: No such file or directory
make[3]: *** [hoc_e] Error 1
make[3]: Leaving directory `/usr/local/src/neuron/src/e_editor'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/neuron/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/neuron'
make: *** [all] Error 2
In order to try to fix the problem, I went into the directory and tried compiling hoc_e.c to hoc_e.o directly using gcc, which lead to the next error:

Code: Select all

$ gcc -c hoc_e.c
hoc_e.c:1:29: error: ../../nmodlconf.h: No such file or directory
hoc_e.c:184: error: expected declaration specifiers or ‘...’ before ‘*’ token
hoc_e.c:184: warning: data definition has no type or storage class
hoc_e.c:184: error: ‘RETSIGTYPE’ declared as function returning a function
hoc_e.c:185: error: expected declaration specifiers or ‘...’ before ‘*’ token
hoc_e.c:185: warning: data definition has no type or storage class
hoc_e.c:185: error: ‘RETSIGTYPE’ declared as function returning a function
hoc_e.c: In function ‘main’:
hoc_e.c:258: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘onintr’
hoc_e.c:260: error: ‘onquit’ undeclared (first use in this function)
hoc_e.c:260: error: (Each undeclared identifier is reported only once
hoc_e.c:260: error: for each function it appears in.)
hoc_e.c:261: error: ‘onhup’ undeclared (first use in this function)
hoc_e.c:261: warning: passing argument 2 of ‘signal’ from incompatible pointer type
hoc_e.c:268: warning: passing argument 2 of ‘signal’ from incompatible pointer type
hoc_e.c: In function ‘callunix’:
hoc_e.c:1400: error: expected declaration specifiers or ‘...’ before ‘*’ token
hoc_e.c:1400: error: ‘RETSIGTYPE’ declared as function returning a function
hoc_e.c:1400: error: invalid storage class for function ‘RETSIGTYPE’
hoc_e.c:1409: error: ‘onhup’ undeclared (first use in this function)
hoc_e.c:1410: error: ‘onquit’ undeclared (first use in this function)
hoc_e.c:1423: error: ‘savintr’ undeclared (first use in this function)
hoc_e.c: In function ‘puts’:
hoc_e.c:2484: warning: argument ‘as’ doesn’t match built-in prototype
hoc_e.c: At top level:
hoc_e.c:2556: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘hupcatch’
hoc_e.c:2568: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘onintr’
hoc_e.c:2569: error: expected identifier or ‘(’ before ‘{’ token
So I opened up the hoc_e.c and noticed this strange looking include:

Code: Select all

#include <../../nmodlconf.h>
Which I changed to the following:

Code: Select all

#include "../../nmodlconf.h"
Having done this, make still did not work, but I could compile the .c file to .o directly using gcc and get further along in the make process. I ended up coming across a number of these so I used a sed/bash script to fix all the includes and compile the files manually, but eventually I got to some files which had fatal errors even after doing this:

Code: Select all

/usr/local/src/neuron/src/nmodl /usr/local/src/neuron
deriv.c: In function ‘solv_diffeq’:
deriv.c:95: error: ‘thread_data_index’ undeclared (first use in this function)
deriv.c:95: error: (Each undeclared identifier is reported only once
deriv.c:95: error: for each function it appears in.)
deriv.c:99: error: ‘thread_mem_init_list’ undeclared (first use in this function)
deriv.c:103: error: ‘thread_cleanup_list’ undeclared (first use in this function)
deriv.c: At top level:
deriv.c:139: error: expected identifier or ‘(’ before ‘}’ token
noccout.c: In function ‘ext_vdef’:
noccout.c:58: error: ‘electrode_current’ undeclared (first use in this function)
noccout.c:58: error: (Each undeclared identifier is reported only once
noccout.c:58: error: for each function it appears in.)
nocpout.c: In function ‘nrninit’:
nocpout.c:206: error: ‘debugging_’ undeclared (first use in this function)
nocpout.c:206: error: (Each undeclared identifier is reported only once
nocpout.c:206: error: for each function it appears in.)
nocpout.c: In function ‘parout’:
nocpout.c:237: error: ‘vectorize’ undeclared (first use in this function)
nocpout.c:316: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c:438: error: ‘struct Symbol’ has no member named ‘assigned_to_’
nocpout.c:452: error: ‘struct Symbol’ has no member named ‘assigned_to_’
nocpout.c:475: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c:475: error: ‘Symbol’ has no member named ‘assigned_to_’
nocpout.c:496: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c:497: error: ‘Symbol’ has no member named ‘assigned_to_’
nocpout.c:538: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c:553: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c:572: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c:583: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c:804: error: ‘struct Symbol’ has no member named ‘nrntype’
nocpout.c:815: error: ‘struct Symbol’ has no member named ‘nrntype’
nocpout.c:816: error: ‘struct Symbol’ has no member named ‘nrntype’
nocpout.c:1038: error: ‘net_receive_’ undeclared (first use in this function)
nocpout.c:1048: error: ‘tqitem_index’ undeclared (first use in this function)
nocpout.c:1051: error: ‘net_event_seen_’ undeclared (first use in this function)
nocpout.c: In function ‘warn_ignore’:
nocpout.c:1165: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c: In function ‘ldifusreg’:
nocpout.c:1247: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c:1249: error: ‘Symbol’ has no member named ‘ioncount_’
nocpout.c: In function ‘units_reg’:
nocpout.c:1371: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c: In function ‘nrn_list’:
nocpout.c:1455: error: ‘struct Symbol’ has no member named ‘nrntype’
nocpout.c:1473: error: ‘struct Symbol’ has no member named ‘nrntype’
nocpout.c:1481: error: ‘struct Symbol’ has no member named ‘nrntype’
nocpout.c:1490: error: ‘struct Symbol’ has no member named ‘nrntype’
nocpout.c:1498: error: ‘struct Symbol’ has no member named ‘nrntype’
nocpout.c: In function ‘nrn_use’:
nocpout.c:1582: error: ‘struct Symbol’ has no member named ‘nrntype’
nocpout.c:1584: error: ‘struct Symbol’ has no member named ‘nrntype’
nocpout.c:1586: error: ‘struct Symbol’ has no member named ‘nrntype’
nocpout.c:1597: error: ‘struct Symbol’ has no member named ‘nrntype’
nocpout.c:1599: error: ‘struct Symbol’ has no member named ‘nrntype’
nocpout.c:1601: error: ‘struct Symbol’ has no member named ‘nrntype’
nocpout.c: In function ‘nrndeclare’:
nocpout.c:1651: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c:1654: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c:1657: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c:1660: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c:1670: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c:1673: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c:1675: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c:1678: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c:1679: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c:1686: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c:1689: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c:1691: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c:1694: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c:1697: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c:1698: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c:1700: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c:1701: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c: In function ‘del_range’:
nocpout.c:1722: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c: In function ‘declare_p’:
nocpout.c:1746: error: ‘struct Symbol’ has no member named ‘nrntype’
nocpout.c:1760: error: ‘debugging_’ undeclared (first use in this function)
nocpout.c:1760: error: ‘net_receive_’ undeclared (first use in this function)
nocpout.c: In function ‘set_ion_variables’:
nocpout.c:1782: error: ‘struct Symbol’ has no member named ‘nrntype’
nocpout.c: In function ‘get_ion_variables’:
nocpout.c:1846: error: ‘struct Symbol’ has no member named ‘nrntype’
nocpout.c:1851: error: ‘struct Symbol’ has no member named ‘nrntype’
nocpout.c:1857: error: ‘struct Symbol’ has no member named ‘nrntype’
nocpout.c:1860: error: ‘struct Symbol’ has no member named ‘nrntype’
nocpout.c:1865: error: ‘struct Symbol’ has no member named ‘nrntype’
nocpout.c: In function ‘iondef’:
nocpout.c:1898: error: ‘struct Symbol’ has no member named ‘nrntype’
nocpout.c:1906: error: ‘struct Symbol’ has no member named ‘ioncount_’
nocpout.c:1911: error: ‘struct Symbol’ has no member named ‘nrntype’
nocpout.c:1912: error: ‘struct Symbol’ has no member named ‘nrntype’
nocpout.c:1921: error: ‘struct Symbol’ has no member named ‘ioncount_’
nocpout.c: In function ‘begin_dion_stmt’:
nocpout.c:2001: error: ‘struct Symbol’ has no member named ‘nrntype’
nocpout.c: In function ‘end_dion_stmt’:
nocpout.c:2028: error: ‘struct Symbol’ has no member named ‘nrntype’
nocpout.c: In function ‘nrn_var_assigned’:
nocpout.c:2089: error: ‘Symbol’ has no member named ‘assigned_to_’
nocpout.c:2090: error: ‘Symbol’ has no member named ‘assigned_to_’
nocpout.c:2093: error: ‘Symbol’ has no member named ‘assigned_to_’
nocpout.c: In function ‘net_receive’:
nocpout.c:2415: error: ‘net_receive_’ undeclared (first use in this function)
nocpout.c:2435: error: ‘net_send_delivered_’ undeclared (first use in this function)
nocpout.c:2438: error: ‘watch_seen_’ undeclared (first use in this function)
nocpout.c:2443: error: ‘debugging_’ undeclared (first use in this function)
nocpout.c:2473: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c:2476: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c: In function ‘chk_thread_safe’:
nocpout.c:2569: error: ‘Symbol’ has no member named ‘nrntype’
nocpout.c:2569: error: ‘Symbol’ has no member named ‘assigned_to_’
nocpout.c: In function ‘threadsafe_seen’:
nocpout.c:2582: error: ‘struct Symbol’ has no member named ‘assigned_to_’
parsact.c: In function ‘watchstmt’:
parsact.c:1141: error: ‘watch_seen_’ undeclared (first use in this function)
parsact.c:1141: error: (Each undeclared identifier is reported only once
parsact.c:1141: error: for each function it appears in.)
parse1.y: In function ‘yyparse’:
parse1.y:407: error: ‘struct Symbol’ has no member named ‘assigned_to_’
parse1.y:409: error: ‘struct Symbol’ has no member named ‘assigned_to_’
parse1.y:420: error: ‘struct Symbol’ has no member named ‘assigned_to_’
parse1.y:422: error: ‘struct Symbol’ has no member named ‘assigned_to_’
solve.c: In function ‘solvhandler’:
solve.c:197: error: ‘vectorize’ undeclared (first use in this function)
solve.c:197: error: (Each undeclared identifier is reported only once
solve.c:197: error: for each function it appears in.)
/usr/local/src/neuron
make  all-recursive
make[1]: Entering directory `/usr/local/src/neuron'
Making all in src
make[2]: Entering directory `/usr/local/src/neuron/src'
Making all in e_editor
make[3]: Entering directory `/usr/local/src/neuron/src/e_editor'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/usr/local/src/neuron/src/e_editor'
Making all in modlunit
make[3]: Entering directory `/usr/local/src/neuron/src/modlunit'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/usr/local/src/neuron/src/modlunit'
Making all in nmodl
make[3]: Entering directory `/usr/local/src/neuron/src/nmodl'
source='parse1.c' object='parse1.o' libtool=no \
	DEPDIR=.deps depmode=none /bin/sh ../../depcomp \
	mpicc -DHAVE_CONFIG_H -I. -I../.. -I../../src/nrnoc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/ivos -I../../src/sundials -I../../src/nrnpython -I../../src/src/modlunit -DNMODL=1 -DNOCMODL=1 -DCVODE=1 -DVECTORIZE=1   -g -O2 -c parse1.c
/bin/sh ../../ylwrap diffeq.y y.tab.c diffeq.c y.tab.h diffeq.h y.output diffeq.output -- bison -y  -d
conflicts: 5 shift/reduce
diffeq.h is unchanged
source='diffeq.c' object='diffeq.o' libtool=no \
	DEPDIR=.deps depmode=none /bin/sh ../../depcomp \
	mpicc -DHAVE_CONFIG_H -I. -I../.. -I../../src/nrnoc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/ivos -I../../src/sundials -I../../src/nrnpython -I../../src/src/modlunit -DNMODL=1 -DNOCMODL=1 -DCVODE=1 -DVECTORIZE=1   -g -O2 -c diffeq.c
source='deriv.c' object='deriv.o' libtool=no \
	DEPDIR=.deps depmode=none /bin/sh ../../depcomp \
	mpicc -DHAVE_CONFIG_H -I. -I../.. -I../../src/nrnoc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/ivos -I../../src/sundials -I../../src/nrnpython -I../../src/src/modlunit -DNMODL=1 -DNOCMODL=1 -DCVODE=1 -DVECTORIZE=1   -g -O2 -c deriv.c
source='nocpout.c' object='nocpout.o' libtool=no \
	DEPDIR=.deps depmode=none /bin/sh ../../depcomp \
	mpicc -DHAVE_CONFIG_H -I. -I../.. -I../../src/nrnoc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/ivos -I../../src/sundials -I../../src/nrnpython -I../../src/src/modlunit -DNMODL=1 -DNOCMODL=1 -DCVODE=1 -DVECTORIZE=1   -g -O2 -c nocpout.c
source='noccout.c' object='noccout.o' libtool=no \
	DEPDIR=.deps depmode=none /bin/sh ../../depcomp \
	mpicc -DHAVE_CONFIG_H -I. -I../.. -I../../src/nrnoc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/ivos -I../../src/sundials -I../../src/nrnpython -I../../src/src/modlunit -DNMODL=1 -DNOCMODL=1 -DCVODE=1 -DVECTORIZE=1   -g -O2 -c noccout.c
source='parsact.c' object='parsact.o' libtool=no \
	DEPDIR=.deps depmode=none /bin/sh ../../depcomp \
	mpicc -DHAVE_CONFIG_H -I. -I../.. -I../../src/nrnoc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/ivos -I../../src/sundials -I../../src/nrnpython -I../../src/src/modlunit -DNMODL=1 -DNOCMODL=1 -DCVODE=1 -DVECTORIZE=1   -g -O2 -c parsact.c
source='solve.c' object='solve.o' libtool=no \
	DEPDIR=.deps depmode=none /bin/sh ../../depcomp \
	mpicc -DHAVE_CONFIG_H -I. -I../.. -I../../src/nrnoc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/ivos -I../../src/sundials -I../../src/nrnpython -I../../src/src/modlunit -DNMODL=1 -DNOCMODL=1 -DCVODE=1 -DVECTORIZE=1   -g -O2 -c solve.c
/bin/sh ../../libtool --tag=CC   --mode=link mpicc  -g -O2   -o nocmodl parse1.o diffeq.o lex.o consist.o deriv.o discrete.o init.o io.o kinetic.o list.o modl.o nocpout.o noccout.o parsact.o partial.o sens.o simultan.o solve.o symbol.o units.o version.o  -lm -ldl
libtool: link: mpicc -g -O2 -o nocmodl parse1.o diffeq.o lex.o consist.o deriv.o discrete.o init.o io.o kinetic.o list.o modl.o nocpout.o noccout.o parsact.o partial.o sens.o simultan.o solve.o symbol.o units.o version.o  -lm -ldl
cc: parse1.o: No such file or directory
cc: deriv.o: No such file or directory
cc: nocpout.o: No such file or directory
cc: noccout.o: No such file or directory
cc: parsact.o: No such file or directory
cc: solve.o: No such file or directory
make[3]: *** [nocmodl] Error 1
make[3]: Leaving directory `/usr/local/src/neuron/src/nmodl'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/neuron/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/neuron'
make: *** [all] Error 2
Additional Information:
Linux 2.6.26-2-sparc64-smp SMP sparc64 GNU/Linux
./configure --prefix=/share --bindir=/share/bin --libdir=/share/lib --with-nrnpython=/usr/local/bin/python --without-iv --without-x --without-memacs --disable-shared --with-paranrn
changeset: 472:927e786fd1b9
hines
Site Admin
Posts: 1687
Joined: Wed May 18, 2005 3:32 pm

Re: Missing .o files and cannot find ../../nmodlconf.h:

Post by hines »

you probably missed an earlier error which explained why the .o file does not exist. Probably you were trying to build in a directory for which you do not have write permission.
With regard to the manual compile you tried, you left out a needed -I. argument which would add to the directory search list.

If it is not clear what the problem is, send me by email <michael dot hines at yale dot edu> the full output of 'make'.
dcampbell

Re: Missing .o files and cannot find ../../nmodlconf.h:

Post by dcampbell »

I had been trying to build as root (which was a bad idea). Once I tried to do the build as a normal user, it worked.
Post Reply