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

Bug 692768

Summary: sys-auth/libnss-nis-1.4 : /.../nis-hosts.c:235:21: error: RES_USE_INET6 undeclared (first use in this function)
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED FIXED    
Severity: normal Keywords: PullRequest
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/14691
https://bugs.gentoo.org/show_bug.cgi?id=691846
Whiteboard: ~arch only
Package list:
Runtime testing required: ---
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.portage.tbz2
logs.tbz2
sys-auth:libnss-nis-1.4:20190823-024421.log
temp.tbz2

Description Toralf Förster gentoo-dev 2019-08-23 15:42:20 UTC
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/sys-auth/libnss-nis-1.4/work/libnss_nis-1.4/src -I.. -I/var/tmp/portage/sys-auth/libnss-nis-1.4/work/libnss_nis-1.4/src -I/usr/include/tirpc -I/usr/include/tirpc -D_REENTRANT=1 -O2 -pipe -march=native -c /var/tmp/portage/sys-auth/libnss-nis-1.4/work/libnss_nis-1.4/src/nis-hosts.c  -fPIC -DPIC -o .libs/nis-hosts.o
/var/tmp/portage/sys-auth/libnss-nis-1.4/work/libnss_nis-1.4/src/nis-hosts.c: In function ‘_nss_nis_gethostent_r’:
/var/tmp/portage/sys-auth/libnss-nis-1.4/work/libnss_nis-1.4/src/nis-hosts.c:235:21: error: ‘RES_USE_INET6’ undeclared (first use in this function)
  235 |    ((_res.options & RES_USE_INET6) ? AF_INET6 : AF_INET),
      |                     ^~~~~~~~~~~~~
/var/tmp/portage/sys-auth/libnss-nis-1.4/work/libnss_nis-1.4/src/nis-hosts.c:235:21: note: each undeclared identifier is reported only once for each function it appears in

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_no-multilib-libressl-20190818-105204

  -------------------------------------------------------------------

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

