Fix dhcpcd compile with Gentoo, linux-headers-4.0

Discuss development on Bubba
Post Reply
sakaki
Posts: 172
Joined: 15 Aug 2014, 11:20

Fix dhcpcd compile with Gentoo, linux-headers-4.0

Post by sakaki » 26 Apr 2015, 08:06

Hi,

if you have had problems recently with net-misc/dhcpcd failing to compile on your B3 (under the Gentoo live-USB, for example when running genup-lite), bailing out with "invalid application of 'sizeof' to incomplete type <...>" or similar, please read on.

The issue is caused by the upgrade of linux-headers (to 4.0, since it is marked ~arm in /etc/package.accept_keywords), and is a known bug (#546734, see also here). The fix is as follows.

Issue:

Code: Select all

b3 ~ # mkdir -p /etc/portage/env
b3 ~ # echo 'CPPFLAGS=-D_GNU_SOURCE' > /etc/portage/env/gnusource.conf
b3 ~ # nano -w /etc/portage/package.env
and add the following lines to that file:

Code: Select all

# see bug 546734
net-misc/dhcpcd gnusource.conf
Save and exit nano.

You should be able to emerge dhcpcd now.

Best, sakaki

PS I wouldn't normally post about this sort of stuff, since Gentoo users can generally take care of themselves, but this is a bit of an obscure one, and had me scratching my head for a bit.

Post Reply