[Bug 192394] New: Base system bootstrapping broken with gcc; not clang

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Aug 5 06:59:02 UTC 2014


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192394

            Bug ID: 192394
           Summary: Base system bootstrapping broken with gcc; not clang
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: Any
                OS: Any
            Status: Needs Triage
          Severity: Affects Only Me
          Priority: ---
         Component: conf
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: yaneurabeya at gmail.com

I ran into this build failure after trying to build world @ r269562 with gcc
instead of clang; some of the newly added SCTP constants are undefined in the
header installed in /usr/include/netinet/sctp.h instead of the one installed to
/usr/obj/...:

% uname -a
FreeBSD isilon-fuji-current.local 11.0-CURRENT FreeBSD 11.0-CURRENT #16
r268804+343692e(isilon-atf): Mon Jul 14 12:17:25 PDT 2014    
root at isilon-fuji-current.local:/usr/obj/usr/src/sys/FUJI  i386
% svn status
?       bw.log
M       etc/mtree/BSD.tests.dist
?       int.out
M       lib/libnv/Makefile
A       lib/libnv/tests
A       lib/libnv/tests/Makefile
A  +    lib/libnv/tests/nvlist_add_test.c
        > moved from tools/regression/lib/libnv/nvlist_add.c
A  +    lib/libnv/tests/nvlist_exists_test.c
        > moved from tools/regression/lib/libnv/nvlist_exists.c
A  +    lib/libnv/tests/nvlist_free_test.c
        > moved from tools/regression/lib/libnv/nvlist_free.c
A  +    lib/libnv/tests/nvlist_get_test.c
        > moved from tools/regression/lib/libnv/nvlist_get.c
A  +    lib/libnv/tests/nvlist_move_test.c
        > moved from tools/regression/lib/libnv/nvlist_move.c
A  +    lib/libnv/tests/nvlist_send_recv_test.c
        > moved from tools/regression/lib/libnv/nvlist_send_recv.c
M       libexec/rtld-elf/tests/Makefile
M       libexec/rtld-elf/tests/libpythagoras/Makefile
?       nothing.out
?       svn-commit.tmp
D       tools/regression/lib/libnv
D       tools/regression/lib/libnv/Makefile
D       tools/regression/lib/libnv/nvlist_add.c
        > moved to lib/libnv/tests/nvlist_add_test.c
D       tools/regression/lib/libnv/nvlist_exists.c
        > moved to lib/libnv/tests/nvlist_exists_test.c
D       tools/regression/lib/libnv/nvlist_free.c
        > moved to lib/libnv/tests/nvlist_free_test.c
D       tools/regression/lib/libnv/nvlist_get.c
        > moved to lib/libnv/tests/nvlist_get_test.c
D       tools/regression/lib/libnv/nvlist_move.c
        > moved to lib/libnv/tests/nvlist_move_test.c
D       tools/regression/lib/libnv/nvlist_send_recv.c
        > moved to lib/libnv/tests/nvlist_send_recv_test.c
M       tools/regression/pjdfstest/tests/misc.sh
% cat /etc/src.conf 
MALLOC_PRODUCTION=

WITHOUT_ATM=
WITHOUT_AUDIT=
WITHOUT_BHYVE=
WITHOUT_BIND_DNSSEC=
WITHOUT_BIND_ETC=
WITHOUT_BIND_LIBS_LWRES=
WITHOUT_BIND_NAMED=
WITHOUT_BLUETOOTH=
#WITHOUT_BMAKE=
WITHOUT_BSNMP=
WITHOUT_CALENDAR=
#WITHOUT_CLANG=
#WITHOUT_CLANG_IS_CC=
WITHOUT_CTM=
#WITHOUT_DICT=
#WITHOUT_EXAMPLES=
WITHOUT_FORTRAN=
WITHOUT_FREEBSD_UPDATE=
WITHOUT_GAMES=
#WITH_GCC=
#WITH_GNUCXX=
WITHOUT_GCOV=
WITHOUT_GPIB=
WITHOUT_GSSAPI=
WITHOUT_HAST=
WITHOUT_HESOID=
WITHOUT_HTML=
WITHOUT_I4B=
#WITHOUT_ICONV=
WITH_ICONV=
WITHOUT_IPFILTER=
WITHOUT_IPFW=
WITHOUT_IPX=
WITHOUT_KERBEROS=
#WITH_LIBCPLUSPLUS=
WITHOUT_LIBKSE=
#WITHOUT_LOCALES=
WITHOUT_LPR=
WITHOUT_MAIL=
#WITHOUT_MAN=
WITHOUT_NCP=
WITHOUT_NDIS=
WITHOUT_NIS=
#WITHOUT_NLS=
WITH_NLS=
#WITHOUT_NMTREE=
WITHOUT_NS_CACHING=
WITHOUT_OBJC=
WITHOUT_PF=
WITHOUT_PORTSNAP=
WITHOUT_PPP=
WITHOUT_PROFILE=
WITHOUT_RADIUS=
WITHOUT_RCMDS=
WITH_SSP=
WITHOUT_SVN=
WITHOUT_SVNLITE=
WITHOUT_SYSINSTALL=
WITH_TESTS=
WITHOUT_WIRELESS=
WITHOUT_WPA_SUPPLICANT_EAPOL=
#WITHOUT_ZFS=
WITH_ZFS=

