<same as="" issue="" 28="" at="" github=""></same>
When trying to compile the Master Branch 0.9.24 from Mid March, Cygwin fails to compile the asn1c compiler itself.
When downloading an earlier version, it compiled properly under the same target environment.
unber.exe is not neccesary, but I am a bit worried when it fails...
`_xer_whitespace_span' is the offending symbol
---- 8< ----- 8< -----
Making all in asn1c
make[2]: Entering directory /cygdrive/d/code/asn1c/asn1c-master/asn1c'
Making all in .
make[3]: Entering directory/cygdrive/d/code/asn1c/asn1c-master/asn1c'
/bin/sh ../libtool --tag=CC --mode=link gcc -DWIN32 -Wall -Wshadow -Wcast-qua
l -Wcast-align -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -
o unber.exe unber.o
libtool: link: gcc -DWIN32 -Wall -Wshadow -Wcast-qual -Wcast-align -Wchar-subscr
ipts -Wmissing-prototypes -Wmissing-declarations -o .libs/unber.exe unber.o
unber.o:unber.c:(.text+0x3d02): undefined reference to _xer_whitespace_span'
unber.o:unber.c:(.text+0x3d4c): undefined reference to_xer_whitespace_span'
collect2: ld returned 1 exit status
make[3]: *** [unber.exe] Error 1
---- 8< ----- 8< -----
Also, the compiler complains about "time.h", but I don't think this will affect much;
---- 8< ----- 8< -----
In file included from /usr/include/sys/stat.h:9,
from sys-common.h:46,
from unber.c:28:
/usr/include/time.h:6:2: warning: #warning time.h from Cygwin...
In file included from /usr/include/sys/select.h:24,
from /usr/include/cygwin/sys_time.h:13,
from /usr/include/sys/time.h:28,
from /usr/include/sys/socket.h:17,
from /usr/include/cygwin/if.h:19,
from /usr/include/asm/socket.h:14,
from /usr/include/cygwin/socket.h:48,
from /usr/include/cygwin/in.h:21,
from /usr/include/netinet/in.h:14,
from ../skeletons/asn_system.h:88,
from ../skeletons/asn_application.h:11,
from unber.c:34:
/usr/include/time.h:6:2: warning: #warning time.h from Cygwin...
In file included from unber.c:41:
../skeletons/asn_codecs_prim.c: In function 'xer_decode__primitive_body':
../skeletons/asn_codecs_prim.c:220: warning: cast discards qualifiers from point
er target type
---- 8< ----- 8< -----
In connection with the time issue above, the make check fails with the following error:
---- 8< ----- 8< -----
In file included from /usr/include/sys/select.h:24,
from /usr/include/cygwin/sys_time.h:13,
from /usr/include/sys/time.h:28,
from /usr/include/sys/socket.h:17,
from /usr/include/cygwin/if.h:19,
from /usr/include/asm/socket.h:14,
from /usr/include/cygwin/socket.h:48,
from /usr/include/cygwin/in.h:21,
from /usr/include/netinet/in.h:14,
from ./asn_system.h:88,
from ./asn_application.h:11,
from ./asn_internal.h:12,
from GeneralizedTime.c:7:
/usr/include/time.h:6:2: warning: #warning time.h from Cygwin...
In file included from GeneralizedTime.c:12:
/usr/include/time.h:6:2: warning: #warning time.h from Cygwin...
GeneralizedTime.c:71:2: warning: #warning "PLEASE STOP AND READ!"
GeneralizedTime.c:72:2: warning: #warning " timegm() is implemented via getenv(
\"TZ\")/setenv(\"TZ\"), which may be not thread-safe."
GeneralizedTime.c:73:2: warning: #warning " "
GeneralizedTime.c:74:2: warning: #warning " You must fix the code by inserting
appropriate locking"
GeneralizedTime.c:75:2: warning: #warning " if you want to use asn_GT2time() or
asn_UT2time()."
GeneralizedTime.c:76:2: warning: #warning "PLEASE STOP AND READ!"
GeneralizedTime.c: In function 'GMTOFF':
GeneralizedTime.c:87: warning: unused variable 'zone'
GeneralizedTime.c: At top level:
GeneralizedTime.c:132: error: static declaration of 'timegm' follows non-static
declaration
/usr/include/cygwin/time.h:23: error: previous declaration of 'timegm' was here
make[3]: *** [GeneralizedTime.lo] Error 1
make[3]: Leaving directory /cygdrive/d/code/asn1c/asn1c-master/skeletons'
make[2]: *** [check-am] Error 2
make[2]: Leaving directory/cygdrive/d/code/asn1c/asn1c-master/skeletons'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/cygdrive/d/code/asn1c/asn1c-master/skeletons'
make: *** [check-recursive] Error 1
---- 8< ----- 8< -----
This is the same as issue 29 @ GitHub...
Update:
The make structure for unber is missing the required Skeletons library.
I am not an automake expert, but I suspect that I am missing an input file to be able to correct that dependency?
Lev, can you please update the automake input to reflect that unber requires the skeleton library? Or, just the correct xer object would do the same thing!
Thanks!
/Stefan
I've fixed this problem by modifying unber.c (See the attachement)
I wonder it is correct way or not.