Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 551608 - net-misc/iputils-20121221-r1 fails to build on armv7-hardened-musl
Summary: net-misc/iputils-20121221-r1 fails to build on armv7-hardened-musl
Status: RESOLVED DUPLICATE of bug 503914
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo musl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-09 22:30 UTC by Michael Jones
Modified: 2016-06-02 17:28 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Jones 2015-06-09 22:30:17 UTC
This bug should be made a blocker of : https://bugs.gentoo.org/show_bug.cgi?id=430702

And assigned to blueness@gentoo.org


ymir portage # zcat net-misc/iputils-20121221-r1/temp/build.log.gz 
 * Package:    net-misc/iputils-20121221-r1
 * Repository: gentoo
 * Maintainer: base-system@gentoo.org
 * USE:        arm elibc_musl filecaps ipv6 kernel_linux ssl userland_GNU
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking iputils-s20121221.tar.bz2 to /var/tmp/portage/net-misc/iputils-20121221-r1/work
>>> Unpacking iputils-s20121221-manpages.tar.bz2 to /var/tmp/portage/net-misc/iputils-20121221-r1/work
>>> Source unpacked in /var/tmp/portage/net-misc/iputils-20121221-r1/work
>>> Preparing source in /var/tmp/portage/net-misc/iputils-20121221-r1/work/iputils-s20121221 ...
 * Applying 021109-uclibc-no-ether_ntohost.patch ...
 [ ok ]
 * Applying iputils-20121221-openssl.patch ...
 [ ok ]
 * Applying iputils-20121221-crypto-build.patch ...
 [ ok ]
 * Applying iputils-20100418-so_mark.patch ...
 [ ok ]
 * Applying iputils-20121221-makefile.patch ...
 [ ok ]
 * Applying iputils-20121221-printf-size.patch ...
 [ ok ]
 * Applying iputils-20121221-owl-pingsock.diff ...
 [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/net-misc/iputils-20121221-r1/work/iputils-s20121221 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/net-misc/iputils-20121221-r1/work/iputils-s20121221 ...
make -j10 USE_CAP=no USE_IDN=no USE_GNUTLS=no USE_CRYPTO=yes 
fatal: Not a git repository (or any of the parent directories): .git
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 tracepath.c  -o tracepath.o
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.c    -o ping.o
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   -o ping_common.o
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 clockdiff.c  -o clockdiff.o
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 rdisc.c  -o rdisc.o
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 arping.c     -o arping.o
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 tftpd.c  -o tftpd.o
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 tftpsubs.c  -o tftpsubs.o
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 rarpd.c  -o rarpd.o
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 tracepath6.c  -o tracepath6.o
In file included from arping.c:19:0:
/usr/include/sys/signal.h:1:2: warning: #warning redirecting incorrect #include <sys/signal.h> to <signal.h> [-Wcpp]
In file included from ping_common.h:10:0,
                 from ping.c:61:
/usr/include/sys/signal.h:1:2: warning: #warning redirecting incorrect #include <sys/signal.h> to <signal.h> [-Wcpp]
In file included from ping_common.h:10:0,
                 from ping_common.c:1:
/usr/include/sys/signal.h:1:2: warning: #warning redirecting incorrect #include <sys/signal.h> to <signal.h> [-Wcpp]
In file included from ping_common.h:14:0,
                 from ping.c:61:
/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
In file included from ping_common.h:14:0,
                 from ping_common.c:1:
/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
In file included from rarpd.c:22:0:
/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
In file included from rarpd.c:23:0:
/usr/include/sys/errno.h:1:2: warning: #warning redirecting incorrect #include <sys/errno.h> to <errno.h> [-Wcpp]
In file included from rarpd.c:24:0:
/usr/include/sys/fcntl.h:1:2: warning: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Wcpp]
In file included from rarpd.c:26:0:
/usr/include/sys/signal.h:1:2: warning: #warning redirecting incorrect #include <sys/signal.h> to <signal.h> [-Wcpp]
tracepath.c: In function ‘main’:
tracepath.c:326:16: error: ‘INT_MAX’ undeclared (first use in this function)
tracepath.c:326:16: note: each undeclared identifier is reported only once for each function it appears in
rdisc.c:124:9: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘.’ token
rdisc.c:129:8: error: redefinition of ‘struct icmp_ra_addr’
In file included from rdisc.c:49:0:
/usr/include/netinet/ip_icmp.h:72:8: note: originally defined here
In file included from ping.c:61:0:
ping_common.h:121:1: error: unknown type name ‘u_char’clockdiff.c:17:29: fatal error: protocols/timed.h: No such file or directory
compilation terminated.
Makefile:130: recipe for target 'clockdiff.o' failed
make: *** [clockdiff.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from ping_common.c:1:0:
ping_common.h:121:1: error: unknown type name ‘u_char’
ping.c:95:1: error: unknown type name ‘u_char’
ping.c:104:1: error: unknown type name ‘u_short’
ping.c:104:1: error: unknown type name ‘u_short’
ping.c:104:55: error: unknown type name ‘u_short’
ping.c: In function ‘main’:
ping.c:126:2: error: unknown type name ‘u_char’
rdisc.c: In function ‘pr_pack’:
rdisc.c:766:10: error: ‘struct icmp_ra’ has no member named ‘icmp_hun’
rdisc.c:773:10: error: ‘struct icmp_ra’ has no member named ‘icmp_hun’
rdisc.c:775:5: error: ‘struct icmp_ra’ has no member named ‘icmp_hun’
rdisc.c:775:5: error: ‘struct icmp_ra’ has no member named ‘icmp_hun’
rdisc.c:782:14: error: ‘struct icmp_ra’ has no member named ‘icmp_hun’tracepath6.c: In function ‘main’:
tracepath6.c:574:13: error: ‘INT_MAX’ undeclared (first use in this function)
tracepath6.c:574:13: note: each undeclared identifier is reported only once for each function it appears in
rdisc.c:782:36: error: ‘struct icmp_ra’ has no member named ‘icmp_hun’
rdisc.c:784:5: error: ‘struct icmp_ra’ has no member named ‘icmp_hun’
rdisc.c:784:5: error: ‘struct icmp_ra’ has no member named ‘icmp_hun’
rdisc.c:784:5: error: ‘struct icmp_ra’ has no member named ‘icmp_hun’
rdisc.c:784:5: error: ‘struct icmp_ra’ has no member named ‘icmp_hun’
rdisc.c:793:4: error: ‘struct icmp_ra’ has no member named ‘icmp_hun’
rdisc.c:793:4: error: ‘struct icmp_ra’ has no member named ‘icmp_hun’
rdisc.c:801:32: error: ‘struct icmp_ra’ has no member named ‘icmp_hun’
rdisc.c:804:5: error: ‘struct icmp_ra’ has no member named ‘icmp_hun’
rdisc.c:814:21: error: ‘struct icmp_ra’ has no member named ‘icmp_hun’
rarpd.c: In function ‘load_if’:
rarpd.c:104:17: error: ‘caddr_t’ undeclared (first use in this function)
rarpd.c:104:17: note: each undeclared identifier is reported only once for each function it appears in
rarpd.c:104:25: error: expected ‘;’ before ‘ibuf’
Makefile:130: recipe for target 'tracepath.o' failed
make: *** [tracepath.o] Error 1
ping.c:611:18: error: ‘u_char’ undeclared (first use in this function)
ping.c:611:18: note: each undeclared identifier is reported only once for each function it appears in
ping.c:611:26: error: expected expression before ‘)’ token
ping.c:623:2: warning: passing argument 2 of ‘main_loop’ from incompatible pointer type [enabled by default]ping_common.c: In function ‘fill’:
In file included from ping.c:61:0:
ping_common.h:280:13: note: expected ‘__u8 *’ but argument is of type ‘int *’

