cURL / Mailing Lists / curl-library / Single Mail

curl-library

Problems compiling libcurl-7-37-1 with c-ares DNS lookup.

From: Spork Schivago <sporkschivago_at_gmail.com>
Date: Thu, 24 Jul 2014 18:56:38 -0400

I am trying to cross-compile libcurl-7.37.1 using c-ares for DNS lookup.
I have the latest version c-ares installed. I do not want to use IPv6.
When I run configure for libcurl, it shows that IPv6 will be disabled,
however, when I try to compile, I receive the following error message:

../../lib/asyn-ares.c: In function 'Curl_set_dns_local_ip6':
../../lib/asyn-ares.c:673:20: error: 'INET6_ADDRSTRLEN' undeclared (first
use in this function)
   unsigned char a6[INET6_ADDRSTRLEN];
                    ^
../../lib/asyn-ares.c:673:20: note: each undeclared identifier is reported
only once for each function it appears in
../../lib/asyn-ares.c:673:17: warning: unused variable 'a6'
[-Wunused-variable]
   unsigned char a6[INET6_ADDRSTRLEN];

These are my configure options:
  AR="${PS3DEV}/ppu/bin/powerpc64-ps3-elf-ar" \
  AS="${PS3DEV}/ppu/bin/powerpc64-ps3-elf-as" \
  CC="${PS3DEV}/ppu/bin/powerpc64-ps3-elf-gcc" \
  CPP="${PS3DEV}/ppu/bin/powerpc64-ps3-elf-gcc -E" \
  CXX="${PS3DEV}/ppu/bin/powerpc64-ps3-elf-g++" \
  CXXCPP="${PS3DEV}/ppu/bin/powerpc64-ps3-elf-g++ -E" \
  LD="${PS3DEV}/ppu/bin/powerpc64-ps3-elf-ld" \
  NM="${PS3DEV}/ppu/bin/powerpc64-ps3-elf-nm" \
  RANLIB="${PS3DEV}/ppu/bin/powerpc64-ps3-elf-ranlib" \
  CFLAGS="-O2 -Wall" \
  CXXFLAGS="-I${PSL1GHT}/ppu/include -I${PS3DEV}/portlibs/ppu/include" \
  CPPFLAGS="-I${PSL1GHT}/ppu/include -I${PS3DEV}/portlibs/ppu/include
-I${PSL1GHT}/ppu/include/net" \
  LDFLAGS="-L${PSL1GHT}/ppu/lib -L${PS3DEV}/portlibs/ppu/lib" \
  LIBS="-lnet -lsysutil -lsysmodule -lm" \
  PKG_CONFIG_LIBDIR="${PS3DEV}/portlibs/ppu/lib/pkgconfig" \
  PKG_CONFIG_PATH="${PS3DEV}/portlibs/ppu/lib/pkgconfig" \
  ../configure --prefix="${PS3DEV}/portlibs/ppu" --host="powerpc64-ps3-elf"
\
  --without-ssl --with-polarssl="${PS3DEV}/portlibs/ppu/include/polarssl" \
  --enable-ares="${PS3DEV}/portlibs/ppu/include"
--includedir="${PS3DEV}/portlibs/ppu/include" \
  --libdir="${PS3DEV}/portlibs/ppu/lib" --with-ca-bundle="${CA_CERT}"

The variables PS3DEV is set to /usr/local/ps3dev
PSL1GHT is set to /usr/local/ps3dev/psl1ght
CA_CERT is set to /usr/ssl/certs/ca-bundle.crt

Does anyone have any suggestions on how I can get libcurl to build
successfully using C-ARES for the DNS lookup and using IPv4 only, not
IPv6? Any help would be greatly appreciated. Thank you.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-07-25