need help in compilation

Uwe Mayer merkosh@planet-interkom.de
Wed Nov 27 06:48:00 GMT 2002


Hi,

I get the following error message whin compiling anacron for cygwin:

--
gcc -c -DSPOOLDIR=\"/var/spool/anacron\" -DRELEASE=\"2.3\" -DANACRONTAB=\"/etc/anacrontab\"  -Wall
-pedantic -O2 readtab.c -o readtab.o
readtab.c:32:21: obstack.h: No such file or directory
readtab.c:33:1: warning: C++ style comments are not allowed in ISO C89
readtab.c:33:1: warning: (this will be reported only once per input file)
In file included from readtab.c:38:
global.h:35:1: warning: C++ style comments are not allowed in ISO C89
global.h:35:1: warning: (this will be reported only once per input file)
readtab.c: In function `read_tab_line':
readtab.c:91: warning: implicit declaration of function `obstack_1grow'
readtab.c:94: warning: implicit declaration of function `obstack_finish'
readtab.c:94: warning: return makes pointer from integer without a cast
readtab.c: In function `register_env':
readtab.c:123: warning: implicit declaration of function `obstack_alloc'
readtab.c:123: warning: assignment makes pointer from integer without a cast
readtab.c:124: warning: assignment makes pointer from integer without a cast
readtab.c: In function `register_job':
readtab.c:155: warning: assignment makes pointer from integer without a cast
readtab.c:159: warning: assignment makes pointer from integer without a cast
readtab.c:162: warning: assignment makes pointer from integer without a cast
readtab.c: In function `read_tab':
readtab.c:236: warning: implicit declaration of function `obstack_init'
readtab.c:242: warning: implicit declaration of function `obstack_free'
readtab.c: In function `arrange_jobs':
readtab.c:278: warning: implicit declaration of function `obstack_grow'
readtab.c:282: warning: assignment makes pointer from integer without a cast
/usr/include/stdio.h: At top level:
readtab.c:41: storage size of `input_o' isn't known
readtab.c:42: storage size of `tab_o' isn't known
readtab.c:58: warning: `xmalloc' defined but not used
make: *** [readtab.o] Error 1
--

I guess obstack.h is missing. A packet search for obstack.h on
the cygwin homepage listed only source files for obstack.h. Now, I
didn't know how to deal with that.
I installed the binutils sources, changed the #include directive to
match the location of the missing header file,

/usr/src/binutils-20021107-2/include/obstack.h           (*)
/usr/src/binutils-20021107-2/libiberty/obstack.c
/usr/src/binutils-20021107-2/libiberty/obstacks.texi

and tried make again:
--
gcc  gregor.o lock.o log.o main.o matchrx.o readtab.o runjob.o  -o anacron
readtab.o(.text+0x150):readtab.c: undefined reference to `__obstack_newchunk'
readtab.o(.text+0x1f8):readtab.c: undefined reference to `__obstack_newchunk'
readtab.o(.text+0x43c):readtab.c: undefined reference to `__obstack_newchunk'
readtab.o(.text+0x480):readtab.c: undefined reference to `__obstack_newchunk'
readtab.o(.text+0x70c):readtab.c: undefined reference to `__obstack_newchunk'
readtab.o(.text+0x74c):readtab.c: more undefined references to `__obstack_newchunk' follow
readtab.o(.text+0xa7b):readtab.c: undefined reference to `__obstack_begin'
readtab.o(.text+0xaa7):readtab.c: undefined reference to `__obstack_begin'
readtab.o(.text+0xae5):readtab.c: undefined reference to `_obstack_free'
readtab.o(.text+0xc90):readtab.c: undefined reference to `__obstack_newchunk'
collect2: ld returned 1 exit status
make: *** [anacron] Error 1
--

This obviously doesn't work.
Can somebody tell me where the problem here is?
Wrong version of obstack?


Ciao
Uwe


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list