DEFAULT_KERNCONF= FUJI
DEFAULT_KERNCONFDIR=    /root

KERNCONF?=      ${DEFAULT_KERNCONF}
KERNCONFDIR?=   ${DEFAULT_KERNCONFDIR}

.if ${KERNCONFDIR} == "${DEFAULT_KERNCONFDIR}"
MODULES_OVERRIDE+=      acl_nfs4 acl_posix1e
MODULES_OVERRIDE+=      aio cd9660 fdescfs mqueue msdosfs nullfs
MODULES_OVERRIDE+=      opensolaris zfs

PORTS_MODULES+=
.endif
% env WITHOUT_CLANG=yes WITHOUT_CLANG_BOOTSTRAP=yes WITH_GCC=yes
WITH_GNUCXX=yes script bw.log make buildworld -j12
--- sctp_sys_calls.So ---^M
/usr/src.svn/lib/libc/net/sctp_sys_calls.c:353:7: error: use of undeclared
identifier 'SCTP_ECN_SUPPORTED'^M
        case SCTP_ECN_SUPPORTED:^M
             ^^M
/usr/src.svn/lib/libc/net/sctp_sys_calls.c:356:7: error: use of undeclared
identifier 'SCTP_PR_SUPPORTED'^M
        case SCTP_PR_SUPPORTED:^M
             ^^M
--- acl_from_text.So ---^M
--- sctp_sys_calls.So ---^M
/usr/src.svn/lib/libc/net/sctp_sys_calls.c:359:7: error: use of undeclared
identifier 'SCTP_RECONFIG_SUPPORTED'^M
        case SCTP_RECONFIG_SUPPORTED:^M
             ^^M
/usr/src.svn/lib/libc/net/sctp_sys_calls.c:362:7: error: use of undeclared
identifier 'SCTP_NRSACK_SUPPORTED'^M
        case SCTP_NRSACK_SUPPORTED:^M
             ^^M
/usr/src.svn/lib/libc/net/sctp_sys_calls.c:365:7: error: use of undeclared
identifier 'SCTP_PKTDROP_SUPPORTED'^M
        case SCTP_PKTDROP_SUPPORTED:^M
             ^^M
5 errors generated.^M
*** [sctp_sys_calls.So] Error code 1^M
^M
make[4]: stopped in /usr/src.svn/lib/libc^M
…
% cat /usr/obj/usr/src.svn/lib/libc/.depend
...
sctp_sys_calls.o sctp_sys_calls.po sctp_sys_calls.So:
/usr/src.svn/lib/libc/net/sctp_sys_calls.c \
  /usr/include/sys/cdefs.h /usr/src.svn/lib/libc/../../include/stdio.h \
  /usr/include/sys/_null.h /usr/include/sys/_types.h \
  /usr/include/machine/_types.h /usr/include/x86/_types.h \
  /usr/src.svn/lib/libc/../../include/string.h \
  /usr/src.svn/lib/libc/../../include/strings.h \
  /usr/src.svn/lib/libc/../../include/xlocale/_strings.h \
  /usr/src.svn/lib/libc/../../include/xlocale/_string.h \
  /usr/include/errno.h /usr/src.svn/lib/libc/../../include/stdlib.h \
  /usr/src.svn/lib/libc/../../include/unistd.h /usr/include/sys/types.h \
  /usr/include/machine/endian.h /usr/include/x86/endian.h \
  /usr/include/sys/_pthreadtypes.h /usr/include/sys/_stdint.h \
  /usr/include/sys/select.h /usr/include/sys/_sigset.h \
  /usr/include/sys/_timeval.h /usr/include/sys/timespec.h \
  /usr/include/sys/_timespec.h /usr/include/sys/unistd.h \
  /usr/include/sys/socket.h /usr/include/sys/_iovec.h \
  /usr/include/machine/_align.h /usr/include/x86/_align.h \
  /usr/include/sys/_sockaddr_storage.h /usr/include/sys/syscall.h \
  /usr/include/sys/uio.h /usr/include/netinet/in.h \
  /usr/include/netinet6/in6.h \
  /usr/src.svn/lib/libc/../../include/arpa/inet.h \
  /usr/include/netinet/sctp_uio.h /usr/include/stdint.h \
  /usr/include/machine/_stdint.h /usr/include/x86/_stdint.h \
  /usr/include/sys/endian.h /usr/include/netinet/sctp.h
…

I removed /usr/obj/usr/src.svn/lib/libc/, restarted the build, I ran into this
issue again. I tried the same thing with my github forked branch as well (just
updated), and ran into the same issue.

We aren’t using -nostdinc/-nostdinc++/-idirafter/-isysroot/-isystem though and
the headers aren’t included with -I, which is probably the underlying issue.

If I use clang, the build “just works” — it picks up the right headers in
.depend and the libc compile goes through properly.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list