Hello Ed,
Maybe it is due to this
https://github.com/rsmarples/dhcpcd/blob/709e6b1a38ef87ada75354e968a9b35eca…
?
Could you try renaming __unused[3] as ___unused[3] (with an extra
leading '_') to see if it compiles?
Regards,
Yann
Le 10/06/2020 à 22:51, Ed W a écrit :
Hi, Could someone please take a look at my errors
below and see if
this is a uclibc problem? I'm struggling to understand.
System is gentoo/hardened/uclibc-ng. Using gcc-9.3.0, uclibc-1.0.33 in
a chroot on x86-64
Using dhcpcd-8+, ie observe the same on 9.x and various 8.x versions.
Specifically testing dhcpcd-8.1.9 in this case.
Error on compilation looks like:
In file included from /usr/include/sys/stat.h:106,
from /usr/include/fcntl.h:37,
from if.c:58:
/usr/include/bits/stat.h:102:22: error: expected identifier or '('
before '[' token
102 | long int __unused[3];
| ^
If I comment out the "#include <fcntl.h>" in if.c, then it compiles
without error.
Also, if I convert the definition from the form "__unused[3]" to
separate lines like "long int __unused1", etc, then it also compiles
without error.
I'm not clear why an array definition in a struct is triggering this
compiler error? Any thoughts? Is this something that dhcpcd is doing
wrong?
Thanks for any help. Full log below
Ed W
# ./configure
configure args:
Deriving operating system from ... x86_64-unknown-linux
Configuring dhcpcd for ... linux
Enabling INET support
Enabling ARP support
Enabling ARPing support
Enabling IPv4LL support
Enabling INET6 support
Enabling DHCPv6 support
Enabling Authentication
Using compiler .. cc
cc (Gentoo Hardened 9.3.0 p2) 9.3.0
dhcpcd-definitions.conf will be embedded in dhcpcd itself
Testing for nl80211 ... yes
Testing for IN6_ADDR_GEN_MODE_NONE ... yes
Testing for getifaddrs ... yes
Testing for ifaddrs.ifa_addrflags ... no
Testing for clock_gettime ... yes
Testing for inet_ntoa ... yes
Testing for arc4random ... no
Testing for arc4random_uniform ... no
Testing for open_memstream ... yes
Testing for pidfile_lock ... no
Testing for setproctitle ... no
Testing for strlcpy ... yes
Testing for strtoi ... no
Testing for consttime_memequal ... no
Testing for dprintf ... yes
Testing for TAILQ_FOREACH_SAFE ... no
Testing for TAILQ_FOREACH_MUTABLE ... no
Testing for TAILQ_CONCAT ...yes
Testing for rb_tree_init ... no
Testing for reallocarray ... no
Testing for kqueue1 ... no
Testing for kqueue ... no
Testing for epoll ... yes
Testing for be64enc ... no
Testing for fls64 ... no
Testing for MD5Init ... no
Testing for sha2.h ... no
Testing for SHA256_Init ... no
Testing for SHA256Init ... no
Testing for hmac ... no
Checking for libudev ... yes
Checking udev_monitor_filter_add_match_subsystem_devtype ... yes
Checking udev_device_get_is_initialized ... yes
Testing for dlopen ... yes
Checking for ntpd ... /usr/sbin/ntpd (50-ntp.conf)
Checking for chronyd ... not found
Checking for ypbind ... not found
SYSCONFDIR = /etc
SBINDIR = /sbin
LIBDIR = /lib
LIBEXECDIR = /libexec
DBDIR = /var/db/dhcpcd
RUNDIR = /var/run
MANDIR = /usr/share/man
DATADIR = /usr/share
HOOKSCRIPTS = 50-ntp.conf
EGHOOKSCRIPTS =
STATUSARG =
chroot:twocubed dhcpcd-8.1.9 # make
for x in src hooks; do cd $x; make all || exit $?; cd ..; done
make[1]: Entering directory
'/var/tmp/portage/net-misc/dhcpcd-8.1.9/work/dhcpcd-8.1.9/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 -DPLUGIN_DEV
-I.. -I../src -I./crypt -c common.c -o common.o
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 -DPLUGIN_DEV
-I.. -I../src -I./crypt -c control.c -o control.o
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 -DPLUGIN_DEV
-I.. -I../src -I./crypt -c dhcpcd.c -o dhcpcd.o
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 -DPLUGIN_DEV
-I.. -I../src -I./crypt -c duid.c -o duid.o
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 -DPLUGIN_DEV
-I.. -I../src -I./crypt -c eloop.c -o eloop.o
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 -DPLUGIN_DEV
-I.. -I../src -I./crypt -c logerr.c -o logerr.o
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 -DPLUGIN_DEV
-I.. -I../src -I./crypt -c if.c -o if.o
In file included from /usr/include/sys/stat.h:106,
from /usr/include/fcntl.h:37,
from if.c:58:
/usr/include/bits/stat.h:102:22: error: expected identifier or '('
before '[' token
102 | long int __unused[3];
| ^
/usr/include/bits/stat.h:163:22: error: expected identifier or '('
before '[' token
163 | long int __unused[3];
| ^
make[1]: *** [Makefile:55: if.o] Error 1
make[1]: Leaving directory
'/var/tmp/portage/net-misc/dhcpcd-8.1.9/work/dhcpcd-8.1.9/src'
make: *** [Makefile:24: all] Error 2
_______________________________________________
devel mailing list
devel(a)uclibc-ng.org
https://mailman.uclibc-ng.org/cgi-bin/mailman/listinfo/devel