Am Montag, den 01.10.2018, 17:24 +0100 schrieb Ken Moffat via blfs-dev: > On Mon, Oct 01, 2018 at 06:16:46AM +0200, Thomas Trepl via blfs-dev wrote: > > Am Sonntag, den 30.09.2018, 23:06 -0400 schrieb Clayton Johnson via > > blfs-dev: > > > DHCP 4.4.1 broken in guide as of GCC 8 update. > > > > > > Attached patch will fix this issue. > > > > What do you mean by "broken"? What is the issue which gets fixed by that > > patch? > > > > dhcp compiles fine here with gcc-8.2.0. > > > > Very odd. I built it (in chroot), and installed the client, last > week on a build from svn with no problem. > > But after seeing Clayton's response I tried it on 8.3 and sure > enough it failed because of -Werror: > > gcc -DHAVE_CONFIG_H -I. -I../includes -I.. -DLOCALSTATEDIR='"/var"' -g -O2 > -Wall -Werror -fno-strict-aliasing -I../includes > -I/tmp/dhcp-4.4.1/bind/include -MT discover.o -MD -MP -MF .deps/discover.Tpo > -c -o discover.o discover.c > discover.c: In function ‘discover_interfaces’: > discover.c:646:4: error: ‘strncpy’ output may be truncated copying 15 bytes > from a string of length 15 [-Werror=stringop-truncation] > strncpy(tmp->name, info.name, sizeof(tmp->name) - 1); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > cc1: all warnings being treated as errors > make[2]: *** [Makefile:500: discover.o] Error 1 > > Even more odd, I had done the same thing on this machine when > building/testing 8.3 and the log for that only shows: > > gcc -DHAVE_CONFIG_H -I. -I../includes -I.. -DLOCALSTATEDIR='"/var"' -O2 > -march=native -D_PATH_DHCLIENT_SCRIPT='"/sbin/dhclient-script"' > -D_PATH_DHCPD_CONF='"/etc/dhcp/dhcpd.conf"' > -D_PATH_DHCLIENT_CONF='"/etc/dhcp/dhclient.conf"' -I../includes > -I/building/dhcp-4.4.1/bind/include -MT discover.o -MD -MP -MF > .deps/discover.Tpo -c -o discover.o discover.c > mv -f .deps/discover.Tpo .deps/discover.Po > > Retrying with my own CFLAGS (-O2 -march=native) at the start > of the CFLAGS works fine. Ah ha! When I build normally, I use > > CFLAG="$CFLAGS -D_PATH... > > and that is causing -Wall -Werror -fno-strict-aliasing to be > omitted, but what is in the book merely adds defines to those existing > CFLAGS.
Strange enough. I run the instructions in book manually and it indeed failed with the described error. Doing a export CFLAGS="-D_PATH_DHCLIENT_SCRIPT=.... it compiled without error. To me it seems adding a "export" might be enough. CFLAGS="-D_PATH_DHCLIENT_SCRIPT=.... ==> error export CFLAGS="-D_PATH_DHCLIENT_SCRIPT=.... ==> ok -- Thomas -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page