[not sure if this is a user-@ or devel-@ topic -- the last/only ipv6
discussion I saw was to -users, so when you respond, please choose the
appropriate]

All:

The GNU autoconf macro below is what we use to test for IPv6 in 1.38.10.
It tries simply to instantiate a number of ipv6 structures.

However, on my platform (NetBSD/sparc 3_STABLE), it seems that it's
possible to confuse or mitigate/bypass this test ( I haven't tested
OpenBSD/FreeBSD for his behavior yet, because I know NetBSD does some
special IPV4 to IPV6 address mapping, and has some special IPV6
sysctls).

The IPV6 netinet6 socket family includes can be  in
/usr/include/netinet6 , configure will find them, compile conftest.c
just fine, and pass this test, however the system can be built without
IPV6 support (removed from all of the userland binaries) and the Kernel.

The result is that Bacula compiles and links against IPV6 headers fine,
but when it runs, it fails to compile later on during the build:

==> Entering
directory /usr/pkgsrc/sysutils/bacula-clientonly/work/bacula-1.38.10/src/console

[....SNIP....]

/usr/pkgsrc/sysutils/bacula-clientonly/work/.wrapper/bin/c++ -L/usr/lib
-Wl,-R/usr/lib -pthread -Wl,-R/usr/pkg/lib  -L../lib -L../cats -o
bconsole console.o console_conf.o authenticate.o conio.o   -ltermcap
-lbac -lm -pthread  -lintl   

../lib/libbac.a(address_conf.o)(.text+0x35c): In function
`IPADDR::set_addr_any()':
: undefined reference to `in6addr_any'
../lib/libbac.a(address_conf.o)(.text+0x360): In function
`IPADDR::set_addr_any()':
: undefined reference to `in6addr_any'
../lib/libbac.a(address_conf.o)(.text+0x364): In function
`IPADDR::set_addr_any()':
: undefined reference to `in6addr_any'
*** Error code 1

The work around is to interrupt the build process and manually define
HAVE_INET6 0 in src/config.h in the mean time.

So what we may need  to do is:

A) A more-aggressive ipv6 support test.  
B) A --without-ipv6 or --disable-ipv6 argument that explicity defines
   "HAVE_IPV6 0"
C) Or I may need to put a work-around in place for NetBSD (Bad)


The way some packages do it (Zebra) is:

# Check whether --enable-ipv6 or --disable-ipv6 was given.
if test "${enable_ipv6+set}" = set; then
  enableval="$enable_ipv6"
fi;

----- MACRO ----

echo "$as_me:$LINENO: checking for IPv6 support" >&5
echo $ECHO_N "checking for IPv6 support... $ECHO_C" >&6
if test "${ac_cv_ipv6_support+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
 #include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
int
main ()
{
struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s;
t.s6_addr[0] =
 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -z "$ac_c_werror_flag"
                         || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_ipv6_support=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_ipv6_support=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
cat >>confdefs.h <<\_ACEOF
#define HAVE_IPV6 1
_ACEOF

fi


-- 
Brian A. Seklecki <[EMAIL PROTECTED]>
Collaborative Fusion, Inc.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to