ping_common.c:208:2: error: unknown type name ‘u_char’
ping.c: In function ‘send_probe’:
ping.c:765:2: warning: implicit declaration of function ‘in_cksum’ [-Wimplicit-function-declaration]
ping.c:765:28: error: ‘u_short’ undeclared (first use in this function)
ping.c:765:37: error: expected expression before ‘)’ token
ping.c:771:38: error: expected expression before ‘)’ token
ping.c: In function ‘parse_reply’:
ping.c:850:23: error: ‘u_short’ undeclared (first use in this function)
ping.c:850:32: error: expected expression before ‘)’ token
ping.c: At top level:
ping.c:970:1: error: unknown type name ‘u_short’
ping.c:971:1: error: unknown type name ‘u_short’
ping.c:971:49: error: unknown type name ‘u_short’
ping_common.c: In function ‘setup’:
ping_common.c:671:3: error: unknown type name ‘u_char’
ping_common.c: In function ‘main_loop’:Makefile:130: recipe for target 'tracepath6.o' failed
make: *** [tracepath6.o] Error 1

ping_common.c:759:15: error: ‘HZ’ undeclared (first use in this function)
ping_common.c:759:15: note: each undeclared identifier is reported only once for each function it appears in
ping.c: In function ‘pr_iph’:
ping.c:1308:2: error: unknown type name ‘u_char’
ping.c:1311:8: error: ‘u_char’ undeclared (first use in this function)
ping.c:1311:16: error: expected expression before ‘)’ token
ping.c:1322:2: warning: passing argument 1 of ‘pr_options’ from incompatible pointer type [enabled by default]
ping.c:1152:6: note: expected ‘unsigned char *’ but argument is of type ‘int *’
ping_common.c: In function ‘gather_statistics’:
ping_common.c:958:10: error: ‘u_char’ undeclared (first use in this function)
ping_common.c:958:17: error: expected expression before ‘)’ token
ping_common.c:959:6: warning: assignment from incompatible pointer type [enabled by default]
ping_common.c:964:18: error: expected expression before ‘)’ token
Makefile:130: recipe for target 'rdisc.o' failed
make: *** [rdisc.o] Error 1
Makefile:130: recipe for target 'rarpd.o' failed
make: *** [rarpd.o] Error 1
Makefile:130: recipe for target 'ping_common.o' failed
make: *** [ping_common.o] Error 1
Makefile:130: recipe for target 'ping.o' failed
make: *** [ping.o] Error 1
 * ERROR: net-misc/iputils-20121221-r1::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=net-misc/iputils-20121221-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-misc/iputils-20121221-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/net-misc/iputils-20121221-r1/temp/build.log.gz'.
 * The ebuild environment file is located at '/var/tmp/portage/net-misc/iputils-20121221-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/net-misc/iputils-20121221-r1/work/iputils-s20121221'
 * S: '/var/tmp/portage/net-misc/iputils-20121221-r1/work/iputils-s20121221'


