Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 551616 - =sys-apps/iproute2-3.19.0 fails to compile on armv7a-hardened-musl
Summary: =sys-apps/iproute2-3.19.0 fails to compile on armv7a-hardened-musl
Status: RESOLVED FIXED
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: musl-porting
  Show dependency tree
 
Reported: 2015-06-09 22:51 UTC by Michael Jones
Modified: 2018-02-02 00:24 UTC (History)
1 user (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:51:20 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 sys-apps # zcat iproute2-3.19.0/temp/build.log.gz 
 * Package:    sys-apps/iproute2-3.19.0
 * Repository: gentoo
 * Maintainer: base-system@gentoo.org
 * USE:        arm elibc_musl iptables ipv6 kernel_linux userland_GNU
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking iproute2-3.19.0.tar.xz to /var/tmp/portage/sys-apps/iproute2-3.19.0/work
>>> Source unpacked in /var/tmp/portage/sys-apps/iproute2-3.19.0/work
>>> Preparing source in /var/tmp/portage/sys-apps/iproute2-3.19.0/work/iproute2-3.19.0 ...
 * Applying iproute2-3.1.0-mtu.patch ...
 [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-apps/iproute2-3.19.0/work/iproute2-3.19.0 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-apps/iproute2-3.19.0/work/iproute2-3.19.0 ...
make -j10 
make[1]: Entering directory '/var/tmp/portage/sys-apps/iproute2-3.19.0/work/iproute2-3.19.0/lib'
armv7a-hardfloat-linux-musleabi-gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wformat=2 -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard  -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/lib\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE -DHAVE_SETNS -fPIC   -c -o libgenl.o libgenl.c
armv7a-hardfloat-linux-musleabi-gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wformat=2 -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard  -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/lib\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE -DHAVE_SETNS -fPIC   -c -o ll_map.o ll_map.c
armv7a-hardfloat-linux-musleabi-gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wformat=2 -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard  -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/lib\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE -DHAVE_SETNS -fPIC   -c -o libnetlink.o libnetlink.c
armv7a-hardfloat-linux-musleabi-gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wformat=2 -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard  -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/lib\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE -DHAVE_SETNS -fPIC   -c -o utils.o utils.c
armv7a-hardfloat-linux-musleabi-gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wformat=2 -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard  -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/lib\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE -DHAVE_SETNS -fPIC   -c -o rt_names.o rt_names.c
armv7a-hardfloat-linux-musleabi-gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wformat=2 -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard  -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/lib\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE -DHAVE_SETNS -fPIC   -c -o ll_types.o ll_types.c
armv7a-hardfloat-linux-musleabi-gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wformat=2 -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard  -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/lib\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE -DHAVE_SETNS -fPIC   -c -o ll_proto.o ll_proto.c
armv7a-hardfloat-linux-musleabi-gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wformat=2 -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard  -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/lib\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE -DHAVE_SETNS -fPIC   -c -o ll_addr.o ll_addr.c
armv7a-hardfloat-linux-musleabi-gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wformat=2 -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard  -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/lib\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE -DHAVE_SETNS -fPIC   -c -o inet_proto.o inet_proto.c
armv7a-hardfloat-linux-musleabi-gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wformat=2 -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard  -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/lib\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE -DHAVE_SETNS -fPIC   -c -o namespace.o namespace.c
namespace.c: In function ‘bind_etc’:
namespace.c:18:22: error: ‘MAXPATHLEN’ undeclared (first use in this function)
namespace.c:18:22: note: each undeclared identifier is reported only once for each function it appears in
namespace.c:20:7: warning: unused variable ‘etc_name’ [-Wunused-variable]
namespace.c:19:7: warning: unused variable ‘netns_name’ [-Wunused-variable]
namespace.c:18:7: warning: unused variable ‘etc_netns_path’ [-Wunused-variable]
namespace.c: In function ‘netns_switch’:
namespace.c:46:16: error: ‘MAXPATHLEN’ undeclared (first use in this function)
namespace.c:46:7: warning: unused variable ‘net_path’ [-Wunused-variable]
namespace.c: In function ‘netns_get_fd’:
namespace.c:90:15: error: ‘MAXPATHLEN’ undeclared (first use in this function)
namespace.c:90:7: warning: unused variable ‘pathbuf’ [-Wunused-variable]
<builtin>: recipe for target 'namespace.o' failed
make[1]: *** [namespace.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/var/tmp/portage/sys-apps/iproute2-3.19.0/work/iproute2-3.19.0/lib'
Makefile:44: recipe for target 'all' failed
make: *** [all] Error 2
 * ERROR: sys-apps/iproute2-3.19.0::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=sys-apps/iproute2-3.19.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-apps/iproute2-3.19.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-apps/iproute2-3.19.0/temp/build.log.gz'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-apps/iproute2-3.19.0/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-apps/iproute2-3.19.0/work/iproute2-3.19.0'
 * S: '/var/tmp/portage/sys-apps/iproute2-3.19.0/work/iproute2-3.19.0'


Reproducible: Always
Comment 2 Felix Janda 2015-06-12 18:33:22 UTC
Depends on fixing

https://bugs.gentoo.org/show_bug.cgi?id=544476

in upstream (very difficult).

iputils2 directly copies linux headers and they want to sanitize them.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2017-12-02 20:18:19 UTC
Please retest on 4.14.1, the 4.14 series include a large upstream header cleanup.
Comment 4 Felix Janda 2018-02-02 00:24:59 UTC
It still doesn't compile as of version 4.15, but it probably will when
the following makes its way into a musl release:

http://www.openwall.com/lists/musl/2018/01/09/5

From the build log: (for some reason bugzilla doesn't like me to attach
a full build log)


../include/uapi/linux/if.h:82:2: error: expected identifier before numeric constant
  IFF_UP    = 1<<0,  /* sysfs */
  ^
In file included from ../include/uapi/linux/netdevice.h:29:0,
                 from ../include/uapi/linux/if_arp.h:27,
                 from f_flower.c:17:
../include/uapi/linux/if.h:109:0: warning: "IFF_UP" redefined
 #define IFF_UP    IFF_UP
 
In file included from f_flower.c:16:0:
/usr/include/net/if.h:29:0: note: this is the location of the previous definition
 #define IFF_UP 0x1
 

../include/uapi/linux/if.h:192:8: error: redefinition of 'struct ifmap'
 struct ifmap {
        ^~~~~
In file included from f_flower.c:16:0:
/usr/include/net/if.h:64:8: note: originally defined here
 struct ifmap {
        ^~~~~
In file included from ../include/uapi/linux/netdevice.h:29:0,
                 from ../include/uapi/linux/if_arp.h:27,
                 from f_flower.c:17:
../include/uapi/linux/if.h:229:8: error: redefinition of 'struct ifreq'
 struct ifreq {
        ^~~~~
In file included from f_flower.c:16:0:
/usr/include/net/if.h:76:8: note: originally defined here
 struct ifreq {
        ^~~~~
In file included from ../include/uapi/linux/netdevice.h:29:0,
                 from ../include/uapi/linux/if_arp.h:27,
                 from f_flower.c:17:
../include/uapi/linux/if.h:281:8: error: redefinition of 'struct ifconf'
 struct ifconf  {
        ^~~~~~
In file included from f_flower.c:16:0:
/usr/include/net/if.h:116:8: note: originally defined here
 struct ifconf {
        ^~~~~~