Summary: | 'make buildworld' of 12.0-RELEASE sources fails in special circumstances | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | oz42 | ||||
Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||
Status: | New --- | ||||||
Severity: | Affects Only Me | CC: | kp, pi | ||||
Priority: | --- | ||||||
Version: | 12.0-RELEASE | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
oz42
2019-01-21 12:41:05 UTC
Can you include your build command? It was a simple 'make buildworld' Are you building on 12.0? Yes, it is a 12.0-RELEASE system. This is the src.conf: WITHOUT_ACCT=YES WITHOUT_AMD=YES WITHOUT_ASSERT_DEBUG=YES WITHOUT_ATM=YES # WITHOUT_AUTHPF=YES WITHOUT_BHYVE=YES WITHOUT_BLUETOOTH=YES WITHOUT_BOOTPARAMD=YES WITHOUT_BOOTPD=YES WITHOUT_BSNMP=YES WITHOUT_CALENDAR=YES WITHOUT_CAPSICUM=YES # includes WITHOUT_CASPER WITHOUT_CCD=YES WITHOUT_CDDL=YES # includes WITHOUT_CTF WITHOUT_ZFS # WITHOUT_LLVM_TARGET_AARCH64=YES WITHOUT_LLVM_TARGET_ALL=YES WITHOUT_LLVM_TARGET_ARM=YES WITHOUT_LLVM_TARGET_MIPS=YES WITHOUT_LLVM_TARGET_POWERPC=YES WITHOUT_LLVM_TARGET_SPARC=YES # WITHOUT_CTM=YES WITHOUT_CUSE=YES WITHOUT_CXGBETOOL=YES WITHOUT_DEBUG_FILES=YES WITHOUT_DICT=YES WITHOUT_DMAGENT=YES WITHOUT_EXAMPLES=YES WITHOUT_FLOPPY=YES WITHOUT_FTP=YES WITHOUT_GCOV=YES WITHOUT_GSSAPI=YES WITHOUT_HAST=YES WITHOUT_HTML=YES WITHOUT_HYPERV=YES WITHOUT_INET6=YES WITHOUT_INETD=YES WITHOUT_IPFILTER=YES # WITHOUT_IPFW=YES WITHOUT_IPSEC_SUPPORT=YES WITHOUT_ISCSI=YES WITHOUT_JAIL=YES WITHOUT_KDUMP=YES WITHOUT_KERBEROS=YES WITHOUT_KERNEL_SYMBOLS=YES WITHOUT_LEGACY_CONSOLE=YES WITHOUT_LPR=YES WITHOUT_LS_COLORS=YES WITHOUT_MAILWRAPPER=YES WITHOUT_MLX5TOOL=YES WITHOUT_MODULE_DRM=YES WITHOUT_MODULE_DRM2=YES WITHOUT_NDIS=YES WITHOUT_NIS=YES WITHOUT_PMC=YES WITHOUT_PPP=YES WITHOUT_PROFILE=YES WITHOUT_RADIUS_SUPPORT=YES WITHOUT_RBOOTD=YES WITHOUT_ROUTED=YES WITHOUT_SENDMAIL=YES WITHOUT_SOURCELESS=YES # no sourceless code in kernel, includes WITHOUT_SOURCELESS_HOST WITHOUT_SOURCELESS_UCODE WITHOUT_TCP_WRAPPERS=YES WITHOUT_TESTS=YES # includes WITHOUT_DTRACE_TESTS WITHOUT_TESTS_SUPPORT WITHOUT_TFTP=YES WITHOUT_TIMED=YES WITHOUT_USB=YES WITHOUT_USB_GADGET_EXAMPLES=YES WITHOUT_WIRELESS=YES # includes WITHOUT_WIRELESS_SUPPORT=YES WITHOUT_WPA_SUPPLICANT_EAPOL=YES WITHOUT_ZFS=YES Have you previously done buildworld/installworld with these or other flags? I can't seem to reproduce this, and I see no obvious reason why it'd happen. You're not disabling pf, so the header should be installed. And I've tested WITHOUT_PF, and that builds fine for me too. This only happens when /usr/include/netpfil/pf/pf.h (and other *.h files) do not exist. On 11.0-RELEASE, this is not necessary. It finds and includes /usr/src/sys/netpfil/pf/pf.h When I change the Makefile line PCAPINCS to a modified 11.0-RELEASE version PCAPINCS= pcap/pcap.h pcap/namedb.h pcap/bpf.h pcap/dlt.h then building does not fail. So the bug seems to exist in Makefile. (In reply to oz42 from comment #6) I would not expect the build to use the installed pf.h header file, so that's odd. Also, why would the header file not be installed? I can't tell what you changed. Can you post a diff instead? Sorry, my last comment is invalid, please ignore it. On another 12.0-RELEASE machine, libpcap builds just fine. I will investigate both machines. Up to now, I have found that a 'make delete-old' [1] removes all unneccesary *.h files from /usr/include. That's okay. The problem is that files in /usr/src include files from /usr/include that no longer exist. I am no developer, but I assume the solution would be to include all *.h files from /usr/src only. E.g. /usr/src/lib/libcasper/libcasper/libcasper.h instead of the deleted /usr/include/libcasper.h Right now, it is possible to remove some stuff from your system by putting lines like WITHOUT_ATM=YES into /etc/src.conf, the result is a more 'lightweight' system. But it is not possible to get those features back once they have been removed from the system. [1] a suggestion from /usr/src/Makefile (In reply to oz42 from comment #9) > I assume the solution would be to include all *.h files from /usr/src only Yes, but that's what the build already does. I can't reproduce this build failure, even after 'make delete-old' with WITHOUT_PF=yes set. I have proven that make buildworld includes *.h files from /usr/include. Long story short: please install a fresh 12.0-RELEASE system and add attached src.conf and make.conf, then: - make buildworld && make kernel (add your KERNCONF here) - nextboot -o "-s" && reboot - mergemaster -p - cd /usr/src && make installworld - mergemaster - yes|make delete-old - yes|make delete-old-libs - reboot Now you have a stripped down and happy system. But when you delete /etc/src.conf and run "make buildworld" to get back a "generic" system, building will fail. I have tried once more. Result: another *.h file, same story: ===> bin/chio (all) ===> bin/chmod (all) ===> bin/cp (all) ===> bin/date (all) ===> bin/dd (all) /usr/local/libexec/ccache/world/cc -O2 -pipe -DNDEBUG -MD -MF.depend.dd.o -MTdd.o -std=gnu99 -fstack-protector-strong -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments -c /usr/src/bin/dd/dd.c -o dd.o In file included from /usr/src/bin/dd/dd.c:60: /usr/include/capsicum_helpers.h:42:10: fatal error: 'libcasper.h' file not found #include <libcasper.h> ^~~~~~~~~~~~~ 1 error generated. root@fb:~ # find /usr -name libcasper.h /usr/obj/usr/src/amd64.amd64/tmp/usr/include/libcasper.h /usr/src/lib/libcasper/libcasper/libcasper.h => header files from /usr/src are not included, but from /usr/include Created attachment 201581 [details]
src.conf and make.conf
I seem to be running into different build problems then. I honestly don't understand the use case for this, and it's not a pf-related bug, so I'm not going to investigate it any further. You are saying: building and installing a reduced system does not install all files necessary to build a full system again -- because make buildworld expects files from outside /usr/src when it builds and the stripped-down system does not have all the files required ? This can be seen as a valid problem, but only if one understands *why* one would do this ? Can you describe why you need such a process (build-install-striped-down, use it to build-full-system) ? I could perhaps want to enable a disabled feature again. But this is not the problem. The point is that 'make buildworld' even bootstraps its own compiler when necessary, but still depends on files outside of /usr/src that exist in /usr/src. *.h and lib* files for example. |