Reproducible: Always
Comment 1 Anthony Basile gentoo-dev 2015-06-10 11:33:09 UTC
1) The <sys/poll.h> -> <poll.h> changes need to be checked again.

https://gitweb.gentoo.org/proj/hardened-dev.git/tree/net-misc/iputils/files/iputils-20121221-fix-musl-headers.patch?h=musl


2) This one is ugly and hurts my brain :(  I'm not sure what to do with it

https://gitweb.gentoo.org/proj/hardened-dev.git/tree/net-misc/iputils/files/iputils-20121221-add-bits_types_h.patch?h=musl


3) Another painful patch.  I'm not sure how to more gracefully deal with !defined(__GLIBC__) since it captures musl which doesn't need struct icmp_ra and icmp_ra_addr

https://gitweb.gentoo.org/proj/hardened-dev.git/tree/net-misc/iputils/files/iputils-20121221-remove-rdisc-glibc-assumption.patch?h=musl

4) This can probably be dropped.  We should be able to deal with initilizers for structs.  (Was I using an older version of gcc when I made this patch?)

https://gitweb.gentoo.org/proj/hardened-dev.git/tree/net-misc/iputils/files/iputils-20121221-fix-init-elemnt.patch?h=musl


5) This should be checked for why the header order needs to be changed:

https://gitweb.gentoo.org/proj/hardened-dev.git/tree/net-misc/iputils/files/iputils-20121221-fix-header-order.patch?h=musl
Comment 2 Felix Janda 2015-06-17 17:28:00 UTC
There is a fork

http://article.gmane.org/gmane.linux.network/313484/match=iputils
https://github.com/iputils/iputils

grown out of frustration with upstream. It features musl support.
Comment 3 Anthony Basile gentoo-dev 2015-06-17 18:13:16 UTC
(In reply to Felix Janda from comment #2)
> There is a fork
> 
> http://article.gmane.org/gmane.linux.network/313484/match=iputils
> https://github.com/iputils/iputils
> 
> grown out of frustration with upstream. It features musl support.

This fork has come up in different contexts. I'm sure base-system knows about it.  We could add it as iputils-ng but I don't want to just polute the tree with packages.
Comment 4 SpanKY gentoo-dev 2015-06-17 20:16:39 UTC
i'm aware of the fork (i've sent them patches & issues), but there are no plans to switch to it or add an ebuild to support it
Comment 5 SpanKY gentoo-dev 2016-06-02 17:28:07 UTC

*** This bug has been marked as a duplicate of bug 503914 ***