Subject: Re: Pkgs checking for IPv6 .. (and getting it wrong)
To: Martin S. Weber <>
From: Greg Troxel <>
List: pkgsrc-users
Date: 09/12/2007 19:59:42
MKINET6=no removes v6 from the system tools, but it won't hide the
headers, so other programs that aren't part of base will compile to try
v6.  I am not aware of any facility to change the API to remove v6, and
we don't in general have facilities to hide parts of the API.

Omitting v6 support in pkgsrc is separate -- and should be, by the
principle that pkgsrc builds are repeatable and binary packages usable
on other machines.

  I'm having a 4.0 RC 1 (and a -current 4.99.31) without IPv6
  support, i.e. built with -V MKINET6=no ( Now I have
  packages (like e.g. net/ORBit2) which check for usability of
  IPv6 via #ifdef AF_INET6 .

  Is this correct for them to do so? I.e. I have to put more
  inet6 - related variables into to make AF_INET6 disappear,

No - there is no support for AF_INET6 to disappear from the namespace.

  Furthermore PKG_DEFAULT_OPTIONS=-inet6 gets ignored but ok...

No, that really is the only bug.  These packages should have an to respect inet6, and they don't.  MKINET6=no and your kernel
are irrelevant to the desired behavior and the missing code.

  Who's wrong here (besides me, the bad bad bad user who doesn't want
  ipv6 support) - the build system or the package checks ?

The packages are just missing options.  Probably the lack of inet6
option doesn't bother most people, so it hasn't been addressed.  So the
answer to your mail is probably simply ENOPATCH!

It might be useful to have an that declares the option and adds
a standard configure switch if negative. But that may need structural
changes to the option framework.

If you're really adventurous you could modify headers to make AF_INET6
cause a syntax error and do a bulk build.  But it would probably be
easier for you to learn to love IPv6 than to do that...