Available Python interpreters, in order of preference:
  [1]   python3.6
  [2]   python2.7 (fallback)
  [3]   pypy (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.37.0 *



emerge -qpvO sys-auth/libnss-nis
[ebuild  N    ] sys-auth/libnss-nis-1.4
Comment 1 Toralf Förster gentoo-dev 2019-08-23 15:42:23 UTC
Created attachment 587842 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2019-08-23 15:42:25 UTC
Created attachment 587844 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2019-08-23 15:42:28 UTC
Created attachment 587846 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2019-08-23 15:42:31 UTC
Created attachment 587848 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2019-08-23 15:42:34 UTC
Created attachment 587850 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2019-08-23 15:42:36 UTC
Created attachment 587852 [details]
sys-auth:libnss-nis-1.4:20190823-024421.log
Comment 7 Toralf Förster gentoo-dev 2019-08-23 15:42:39 UTC
Created attachment 587854 [details]
temp.tbz2
Comment 8 Sergei Trofimovich (RETIRED) gentoo-dev 2019-08-23 20:36:08 UTC
RES_USE_INET6 was deprecated a while ago:
    https://sourceware.org/bugzilla/show_bug.cgi?id=19582

And was removed in glibc-2.30:
    https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=3f8b44be0a658266adff5ece1e4bc3ce097a5dbe
Comment 9 Jason Chan 2019-11-23 00:18:53 UTC
I can compile glibc fine with [-custom-cflags]. With custom flags, after the install phase everything fails complaining "ebuild-ipc: daemon process not detected". This renders my system in an unusable state since emerge is broken. I keep a quickpkg'd glibc at my root directory and decompress it when this happens.

Not sure why custom flags breaks it now. It's still the same package revision, same flags.

 * Call stack:
 *          ebuild.sh, line  125:  Called pkg_postinst
 *        environment, line 3556:  Called has_version 'sys-auth/libnss-nis'
 *   phase-helpers.sh, line  929:  Called ___best_version_and_has_version_common 'sys-auth/libnss-nis'
 *   phase-helpers.sh, line  910:  Called die
 * The specific snippet of code:
 *                      die "${FUNCNAME[1]}: invalid atom: ${atom}"

I didn't have sys-auth/libnss-nis installed, nor has it been a dep to my knowledge. I renamed the current ebuild to libnss-nis-3.1.ebuild since that release's commit states:

Remove usage of RES_USE_INET6 (glibc 2.30 adjustment)

However, the problem still remains when using custom-cflags.
Comment 10 Sergei Trofimovich (RETIRED) gentoo-dev 2019-11-23 01:45:55 UTC
(In reply to Jason Chan from comment #9)
> I can compile glibc fine with [-custom-cflags]. With custom flags, after the
> install phase everything fails complaining "ebuild-ipc: daemon process not
> detected". This renders my system in an unusable state since emerge is
> broken. I keep a quickpkg'd glibc at my root directory and decompress it
> when this happens.
> 
> Not sure why custom flags breaks it now. It's still the same package
> revision, same flags.
> 
>  * Call stack:
>  *          ebuild.sh, line  125:  Called pkg_postinst
>  *        environment, line 3556:  Called has_version 'sys-auth/libnss-nis'
>  *   phase-helpers.sh, line  929:  Called
> ___best_version_and_has_version_common 'sys-auth/libnss-nis'
>  *   phase-helpers.sh, line  910:  Called die
>  * The specific snippet of code:
>  *                      die "${FUNCNAME[1]}: invalid atom: ${atom}"
> 
> I didn't have sys-auth/libnss-nis installed, nor has it been a dep to my
> knowledge. I renamed the current ebuild to libnss-nis-3.1.ebuild since that
> release's commit states:
> 
> Remove usage of RES_USE_INET6 (glibc 2.30 adjustment)
> 
> However, the problem still remains when using custom-cflags.

Please file a separate bug.
Comment 11 Jason Chan 2019-11-23 04:04:22 UTC
(In reply to Sergei Trofimovich from comment #10)
> Please file a separate bug.

I have. 

https://bugs.gentoo.org/700958

I was receiving the same fatal error as the original post prior to upgrading. Shouldn't a fixed version of sys-auth/libnss-nis be relevant to this issue?
Comment 12 Sergei Trofimovich (RETIRED) gentoo-dev 2019-11-23 10:28:38 UTC
(In reply to Jason Chan from comment #11)
> (In reply to Sergei Trofimovich from comment #10)
> > Please file a separate bug.
> 
> I have. 
> 
> https://bugs.gentoo.org/700958
> 
> I was receiving the same fatal error as the original post prior to
> upgrading. Shouldn't a fixed version of sys-auth/libnss-nis be relevant to
> this issue?

Your #c9 comment was about glibc build failure. Please file a separate bug about that. This bug is about libnss-nis build failure.
Comment 13 Stephan Hartmann (RETIRED) gentoo-dev 2020-02-17 20:01:18 UTC
Upstream patch:

https://github.com/thkukuk/libnss_nis/commit/e9f0f4286d5a923eca1a9c84ff125268d144
822e#diff-9f39fe8fd105099998187d3aec710e1c
Comment 14 Larry the Git Cow gentoo-dev 2020-02-18 15:03:17 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5fcf67ae6a2b338b367b8efc2869ba4466fc6fa

commit d5fcf67ae6a2b338b367b8efc2869ba4466fc6fa
Author:     Stephan Hartmann <stha09@googlemail.com>
AuthorDate: 2020-02-18 14:33:16 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-02-18 15:03:11 +0000

    sys-auth/libnss-nis: fix build with glibc 2.30
    
    Closes: https://bugs.gentoo.org/692768
    Package-Manager: Portage-2.3.84, Repoman-2.3.20
    Signed-off-by: Stephan Hartmann <stha09@googlemail.com>
    Closes: https://github.com/gentoo/gentoo/pull/14691
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 .../files/libnss-nis-1.4-glibc-2.30.patch          | 157 +++++++++++++++++++++
 sys-auth/libnss-nis/libnss-nis-1.4.ebuild          |   4 +-
 2 files changed, 160 insertions(+), 1 deletion(-)