Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 665164 - net-misc/iputils-20180629 fails to build with USE="-idn" on musl as AI_CANONIDN is assumed to be present unconditionally.
Summary: net-misc/iputils-20180629 fails to build with USE="-idn" on musl as AI_CANONI...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
Depends on:
Blocks: musl-porting
  Show dependency tree
Reported: 2018-09-03 13:49 UTC by Sven E.
Modified: 2018-10-01 18:00 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
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
#define AI_CANONIDN 0x0080
#ifndef NI_IDN
#define NI_IDN 32

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

#ifdef USE_IDN
        setlocale(LC_ALL, "");
        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]

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):

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

    net-misc/iputils: fix build on musl when USE=-idn
    Signed-off-by: Thomas Deutschmann <>
    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(-)