Summary: | net-misc/iputils[idn] doesn't fully work on musl | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Pierre-Olivier Mercier <nemunaire> |
Component: | Current packages | Assignee: | Gentoo musl team <musl> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gentoo, herrtimson |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Pierre-Olivier Mercier
2017-01-03 19:45:56 UTC
Could you try version from: https://github.com/iputils/iputils ? tl;dr: yes, same behavior with musl-1.1.16. Without any patch, I got: armv7a-hardfloat-linux-musleabi-gcc -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -fno-strict-aliasing -Wstrict-prototypes -Wall -D_GNU_SOURCE -c ping_common.c -DCAPABILITIES -DUSE_IDN -DUSE_OPENSSL -o ping_common.o In file included from ping.c:56:0: ping.c: In function ‘main’: ping.h:41:43: error: ‘AI_IDN’ undeclared (first use in this function) #define getaddrinfo_flags (AI_CANONNAME | AI_IDN | AI_CANONIDN) ^ ping.c:204:119: note: in expansion of macro ‘getaddrinfo_flags’ struct addrinfo hints = { .ai_family = AF_UNSPEC, .ai_protocol = IPPROTO_UDP, .ai_socktype = SOCK_DGRAM, .ai_flags = getaddrinfo_flags }; ^ ping.h:41:43: note: each undeclared identifier is reported only once for each function it appears in #define getaddrinfo_flags (AI_CANONNAME | AI_IDN | AI_CANONIDN) ^ ping.c:204:119: note: in expansion of macro ‘getaddrinfo_flags’ struct addrinfo hints = { .ai_family = AF_UNSPEC, .ai_protocol = IPPROTO_UDP, .ai_socktype = SOCK_DGRAM, .ai_flags = getaddrinfo_flags }; ^ ping.h:41:52: error: ‘AI_CANONIDN’ undeclared (first use in this function) #define getaddrinfo_flags (AI_CANONNAME | AI_IDN | AI_CANONIDN) ^ ping.c:204:119: note: in expansion of macro ‘getaddrinfo_flags’ struct addrinfo hints = { .ai_family = AF_UNSPEC, .ai_protocol = IPPROTO_UDP, .ai_socktype = SOCK_DGRAM, .ai_flags = getaddrinfo_flags }; ^ ping.c: In function ‘ping4_run’: ping.h:41:43: error: ‘AI_IDN’ undeclared (first use in this function) #define getaddrinfo_flags (AI_CANONNAME | AI_IDN | AI_CANONIDN) ^ ping.c:546:103: note: in expansion of macro ‘getaddrinfo_flags’ static const struct addrinfo hints = { .ai_family = AF_INET, .ai_protocol = IPPROTO_UDP, .ai_flags = getaddrinfo_flags }; ^ ping.h:41:52: error: ‘AI_CANONIDN’ undeclared (first use in this function) #define getaddrinfo_flags (AI_CANONNAME | AI_IDN | AI_CANONIDN) ^ ping.c:546:103: note: in expansion of macro ‘getaddrinfo_flags’ static const struct addrinfo hints = { .ai_family = AF_INET, .ai_protocol = IPPROTO_UDP, .ai_flags = getaddrinfo_flags }; ^ ping.c: In function ‘pr_addr’: ping.h:42:27: error: ‘NI_IDN’ undeclared (first use in this function) #define getnameinfo_flags NI_IDN ^ ping.c:1587:59: note: in expansion of macro ‘getnameinfo_flags’ getnameinfo(sa, salen, address, sizeof address, NULL, 0, getnameinfo_flags | NI_NUMERICHOST); ^ make: *** [Makefile:138: ping.o] Error 1 make: *** Waiting for unfinished jobs.... With a patch similar to https://gitweb.gentoo.org/proj/musl.git/tree/net-misc/iputils/files/iputils-20150815-missing-AI_IDN-AI_CANONIDN-NI_IDN.patch, it compiles, but: # ping 1.2.3.4 ping: 1.2.3.4: Invalid flags # ping gentoo.org ping: gentoo.org: Invalid flags # ping -6 2001:470:ea4a:1:225:90ff:fe02:16e5 ping: 2001:470:ea4a:1:225:90ff:fe02:16e5: Invalid flags No problem when idn USE flag disabled. We have some patches for moving forward to libidn2 in progress, could it improve situation? https://github.com/iputils/iputils/pull/97 it also has to be slightly modified to compile at this moment (ping6_common.c) should be fixed in net-misc/iputils-20171016_pre Compilation of net-misc/iputils-20171016_pre[idn] works well now: no error. ATM, musl release is 1.1.18, and support for IDN is now expected for 1.1.20. Consequently, iputils are still unusable when compiled with idn USE flag, due to lack of support in musl: # ping 1.2.3.4 ping: 1.2.3.4: Invalid flags # ping gentoo.org ping: gentoo.org: Invalid flags # ping -6 2001:470:ea4a:1:225:90ff:fe02:16e5 ping: 2001:470:ea4a:1:225:90ff:fe02:16e5: Invalid flags Utils works as expected with idn USE flag disabled: IPs and non-IDN domains respond. I've masked it for now. If I forget, ping me when musl-1.1.20 lands and I'll remove the mask. (In reply to Anthony Basile from comment #6) > I've masked it for now. If I forget, ping me when musl-1.1.20 lands and > I'll remove the mask. Unfortunately emerging iputils fails: ping.c:212:23: error: ‘AI_CANONIDN’ undeclared (first use in this function); did you mean ‘AI_CANONNAME’? hints.ai_flags &= ~ AI_CANONIDN; ^~~~~~~~~~~ AI_CANONNAME Looks like there's some conditional compilation magic missing. This should work again once a release is issued with the commit in https://github.com/iputils/iputils/pull/138 @Sven and Nicholas: were you already using the new musl-1.1.20 by the time of writing this? (In reply to tt_1 from comment #9) > @Sven and Nicholas: were you already using the new musl-1.1.20 by the time > of writing this? I was still on musl-1.1.19. |