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

Bug 665164

Summary: net-misc/iputils-20180629 fails to build with USE="-idn" on musl as AI_CANONIDN is assumed to be present unconditionally.
Product: Gentoo Linux Reporter: Sven E. <dark>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    

Description Sven E. 2018-09-03 13:49:49 UTC
Building net-misc/iputils-20180629 on musl fails, as the source uses AI_CANONIDN, independently of the USE flag.

Reproducible: Always

Steps to Reproduce:
1.try to build iputils on musl

Actual Results:  
build error

Expected Results:  
clean build

from ping.h:
#ifdef USE_IDN
#include <idn2.h>

#ifndef AI_IDN
#define AI_IDN 0x0040
#endif
#ifndef AI_CANONIDN
#define AI_CANONIDN 0x0080
#endif
#ifndef NI_IDN
#define NI_IDN 32
#endif

So AI_CANONIDN is only defined for USE=IDN, but in pinc.c:

#ifdef USE_IDN
        setlocale(LC_ALL, "");
#endif
        if (!strcmp(setlocale(LC_ALL, NULL), "C"))
                hints.ai_flags &= ~ AI_CANONIDN;


AI_CANONIDN is used unconditionally.
Comment 1 Marco Genasci 2018-10-01 08:25:47 UTC
Possible upstream patch [1]

[1] https://github.com/iputils/iputils/commit/25899e849aa3abc1ad29ebf0b830262a859eaed5
Comment 2 Larry the Git Cow gentoo-dev 2018-10-01 18:00:37 UTC
The bug has been closed via the following commit(s):

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

commit 7e5d313104a13e24ef704f176618dcb63dc87209
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2018-10-01 18:00:17 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2018-10-01 18:00:17 +0000

    net-misc/iputils: fix build on musl when USE=-idn
    
    Closes: https://bugs.gentoo.org/665164
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
    Package-Manager: Portage-2.3.50, Repoman-2.3.11

 .../files/iputils-20180629-fix-ping-on-musl.patch  | 54 ++++++++++++++++++++++
 net-misc/iputils/iputils-20180629.ebuild           |  3 +-
 2 files changed, 56 insertions(+), 1 deletion(-)