Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 691692

Summary: mail-filter/libmilter-1.0.2 : sm_gethost.c:58:18: error: RES_USE_INET6 undeclared (first use in this function)
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: No maintainer - Look at if you want to take care of it <maintainer-needed>
Severity: normal CC: che, sping
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 691846    
Attachments: emerge-info.txt

Description Toralf Förster gentoo-dev 2019-08-07 17:10:31 UTC
                 from sm_gethost.c:14:
sm_gethost.c: In function ‘sm_getipnodebyname’:
sm_gethost.c:58:18: error: ‘RES_USE_INET6’ undeclared (first use in this function)
   58 |   resv6 = bitset(RES_USE_INET6, _res.options);
      |                  ^~~~~~~~~~~~~
../../include/sm/bitops.h:55:40: note: in definition of macro ‘bitset’


  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_no-multilib_hardened-20190805-211951


gcc-config -l:
 [1] x86_64-pc-linux-gnu-9.1.0 *

Available Python interpreters, in order of preference:
  [1]   python3.6
  [2]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems) *

emerge -qpvO mail-filter/libmilter
--- Invalid atom in /etc/portage/package.accept_keywords/00unstable: sys-libs/glibc-2.30
Comment 1 Toralf Förster gentoo-dev 2019-08-07 17:10:33 UTC
Created attachment 586000 [details]
Comment 2 Toralf Förster gentoo-dev 2019-08-07 17:10:36 UTC
Created attachment 586002 [details]
Comment 3 Toralf Förster gentoo-dev 2019-08-07 17:10:39 UTC
Created attachment 586004 [details]
Comment 4 Toralf Förster gentoo-dev 2019-08-07 17:10:42 UTC
Created attachment 586006 [details]
Comment 5 Toralf Förster gentoo-dev 2019-08-07 17:10:45 UTC
Created attachment 586008 [details]
Comment 6 Hanno Böck gentoo-dev 2019-11-09 11:01:47 UTC
I had a quick look, this is a glibc 2.30 incompatibility, RES_USE_INET6 is a deprecated feature. This seems to be fixed in latest sendmail.

Unfortunately I don't find an upstream repo to cherry-pick the commit.

Also the version of libmilter seems to be a bit of a mess, our current version which is taken from sendmail 8.14.5 is 1.0.2, yet the current version from sendmail 8.15.2 is also version 1.0.2. I.e. they seem to have stopped increasing the version number despite making code changes.
Comment 7 Hanno Böck gentoo-dev 2019-11-14 18:06:53 UTC
Have to correct myself, this seems to be *not* fixed in the latest sendmail.

However I found a patch from opensuse:

I have created an updated ebuild, but I'm a bit wary to commit it. I removed libmilter-build-system.patch, because it doesn't apply to the latest version. It's unclear to me what this patch exactly is supposed to do, it's doing a bunch of changes to the build system. It's not documented and I even don't know who committed it (it's inherited from CVS and was added to git with the initial commit).

In any case: Attaching the ebuild + reduced patch here.
Comment 8 Hanno Böck gentoo-dev 2019-11-14 18:07:27 UTC
Created attachment 596156 [details]
Comment 9 Hanno Böck gentoo-dev 2019-11-14 18:07:47 UTC
Created attachment 596158 [details, diff]
Comment 10 Sebastian Pipping gentoo-dev 2019-11-14 22:09:24 UTC
Patch libmilter-build-system.patch is close to identical to sendmail-8.14.6-build-system.patch of mail-mta/sendmail and they both seem to do three things:

1) It drops this:
     ifdef(`confMT', ifdef(`confMTLDOPTS', `confMTLDOPTS', `'), `')

   Variable confMTLDOPTS is set to -lpthread or -pthread
   if confMT is defined.  File libmilter/Makefile.m4 sets
   define(`confMT', `true') so this seems to drop some pthread
   link flags for libmilter and that only.
   Dropping at worst will get us link errors that we'll be able
   to fix on report.  Maybe this is from the pre-as-needed area?

2) Drop
   at two places to fix directory creation when installing to
   and empty DESTDIR: The path in the call to install(1) is right,
   the path in the call to mkdir(1) is not.

3) Add quotes to use of ${DESTDIR} .
   That seems good and needed, I re-checked that make does not
   auto-quote things for us:

# make -f <(echo $'target:\n\t@echo "   with: [$(VAR)]"\n\t@echo without: [$(VAR)]') VAR='one  two'
   with: [one  two]
without: [one two]
Comment 11 Larry the Git Cow gentoo-dev 2019-11-16 07:32:42 UTC
The bug has been closed via the following commit(s):

commit 9d467a0e64ef635873702cecbf8f614b164a6907
Author:     Hanno Böck <>
AuthorDate: 2019-11-16 07:32:31 +0000
Commit:     Hanno Böck <>
CommitDate: 2019-11-16 07:32:31 +0000

    mail-filter/libmilter: Bump and glibc 2.30 support
    Upstream versions aren't increased properly, so we have to
    make this a _p1 version.
    Newer build system patch from sendmail ebuild.
    Patch for glibc 2.30 support extracted from OpenSUSE.
    Signed-off-by: Hanno Böck <>
    Package-Manager: Portage-2.3.79, Repoman-2.3.18

 mail-filter/libmilter/Manifest                     |   1 +
 .../libmilter/files/libmilter-glibc-2.30.patch     |  25 +++
 .../files/sendmail-8.14.6-build-system.patch       | 211 +++++++++++++++++++++
 mail-filter/libmilter/libmilter-1.0.2_p1.ebuild    |  72 +++++++
 4 files changed, 309 insertions(+)