Re: Build error on CentOS 7
Roy Marples
Mon Feb 11 18:10:34 2019
On 11/02/2019 16:13, Roy Marples wrote:
On 08/02/2019 03:16, Kristopher John Gamrat wrote:
---------------------> PLEASE REPLY BELOW THIS MESSAGE
<---------------------
I am running CentOS 7 and I have been able to successfully build dhcpcd
v7.0.8, though I had to manually install the hooks as make failed
here. With
dhcpcd v7.1.0 and v7.1.1, I am seeing a complete failure to build. The
output
from `make` is pasted below, along with the output of `uname -a` and
`gcc --version`. Near the bottom of make's output, you'll see a message
related to the hooks, which is the same error I got from 7.0.8, though
this I
can work around manually if needed.
[piki@localhost]~/rpmbuild/SOURCES/dhcpcd-7.1.1% make
for x in src hooks; do cd $x; make all; cd ..; done
make[1]: Entering directory
`/home/piki/rpmbuild/SOURCES/dhcpcd-7.1.1/src'
cc -O2 -std=c99 -DHAVE_CONFIG_H -DNDEBUG -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-DINET -DARP -DARPING -DIPV4LL -DINET6 -DDHCP6 -DAUTH -I.. -I../src
-I./crypt -c
if-linux.c -o if-linux.o
if-linux.c: In function ‘if_opensockets_os’:
if-linux.c:318:27: error: ‘SOL_NETLINK’ undeclared (first use in this
function)
setsockopt(ctx->link_fd, SOL_NETLINK, NETLINK_BROADCAST_ERROR,
^
if-linux.c:318:27: note: each undeclared identifier is reported only
once for
Someone on the #centos irc channel on Freenode said this:
not using our kernel either, try yum install kernel-ml-{devel,headers}
After many discussions in their IRC channel, we concluded it's a missing
define from glibc and is already fixed in newer versions.
As RH are very unlikely to fix this, I've added a patch to work around
this sad issue.
I've also fixed the make issue, so it should build fine on Centos-7 now.
https://roy.marples.name/git/dhcpcd.git/commit/?id=2e1657edffd718ba3b7882c998e54c0777857d50
https://roy.marples.name/git/dhcpcd.git/commit/?id=a9c0bec433968247a83b528c31c5b4dc9f309e1e
https://roy.marples.name/git/dhcpcd.git/commit/?id=edb38a968396f57478869773587eab6a26bc01cf
Let me know if this fixes it for you!
Roy
Archive administrator: postmaster@marples.name