Summary: | net-misc/openvpn fails to build on hardened/musl | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Robert Sebastian Gerus <ar> |
Component: | Current packages | Assignee: | Dirkjan Ochtman (RETIRED) <djc> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ar, gentoo, musl |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 556874 | ||
Bug Blocks: | 430702 | ||
Attachments: |
openvpn-2.3.6-musl-compat.diff
Remove dependency on <netinet/if_ether.h> |
Created attachment 402850 [details, diff]
openvpn-2.3.6-musl-compat.diff
Created attachment 402896 [details, diff] Remove dependency on <netinet/if_ether.h> The patch in Comment 1 works fine because <linux/if_tun.h> includes <linux/if_ether.h>, which declares the constants ETH_P_IP and ETH_P_IPV6 which are used in src/openvpn/tun.c. However I don't think one should rely on this fact. On the other hand, openvpn has already equivalent OPENVPN_ETH_P_* constants which can be used here instead so that the <netinet/if_ether.h> header becomes completely unnecessary. Maybe this is even upstreamable... Yeah, can someone please propose these upstream? That would be nice. Fixed in current git HEAD. Should land in openvpn-2.3.7. (In reply to Felix Janda from comment #5) > Fixed in current git HEAD. Should land in openvpn-2.3.7. Excellent! I've put this on the hardened-dev::musl overlay in the mean time. Ping back when 2.3.7 is in the gentoo tree. openvpn-2.3.8 is in the tree, stable and compiles fine with musl. So I think the ebuild can be removed from the musl overlay and this bug be closed. (In reply to Felix Janda from comment #7) > openvpn-2.3.8 is in the tree, stable and compiles fine with musl. So I > think the ebuild can be removed from the musl overlay and this bug be closed. thanks Felix. |
net-misc/openvpn fails to compile on gentoo/hardened/musl. Reproducible: Always Steps to Reproduce: 1. emerge -v net-misc/openvpn Actual Results: x86_64-gentoo-linux-musl-gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../src/compat -O2 -pipe -fomit-frame-pointer -mtune=generic -c -o base64.o base64.c In file included from syshead.h:178:0, from base64.c:40: /usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp] #warning redirecting incorrect #include <sys/poll.h> to <poll.h> ^ In file included from /usr/include/linux/if_tun.h:20:0, from syshead.h:222, from base64.c:40: /usr/include/linux/if_ether.h:136:8: error: redefinition of ‘struct ethhdr’ struct ethhdr { ^ In file included from syshead.h:218:0, from base64.c:40: /usr/include/netinet/if_ether.h:96:8: note: originally defined here struct ethhdr { ^ Makefile:640: recipe for target 'base64.o' failed make[3]: *** [base64.o] Error 1 make[3]: Leaving directory '/var/tmp/portage/net-misc/openvpn-2.3.6-r2/work/openvpn-2.3.6/src/openvpn' Makefile:410: recipe for target 'all-recursive' failed make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory '/var/tmp/portage/net-misc/openvpn-2.3.6-r2/work/openvpn-2.3.6/src' Makefile:592: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/var/tmp/portage/net-misc/openvpn-2.3.6-r2/work/openvpn-2.3.6' Makefile:480: recipe for target 'all' failed make: *** [all] Error 2 Expected Results: >>> net-misc/openvpn-2.3.6-r2 merged. Attached patch fixes build on musl and doesn't break it on regular (glibc) gentoo.