dhcpcd-discuss

Re: Build error on CentOS 7

Roy Marples

Fri Feb 08 11:31:35 2019

Hi Kristopher

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
each function it appears in


Where is SOL_NETLINK defined on CentOS? I see from a recent LKML mail they might have been moved?
https://lkml.org/lkml/2018/1/19/708


make[1]: *** [if-linux.o] Error 1
make[1]: Leaving directory `/home/piki/rpmbuild/SOURCES/dhcpcd-7.1.1/src'
make[1]: Entering directory `/home/piki/rpmbuild/SOURCES/dhcpcd-7.1.1/hooks'
make[1]: *** ..//: Is a directory.  Stop.
make[1]: Leaving directory `/home/piki/rpmbuild/SOURCES/dhcpcd-7.1.1/hooks'
[piki@localhost]~/rpmbuild/SOURCES/dhcpcd-7.1.1% uname -a
Linux localhost.localdomain 4.20.6-1.el7.elrepo.x86_64 #1 SMP Thu Jan 31
08:20:26 EST 2019 x86_64 x86_64 x86_64 GNU/Linux
[piki@localhost]~/rpmbuild/SOURCES/dhcpcd-7.1.1% gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	
What version of make do you have?

Roy

References:
Build error on CentOS 7Kristopher John Gamrat
Archive administrator: postmaster@marples.name