MinGW - errors compiling in c-ares

Questions or HOWTOs about the above? Post 'em here...
Post Reply
User avatar
wiz
Private First Class
Private First Class
Posts: 46
Joined: Sat Dec 07, 2002 1:19 am
Location: Moline, IL, USA

MinGW - errors compiling in c-ares

Post by wiz »

While compiling BZFlag from cvs last night (using MinGW/MSYS - WinXP), I encountered errors during 'make'. The first indication of a problem is in src/c-ares/ares_init.c. Following is the output from make:

Code: Select all

$ make && make install
Making all in data
make[1]: Entering directory `/bzflag/data'
Making all in l10n
make[2]: Entering directory `/bzflag/data/l10n'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/bzflag/data/l10n'
Making all in fonts
make[2]: Entering directory `/bzflag/data/fonts'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/bzflag/data/fonts'
make[2]: Entering directory `/bzflag/data'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/bzflag/data'
make[1]: Leaving directory `/bzflag/data'
Making all in doc
make[1]: Entering directory `/bzflag/doc'
Making all in man
make[2]: Entering directory `/bzflag/doc/man'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/bzflag/doc/man'
Making all in faq
make[2]: Entering directory `/bzflag/doc/faq'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/bzflag/doc/faq'
Making all in guide
make[2]: Entering directory `/bzflag/doc/guide'
Making all in Commands
make[3]: Entering directory `/bzflag/doc/guide/Commands'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/bzflag/doc/guide/Commands'
Making all in Flags
make[3]: Entering directory `/bzflag/doc/guide/Flags'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/bzflag/doc/guide/Flags'
Making all in Geometry
make[3]: Entering directory `/bzflag/doc/guide/Geometry'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/bzflag/doc/guide/Geometry'
Making all in Installation
make[3]: Entering directory `/bzflag/doc/guide/Installation'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/bzflag/doc/guide/Installation'
Making all in Tactics
make[3]: Entering directory `/bzflag/doc/guide/Tactics'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/bzflag/doc/guide/Tactics'
make[3]: Entering directory `/bzflag/doc/guide'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/bzflag/doc/guide'
make[2]: Leaving directory `/bzflag/doc/guide'
Making all in howto
make[2]: Entering directory `/bzflag/doc/howto'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/bzflag/doc/howto'
make[2]: Entering directory `/bzflag/doc'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/bzflag/doc'
make[1]: Leaving directory `/bzflag/doc'
Making all in include
make[1]: Entering directory `/bzflag/include'
make  all-am
make[2]: Entering directory `/bzflag/include'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/bzflag/include'
make[1]: Leaving directory `/bzflag/include'
Making all in man
make[1]: Entering directory `/bzflag/man'
cat bzadmin.6s                                                  | \
sed -e "s'INSTALL_DATA_DIR'/usr/local/share/bzflag'g"   | \
sed -e "s'BUILD_DATE'2005-03-21'g"                      | \
sed -e "s'BUILD_VERSION'2.0.3'g" > bzadmin.6
cat bzflag.6s                                                   | \
sed -e "s'INSTALL_DATA_DIR'/usr/local/share/bzflag'g"   | \
sed -e "s'BUILD_DATE'2005-03-21'g"                      | \
sed -e "s'BUILD_VERSION'2.0.3'g" > bzflag.6
cat bzfs.6s                                                     | \
sed -e "s'INSTALL_DATA_DIR'/usr/local/share/bzflag'g"   | \
sed -e "s'BUILD_DATE'2005-03-21'g"                      | \
sed -e "s'BUILD_VERSION'2.0.3'g" > bzfs.6
cat bzw.5s                                                      | \
sed -e "s'INSTALL_DATA_DIR'/usr/local/share/bzflag'g"   | \
sed -e "s'BUILD_DATE'2005-03-21'g"                      | \
sed -e "s'BUILD_VERSION'2.0.3'g" > bzw.5
make[1]: Leaving directory `/bzflag/man'
Making all in package
make[1]: Entering directory `/bzflag/package'
make[2]: Entering directory `/bzflag/package'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/bzflag/package'
make[1]: Leaving directory `/bzflag/package'
Making all in src
make[1]: Entering directory `/bzflag/src'
Making all in c-ares
make[2]: Entering directory `/bzflag/src/c-ares'
gcc -c  -g -O2   -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKA                             GE_BUGREPORT=\"\"  ares__close_sockets.c
gcc -c  -g -O2   -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKA                             GE_BUGREPORT=\"\"  ares__get_hostent.c
gcc -c  -g -O2   -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKA                             GE_BUGREPORT=\"\"  ares__read_line.c
gcc -c  -g -O2   -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKA                             GE_BUGREPORT=\"\"  ares_destroy.c
gcc -c  -g -O2   -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKA                             GE_BUGREPORT=\"\"  ares_expand_name.c
gcc -c  -g -O2   -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKA                             GE_BUGREPORT=\"\"  ares_fds.c
gcc -c  -g -O2   -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKA                             GE_BUGREPORT=\"\"  ares_free_hostent.c
gcc -c  -g -O2   -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKA                             GE_BUGREPORT=\"\"  ares_free_string.c
gcc -c  -g -O2   -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKA                             GE_BUGREPORT=\"\"  ares_gethostbyaddr.c
gcc -c  -g -O2   -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKA                             GE_BUGREPORT=\"\"  ares_gethostbyname.c
gcc -c  -g -O2   -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKA                             GE_BUGREPORT=\"\"  ares_init.c
ares_init.c: In function `get_res_size_nt':
ares_init.c:234: warning: passing arg 6 of `RegQueryValueExA' from incompatible pointer type
ares_init.c: In function `get_res_nt':
ares_init.c:245: warning: passing arg 6 of `RegQueryValueExA' from incompatible pointer type
ares_init.c:250: warning: passing arg 6 of `RegQueryValueExA' from incompatible pointer type
ares_init.c: In function `get_res_interfaces_nt':
ares_init.c:270: warning: passing arg 4 of `RegEnumKeyExA' from incompatible pointer type
gcc -c  -g -O2   -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKA                             GE_BUGREPORT=\"\"  ares_mkquery.c
gcc -c  -g -O2   -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKA                             GE_BUGREPORT=\"\"  ares_parse_a_reply.c
gcc -c  -g -O2   -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKA                             GE_BUGREPORT=\"\"  ares_parse_ptr_reply.c
gcc -c  -g -O2   -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKA                             GE_BUGREPORT=\"\"  ares_process.c
ares_process.c: In function `open_tcp_socket':
ares_process.c:463: warning: passing arg 3 of `ioctlsocket' from incompatible pointer type
gcc -c  -g -O2   -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKA                             GE_BUGREPORT=\"\"  ares_query.c
gcc -c  -g -O2   -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKA                             GE_BUGREPORT=\"\"  ares_search.c
gcc -c  -g -O2   -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKA                             GE_BUGREPORT=\"\"  ares_send.c
gcc -c  -g -O2   -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKA                             GE_BUGREPORT=\"\"  ares_strerror.c
gcc -c  -g -O2   -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKA                             GE_BUGREPORT=\"\"  ares_timeout.c
gcc -c  -g -O2   -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKA                             GE_BUGREPORT=\"\"  ares_version.c
gcc -c  -g -O2   -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKA                             GE_BUGREPORT=\"\"  ares_expand_string.c
gcc -c  -g -O2   -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKA                             GE_BUGREPORT=\"\"  ares_cancel.c
ar cru libcares.a ares__close_sockets.o ares__get_hostent.o ares__read_line.o ares_destroy.o ares_expand_name.o                              ares_fds.o ares_free_hostent.o ares_free_string.o ares_gethostbyaddr.o ares_gethostbyname.o ares_init.o ares_mkq                             uery.o ares_parse_a_reply.o ares_parse_ptr_reply.o ares_process.o ares_query.o ares_search.o ares_send.o ares_st                             rerror.o ares_timeout.o ares_version.o ares_expand_string.o ares_cancel.o
ranlib libcares.a
gcc -c  -g -O2   -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKA                             GE_BUGREPORT=\"\"  adig.c
gcc  -o adig adig.o libcares.a 
adig.o(.text+0x3be): In function `main':
H:/msys/1.0/bzflag/src/c-ares/adig.c:147: undefined reference to `WSAStartup@8'
adig.o(.text+0x5ed):H:/msys/1.0/bzflag/src/c-ares/adig.c:171: undefined reference to `gethostbyname@4'
adig.o(.text+0x76b):H:/msys/1.0/bzflag/src/c-ares/adig.c:267: undefined reference to `select@20'
adig.o(.text+0xf17): In function `display_rr':
H:/msys/1.0/bzflag/src/c-ares/adig.c:560: undefined reference to `inet_ntoa@4'
libcares.a(ares_process.o)(.text+0xa3): In function `write_tcp_data':
H:/msys/1.0/bzflag/src/c-ares/ares_process.c:83: undefined reference to `__WSAFDIsSet@8'
libcares.a(ares_process.o)(.text+0xcb):H:/msys/1.0/bzflag/src/c-ares/ares_process.c:144: undefined reference to                              `send@16'
libcares.a(ares_process.o)(.text+0x170): In function `read_tcp_data':
H:/msys/1.0/bzflag/src/c-ares/ares_process.c:182: undefined reference to `__WSAFDIsSet@8'
libcares.a(ares_process.o)(.text+0x1a1):H:/msys/1.0/bzflag/src/c-ares/ares_process.c:190: undefined reference to                              `recv@16'
libcares.a(ares_process.o)(.text+0x23d):H:/msys/1.0/bzflag/src/c-ares/ares_process.c:216: undefined reference to                              `recv@16'
libcares.a(ares_process.o)(.text+0x2c9): In function `read_udp_packets':
H:/msys/1.0/bzflag/src/c-ares/ares_process.c:254: undefined reference to `__WSAFDIsSet@8'
libcares.a(ares_process.o)(.text+0x303):H:/msys/1.0/bzflag/src/c-ares/ares_process.c:257: undefined reference to                              `recv@16'
libcares.a(ares_process.o)(.text+0x6dc): In function `ares__send_query':
H:/msys/1.0/bzflag/src/c-ares/ares_process.c:437: undefined reference to `send@16'
libcares.a(ares_process.o)(.text+0x782): In function `open_tcp_socket':
H:/msys/1.0/bzflag/src/c-ares/ares_process.c:455: undefined reference to `socket@12'
libcares.a(ares_process.o)(.text+0x7a4):H:/msys/1.0/bzflag/src/c-ares/ares_process.c:463: undefined reference to                              `ioctlsocket@12'
libcares.a(ares_process.o)(.text+0x7db):H:/msys/1.0/bzflag/src/c-ares/ares_process.c:485: undefined reference to                              `connect@12'
libcares.a(ares_process.o)(.text+0x801):H:/msys/1.0/bzflag/src/c-ares/ares_process.c:488: undefined reference to                              `closesocket@4'
libcares.a(ares_process.o)(.text+0x822): In function `open_udp_socket':
H:/msys/1.0/bzflag/src/c-ares/ares_process.c:502: undefined reference to `socket@12'
libcares.a(ares_process.o)(.text+0x865):H:/msys/1.0/bzflag/src/c-ares/ares_process.c:511: undefined reference to                              `connect@12'
libcares.a(ares_process.o)(.text+0x87e):H:/msys/1.0/bzflag/src/c-ares/ares_process.c:513: undefined reference to                              `closesocket@4'
libcares.a(ares_init.o)(.text+0x1d4): In function `ares_init_options':
H:/msys/1.0/bzflag/src/c-ares/ares_init.c:138: undefined reference to `ares_gettimeofday'
libcares.a(ares_init.o)(.text+0x9bf): In function `init_by_defaults':
H:/msys/1.0/bzflag/src/c-ares/ares_init.c:519: undefined reference to `gethostname@8'
libcares.a(ares_init.o)(.text+0xa78):H:/msys/1.0/bzflag/src/c-ares/ares_init.c:510: undefined reference to `hton                             l@4'
libcares.a(ares_init.o)(.text+0xa96):H:/msys/1.0/bzflag/src/c-ares/ares_init.c:502: undefined reference to `hton                             s@4'
libcares.a(ares_init.o)(.text+0xab6):H:/msys/1.0/bzflag/src/c-ares/ares_init.c:500: undefined reference to `hton                             s@4'
libcares.a(ares_init.o)(.text+0xce9): In function `config_nameserver':
H:/msys/1.0/bzflag/src/c-ares/ares_init.c:623: undefined reference to `inet_addr@4'
libcares.a(ares_init.o)(.text+0x1418): In function `ip_addr':
H:/msys/1.0/bzflag/src/c-ares/ares_init.c:800: undefined reference to `inet_addr@4'
libcares.a(ares_init.o)(.text+0x145e): In function `natural_mask':
H:/msys/1.0/bzflag/src/c-ares/ares_init.c:813: undefined reference to `ntohl@4'
libcares.a(ares_init.o)(.text+0x147e):H:/msys/1.0/bzflag/src/c-ares/ares_init.c:823: undefined reference to `hto                             nl@4'
libcares.a(ares__close_sockets.o)(.text+0x38): In function `ares__close_sockets':
H:/msys/1.0/bzflag/src/c-ares/ares__close_sockets.c:47: undefined reference to `closesocket@4'
libcares.a(ares__close_sockets.o)(.text+0x53):H:/msys/1.0/bzflag/src/c-ares/ares__close_sockets.c:52: undefined                              reference to `closesocket@4'
make[2]: *** [adig] Error 1
make[2]: Leaving directory `/bzflag/src/c-ares'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/bzflag/src'
make: *** [all-recursive] Error 1

I was able to successfully compile from CVS prior to the addition of c-ares a couple of days ago.

I can submit an official bug report if necessary, but I'd like to make sure this isn't a "me" problem first :)
User avatar
Lan
Private First Class
Private First Class
Posts: 296
Joined: Sun Jun 13, 2004 1:21 am
Contact:

Post by Lan »

There is no need for libcares.a, the c-ares files with bzflag in the c-ares folder are good enough. Taking out the inclusion of this library file, libcares.a, most likely would eliminate the linking errors as long as the C-ares files included in bzflag are being compiled in with the BZFlag project.
Post Reply