Need Help Debugging a Build Failure - Multiple Builds including 11.2-RELEASE and stable/12

Hello, Forums. I'm trying to build a FreeBSD base system to upgrade from FreeBSD 11.1. I'm using local src.conf, src-env.conf, and make.conf files. I keep running into a singular build failure, and I have not been able to find any way to work around it. In the latest iteration of my local build configuration, this is how the error presents:

Code:
Building /usr/obj/usr/src/lib/libc/machdep_ldisx.o
In file included from /usr/src/lib/libc/gdtoa/machdep_ldisx.c:43:
In file included from /usr/src/contrib/gdtoa/gdtoaimp.h:197:
/usr/src/include/stdlib.h:93:7: error: expected function body after function declarator
             __alloc_size2(1, 2);
             ^
/usr/src/include/stdlib.h:311:6: error: expected function body after function declarator
            __alloc_size2(2, 3);
            ^
2 errors generated.
*** Error code 1

Stop.
make[4]: stopped in /usr/src/lib/libc
.ERROR_TARGET='machdep_ldisx.o'
.ERROR_META_FILE='/usr/obj/usr/src/lib/libc/machdep_ldisx.o.meta'
.MAKE.LEVEL='4'
MAKEFILE=''
.MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose'
_ERROR_CMD='/usr/bin/clang  -O2 -pipe -msse3 -O -pipe -Wno-thread-safety-analysis -march=core2  -I/usr/src/lib/libc/include -I/usr/src/include -I/usr/src/lib/libc/amd64$
.CURDIR='/usr/src/lib/libc'
.MAKE='make'
.OBJDIR='/usr/obj/usr/src/lib/libc'
.TARGETS='all'
DESTDIR='/usr/obj/usr/src/tmp'
LD_LIBRARY_PATH=''
MACHINE='amd64'
MACHINE_ARCH='amd64'
MAKEOBJDIRPREFIX='/usr/obj'
MAKESYSPATH='/usr/src/share/mk'
MAKE_VERSION='20170510'
PATH='/usr/local/libexec/ccache:/usr/local/libexec/ccache:/usr/local/libexec/ccache:/usr/local/libexec/ccache:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/b$
SRCTOP='/usr/src'
OBJTOP='/usr/obj/usr/src'
.MAKE.MAKEFILES='/usr/src/share/mk/sys.mk /usr/src/share/mk/local.sys.env.mk /usr/src/share/mk/src.sys.env.mk /etc/src-env.conf /usr/src/share/mk/bsd.mkopt.mk /etc/make$
.PATH='. /usr/src/lib/libc /usr/src/lib/libc/db/btree /usr/src/lib/libc/db/db /usr/src/lib/libc/db/hash /usr/src/lib/libc/db/man /usr/src/lib/libc/db/mpool /usr/src/lib$
*** Error code 1

Stop.
make[3]: stopped in /usr/src
.ERROR_TARGET='lib/libc__L'
.ERROR_META_FILE=''
.MAKE.LEVEL='3'
MAKEFILE=''
.MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose'
_ERROR_CMD='.PHONY'
.CURDIR='/usr/src'
.MAKE='make'
.OBJDIR='/usr/obj/usr/src'
.TARGETS='_startup_libs'
DESTDIR='/usr/obj/usr/src/tmp'
LD_LIBRARY_PATH=''
MACHINE='amd64'
MACHINE_ARCH='amd64'
MAKEOBJDIRPREFIX='/usr/obj'
MAKESYSPATH='/usr/src/share/mk'
MAKE_VERSION='20170510'
PATH='/usr/local/libexec/ccache:/usr/local/libexec/ccache:/usr/local/libexec/ccache:/usr/local/libexec/ccache:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/b$
SRCTOP='/usr/src'
OBJTOP='/usr/obj/usr/src'
.MAKE.MAKEFILES='/usr/src/share/mk/sys.mk /usr/src/share/mk/local.sys.env.mk /usr/src/share/mk/src.sys.env.mk /etc/src-env.conf /usr/src/share/mk/bsd.mkopt.mk /etc/make$
.PATH='. /usr/src'
*** Error code 1

Stop.
make[2]: stopped in /usr/src
.ERROR_TARGET='libraries'
.ERROR_META_FILE=''
.MAKE.LEVEL='2'
MAKEFILE=''
.MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose'
_ERROR_CMD='.PHONY'
.CURDIR='/usr/src'
.MAKE='make'
.OBJDIR='/usr/obj/usr/src'
.TARGETS='libraries'
DESTDIR='/usr/obj/usr/src/tmp'
LD_LIBRARY_PATH=''
MACHINE='amd64'
MACHINE_ARCH='amd64'
MAKEOBJDIRPREFIX='/usr/obj'
MAKESYSPATH='/usr/src/share/mk'
MAKE_VERSION='20170510'
PATH='/usr/local/libexec/ccache:/usr/local/libexec/ccache:/usr/local/libexec/ccache:/usr/local/libexec/ccache:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/b$
SRCTOP='/usr/src'
OBJTOP='/usr/obj/usr/src'
.MAKE.MAKEFILES='/usr/src/share/mk/sys.mk /usr/src/share/mk/local.sys.env.mk /usr/src/share/mk/src.sys.env.mk /etc/src-env.conf /usr/src/share/mk/bsd.mkopt.mk /etc/make$
.PATH='. /usr/src'
*** Error code 1

Stop.
make[1]: stopped in /usr/src
.ERROR_TARGET='_libraries'
.ERROR_META_FILE=''
.MAKE.LEVEL='1'
MAKEFILE=''
.MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose'
_ERROR_CMD='.PHONY'
.CURDIR='/usr/src'
.MAKE='make'
.OBJDIR='/usr/obj/usr/src'
.TARGETS='buildworld'
DESTDIR=''
LD_LIBRARY_PATH=''
MACHINE='amd64'
MACHINE_ARCH='amd64'
MAKEOBJDIRPREFIX='/usr/obj'
MAKESYSPATH='/usr/src/share/mk'
MAKE_VERSION='20170510'
PATH='/usr/local/libexec/ccache:/usr/local/libexec/ccache:/usr/local/libexec/ccache:/usr/local/libexec/ccache:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/b$
SRCTOP='/usr/src'
OBJTOP='/usr/obj/usr/src'
.MAKE.MAKEFILES='/usr/src/share/mk/sys.mk /usr/src/share/mk/local.sys.env.mk /usr/src/share/mk/src.sys.env.mk /etc/src-env.conf /usr/src/share/mk/bsd.mkopt.mk /etc/make$
.PATH='. /usr/src'
*** Error code 1

Stop.
make: stopped in /usr/src
.ERROR_TARGET='buildworld'
.ERROR_META_FILE=''
.MAKE.LEVEL='0'
MAKEFILE=''
.MAKE.MODE='normal'
_ERROR_CMD='.PHONY'
.CURDIR='/usr/src'
.MAKE='make'
.OBJDIR='/usr/obj/usr/src'
.TARGETS='buildworld'
DESTDIR=''
LD_LIBRARY_PATH=''
MACHINE='amd64'
MACHINE_ARCH='amd64'
MAKEOBJDIRPREFIX='/usr/obj'
MAKESYSPATH='/usr/src/share/mk'
MAKE_VERSION='20170510'
PATH='/usr/local/libexec/ccache:/usr/local/libexec/ccache:/usr/local/libexec/ccache:/usr/local/libexec/ccache:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/b$
SRCTOP='/usr/src'
OBJTOP='/usr/obj/usr/src'

Command exit status: 1

It's the same build failure I'm seeing for those files under /usr/src/lib/libc/gdtoa/ and /usr/src/contrib/gdtoa/ - both, being used in the build for /usr/obj/usr/src/lib/libc/ - regardless of any of the changes I've made, locally, for my build configuration. I'm seeing it when building the 11.2-RELEASE source code from a tar.gz source ball downloaded from freebsd.org and when I'm building the stable/12 tree from a Github sync as of yesterday (Sunday, 18 Nov. 2018)


The build failure happens with and without ccache, with all of LLVM 4, LLVM 5, and LLVM6, and on my 11.1-STABLE and 11.1-RELEASE machines. Regardless of any WITH/WITHOUT options that I've set in src.conf, it's still the same build failure.

The following is my /etc/src-env.conf -- at least this has been a nice opportunity to begin to use WITH_META_MODE in base system builds

Code:
WITH_META_MODE=yes

The following is my /etc/src.conf removed of local annotations.

Before sharing the text of it, I'd like to denote that in an effort to try to prevent base system from building a new libc, because of that error, and as I have an LLVM 6 installed from ports and this isn't a major-version upgrade at least in the 11.2 build, I've used numerous variations on the toolchain parameters such as WITHOUT_SYSTEM_COMPILER, WITH_ and WITHOUT_CLANG*, WITHOUT_TOOLCHAIN etc. and still there's the same build failure.

It was the same build failure, when I left all of those toolchain options completely unspecified in src.conf.

If it may seem in any ways controversial, but the following is pretty much just the latest snapshot of my local configuration. Without any of the toolchain options, it worked for building 11.1 at least

Code:
WITHOUT_SYSTEM_COMPILER=yes
WITH_CLANG_BOOTSTRAP=yes
WITHOUT_CLANG_BOOTSTRAP=yes
WITHOUT_CROSS_COMPILER=yes
WITHOUT_TOOLCHAIN=yes
WITHOUT_GCC=yes
WITHOUT_GCC_BOOTSTRAP=yes
MALLOC_PRODUCTION?= yes
WITHOUT_DEBUG_FILES?= yes
MK_PROFILE?=    no  
WITHOUT_PROFILING?=     yes
WITHOUT_CTF?=   yes
WITHOUT_USB_GADGET_EXAMPLES?=yes
WITHOUT_INETD?=true
WITHOUT_TELNET?=        true
WITHOUT_SENDMAIL?=      yes
NO_I4B?=                true  
WITHOUT_ATM?=           yes
WITHOUT_IPX_SUPPORT?=   yes
WITHOUT_RBOOTD?=        yes
WITHOUT_LPR?=           yes
NO_BIND?=               true    
NO_BIND_DNSSEC?=        true    
NO_BIND_ETC?=           true    
NO_BIND_LIBS_LWRES?=    true    
NO_BIND_MTREE?=         true    
NO_BIND_NAMED?=         true
WITHOUT_LDNS?=          yes
WITHOUT_LDNS_UTILS?=    yes
WITHOUT_NETCAT?=        yes
WITHOUT_DICT?=          yes
WITHOUT_FINGER?=        yes
WITHOUT_FTP?=           yes
WITHOUT_CTM?=           yes

Similarly, my local make.conf

Code:
.if defined(MK_VERBOSE)
.if !empty(MAKE:Mfmake)
.warning Processing make.conf .CURDIR=${.CURDIR} .TARGETS=${.TARGETS}
.warning Initial CC=${CC} LD=${LD} LLVM_VER=${LLVM_VER}
.else
.info Processing make.conf .CURDIR=${.CURDIR} .TARGETS=${.TARGETS}
.info Initial CC=${CC} LD=${LD} LLVM_VER=${LLVM_VER}
.endif
.endif

CP=/bin/cp -f -p

.if !empty(.CURDIR:M/usr/ports*)
DEPENDS_TARGET=clean build package deinstall reinstall
.endif

.if exists(/var/pkglocal/packages)
PACKAGES=/var/pkglocal/packages
.elif exists(/mainpool/var/pkglocal)
PACKAGES=/mainpool/var/pkglocal
.else
.info "make.conf :  PACKAGES directory not found !!"
.endif

ALLOW_UNSUPPORTED_SYSTEM=YES

WITH_SSP_PORTS    = yes

CPUTYPE    ?= core2

MACHINE_CPU?    = mmx sse sse2 sse3 ssse3 sse41 sse42 i686 i586

CFLAGS        += -msse3 -O -pipe

COPTFLAGS    ?= -O -pipe

FORCE_MAKE_JOBS        ?= yes

MAKE_JOBS_NUMBER    ?= 6

MK_CCACHE_BUILD       ?= yes

.if !empty(MK_CCACHE_BUILD:M[Yy][Ee][Ss]) && !defined(CCACHE_DISABLE)
CCACHE_WRAPPER_PATH    ?= /usr/local/libexec/ccache
.if defined(MK_VERBOSE)
.info using CCACHE_WRAPPER_PATH    ${CCACHE_WRAPPER_PATH}
.endif
.else
MK_CCACHE_BUILD        = no
CCACHE_DISABLE        = yes
.export CCACHE_DISABLE
.if defined(MK_VERBOSE)
.info Disabling ccache (env CCACHE_DISABLE)
.endif
.endif 

CLANGBASE.llvmbase?=/usr
CC.llvmbase=${CLANGBASE.llvmbase}/bin/clang
CXX.llvmbase=${CLANGBASE.llvmbase}/bin/clang++
LD.llvmbase=${CLANGBASE.llvmbase}/bin/ld.lld

CLANGBASE.llvm4?=${LOCALBASE:U/usr/local}
CC.llvm4=${CCACHE_WRAPPER_PATH:U${CLANGBASE.llvm4}/bin}/clang40
CXX.llvm4=${CCACHE_WRAPPER_PATH:U${CLANGBASE.llvm4}/bin}/clang++40
LD.llvm4=${LD.llvmbase}

CLANGBASE.llvm5?=${LOCALBASE:U/usr/local}/llvm50
.if !defined(CCACHE_DISABLE) && exists(${CCACHE_WRAPPER_PATH}/clang50)
.if defined(MK_VERBOSE)
.info found clang 5 (ccache)
.endif
CC.llvm5=${CCACHE_WRAPPER_PATH}/clang50
.elif exists(${CLANGBASE.llvm5}/bin/clang)
.if defined(MK_VERBOSE)
.info found clang 5 (${CLANGBASE.llvm5})
.endif
CC.llvm5=${CLANGBASE.llvm5}/bin/clang
.endif

.if  !defined(CCACHE_DISABLE) && exists(${CCACHE_WRAPPER_PATH}/clang++50)
.if defined(MK_VERBOSE)
.info found clang++ 5 (ccache)
.endif
CXX.llvm5=${CCACHE_WRAPPER_PATH}/clang++50
.elif exists(${CLANGBASE.llvm5}/bin/clang++)
.if defined(MK_VERBOSE)
.info found clang++ 5 (${CLANGBASE.llvm5})
.endif
CXX.llvm5=${CLANGBASE.llvm5}/bin/clang++
.endif
LD.llvm5=${CLANGBASE.llvm5}/bin/ld.lld

CLANGBASE.llvm6?=${LOCALBASE:U/usr/local}/llvm60
.if  !defined(CCACHE_DISABLE) && exists(${CCACHE_WRAPPER_PATH}/clang60)
.if defined(MK_VERBOSE)
.info found clang 6 (ccache)
.endif
CC.llvm6=${CCACHE_WRAPPER_PATH}/clang60
.elif exists(${CLANGBASE.llvm6}/bin/clang)
.if defined(MK_VERBOSE)
.info found clang 6 (${CLANGBASE.llvm6})
.endif
CC.llvm6=${CLANGBASE.llvm6}/bin/clang
.endif
.if  !defined(CCACHE_DISABLE) && exists(${CCACHE_WRAPPER_PATH}/clang++60)
.if defined(MK_VERBOSE)
.info found clang++ 6 (ccache)
.endif
CXX.llvm6=${CCACHE_WRAPPER_PATH}/clang++60
.elif exists(${CLANGBASE.llvm6}/bin/clang++)
.if defined(MK_VERBOSE)
.info found clang++ 6 (${CLANGBASE.llvm6})
.endif
CXX.llvm6=${CLANGBASE.llvm6}/bin/clang++
.endif
LD.llvm6=${CLANGBASE.llvm6}/bin/ld.lld


CLANGBASE.llvm7?=${LOCALBASE:U/usr/local}/llvm70
.if !defined(CCACHE_DISABLE) && exists(${CCACHE_WRAPPER_PATH}/clang70)
.if defined(MK_VERBOSE)
.info found clang 7 (ccache)
.endif
CC.llvm7=${CCACHE_WRAPPER_PATH}/clang70
.elif exists(${CLANGBASE.llvm7}/bin/clang)
CC.llvm7=${CLANGBASE.llvm7}/bin/clang
.endif
.if !defined(CCACHE_DISABLE) && exists(${CCACHE_WRAPPER_PATH}/clang++70)
.if defined(MK_VERBOSE)
.info found clang++ 7 (ccache)
.endif
CXX.llvm7=${CCACHE_WRAPPER_PATH}/clang++70
.elif exists(${CLANGBASE.llvm7}/bin/clang++)
.if defined(MK_VERBOSE)
.info found clang++ 7 (${CLANGBASE.llvm7})
.endif
CXX.llvm7=${CLANGBASE.llvm7}/bin/clang++
.endif
LD.llvm7=${CLANGBASE.llvm7}/bin/ld.lld
.if exists(${CC.llvm7}) 
CC=${CC.llvm7}
CXX=${CXX.llvm7}
CPP=${CLANGBASE.llvm7}/bin/clang-cpp
LD=${LD.llvm7}
.if defined(MK_VERBOSE)
.info Using LLVM7 for CC, CXX, LD
.endif
.elif exists(${CC.llvm6}) 
CC=${CC.llvm6}
CXX=${CXX.llvm6}
CPP=${CLANGBASE.llvm6}/bin/clang-cpp
LD=${LD.llvm6}
.if defined(MK_VERBOSE)
.info Set LLVM6 as CC, LLD as LD
.endif
.elif exists(${CC.llvm5}) 
CC=${CC.llvm5}
CXX=${CXX.llvm5}
CPP=${CLANGBASE.llvm5}/bin/clang-cpp
LD=${LD.llvm5}
.if defined(MK_VERBOSE)
.info Set LLVM5 as CC, LLD as LD
.endif
.else
CC=${CC.llvmbase}
CXX=${CXX.llvmbase}
CPP=${CLANGBASE.llvmbase}/bin/clang-cpp
LD=${LD.llvmbase}
.if defined(MK_VERBOSE)
.info Set base LLVM as CC, LLD as LD
.endif
.endif

.if exists(/usr/local/libexec/ccache)
GCCBASE:=/usr/local/libexec/ccache
.else
GCCBASE:=${LOCALBASE:U/usr/local}/bin
.endif

CC.gcc6=${GCCBASE}/gcc6
CXX.gcc6=${GCCBASE}/g++6
LD.gcc6=${LOCALBASE:U/usr/local}/bin/ld
LDFLAGS.gcc6+=-Wl,-rpath=/usr/local/lib/gcc6

CC.gcc7=${GCCBASE}/gcc7
CXX.gcc7=${GCCBASE}/g++7
LD.gcc7=${LD.gcc6}

.if ${.CURDIR:M*/x11-fonts/webfonts}
WITH_MSWINDOWS_LICENSE    ?= yes
.endif

DEFAULT_VERSIONS    += ssl=openssl

.if ${.CURDIR:M*/ports/devel/ccache}
NO_CCACHE    ?= yes
.else
MK_CCACHE_BUILD    ?= yes
.endif

QT4_OPTIONS    = CUPS QGTKSTYLE

.if !empty(.CURDIR:M/usr/ports) && empty(.CURDIR:M*/lang/pypy) && empty(.CURDIR:M*/editors/emacs) 

CFLAGS += -fPIE -fPIC
CXXFLAGS += -fPIE -fPIC
LDFLAGS += -pie -fPIE -fPIC

.endif 

.if !empty(.CURDIR:M*/lang/gcc[4-9]) || !empty(.CURDIR:M*/lang/ghc) || !empty(.CURDIR:M*/devel/kBuild) || !empty(.CURDIR:M*/emulators/virtualbox-ose) 

.if !empty(.CURDIR:M*/devel/kBuild*)
.info exporting CC from make env
.export CC
.endif

.if exists(${CC.gcc6})
.info Set CC=${CC.gcc6} LD=${LD.gcc6}
.info while processing make.conf .CURDIR=${.CURDIR} .TARGETS=${.TARGETS}
CC:=${CC.gcc6}
CXX=${CXX.gcc6}
LD:=${LD.gcc6}
LDFLAGS+=${LDFLAGS.gcc6}
.else
.info GCC6 not available or not detected. Using CC=${CC} LD=${LD}
.info GCC6 referenced as ${CC.gcc6}
.endif 

.endif 

EMACS_PORT_NAME=emacs-devel

DEFAULT_VERSIONS+=linux=c7
DEFAULT_VERSIONS+=    emacs=devel_full
DEFAULT_VERSIONS+=    perl5=5.28
DEFAULT_VERSIONS+=    python=2.7
DEFAULT_VERSIONS+=    python2=2.7
DEFAULT_VERSIONS+=    python3=3.6 
DEFAULT_VERSIONS+=    lua=5.3
DEFAULT_VERSIONS+=    php=7.2
DEFAULT_VERSIONS+=    ruby=2.5
DEFAULT_VERSIONS+=    tcltk=8.7
DEFAULT_VERSIONS+=    varnish=6
DEFAULT_VERSIONS+=    bdb=5
DEFAULT_VERSIONS+=    samba=4.8

CFLAGS += -Wno-thread-safety-analysis


I know that there's freebsd-update. I could try using that at least to get around the following message from ports. Though I'm not certain of it but I would imagine that if I would still run into the same local build failure in the base system build, even after a freebsd-update -- it's been a persistent build failure, locally.

Code:
/!\ WARNING /!\

Ports Collection support for your FreeBSD version has ended, and no ports are
guaranteed to build on this system. Please upgrade to a supported release.

I'm seeing that message from ports, both with 11.1-STABLE from a local build, and with 11.1-RELEASE installed from a previous freebsd-update .... on the second of the two machines on which I'm seeing this build failure. It would be nice to be able to upgrade using an src build, but there's this build failure.


I'm hoping that I may be able to use the improved support for Intel GPUs in 11.2, and hoping that the local build may be a little more responsive when used as a desktop OS. This build failure is really confounding me, though.


For everything I've tried to adjust for WITH and WITHOUT options in /etc/src.conf and with or without ccache and with all LLVM 4, LLVM 5, and LLVM 6, it's still the same build failure.

I've looked at the source code for the affected files. Though I'm not a lot of fluent in C, it looks like there may be some macros being used there.

The nearest thing I can think to try, for any further QA about it locally, is to start taking a look at CTAGS to see if I can find where those macros (??) are defined and how they may be affecting the build


If there's any advice available as to how to resolve this build failure, I'm sure I could appreciate any advice as to that effect. it would be nice to not be running 11.1 indefinitely
 
My second guess, a little nearer than the idea to dig further into the source code at this point: If I can get the build system to conditionally use GCC for building gdtoa ... I've had some success in selecting GCC for specific ports, so maybe it could work out then. Will give it a try, shortly ....
 
I suggest you start by sanitizing src.conf:

Code:
WITH_CLANG_BOOTSTRAP=yes
WITHOUT_CLANG_BOOTSTRAP=yes
That is just stupid.

So my suggestion is to check src.conf(5) and verify what each option does and if you really need to include it. For example: WITHOUT_GCC= is already a default setting on most platforms, so specifying that is pretty much useless.

Also noteworthy is that you don't need to specify yes or true or anything like that because this isn't a toggle but merely the enabling of the option. Just using OPTION= is already enough, also explained in src.conf(5). For example: MK_PROFILE= no is totally meaningless.

Another important detail: if you're still running 11.1 and are building for 11.2 then your manualpage obviously won't show the full set of available options. Ergo: cd /usr/src; man -M ./share/man src.conf will help to check the relevant options for the source tree you're building against (or use the online version of course).

Finally: just because you can specify certain options doesn't imply that you should. And the same applies to the building process itself. It might be much more beneficial to simply use freebsd-update and leave the building process for a jail or something.
 
That is just stupid.

As I tried to explain in my initial post, I've been trying different settings for src.conf in an effort to get the build to avoid the failure point.

Some of the build options I'm using are still from 10 series. I understand that there have been some updates, e.g BIND removed from the base system. For what I've been adding to the build that worked for 11.1, my reference has been mostly onto /usr/src/tools/build/options in which the ROFF syntax of those files is clear enough regardless.

Thanks for the advice, though. I think I'll try setting up a conditional GCC compile for that particular component, maybe it'll work out this time. Nothing I've added or removed since the initial 11.1 config has changed anything, to that failure point.

[Edit]

I've modified my make.conf to use GCC for the component where the build failure is occurring. Although not any more useful than any of the configuration changes so far, at this build failure, it's more informative though.

GCC emits a slightly different error message, then. At that point, it looks quite similar to the following: Re: svn commit: r328973 - in stable/11: include sys/sys [svn-src-all@freebsd.org via mail-archive]

The text of the error message as emitted by GCC7, when building 11.2-RELEASE src:

Code:
Building /usr/obj/usr/src/lib/libc/machdep_ldisx.o                                                                                                                  
In file included from /usr/src/contrib/gdtoa/gdtoaimp.h:197:0,                                                                                                      
                 from /usr/src/lib/libc/gdtoa/machdep_ldisx.c:43:                                                                                                   
/usr/src/include/stdlib.h:93:7: error: expected ',' or ';' before '__alloc_size2'                                                                                   
       __alloc_size2(1, 2);                                                                                                                                         
       ^~~~~~~~~~~~~                                                                                                                                                
/usr/src/include/stdlib.h:311:6: error: expected ',' or ';' before '__alloc_size2'                                                                                  
      __alloc_size2(2, 3);                                                                                                                                          
      ^~~~~~~~~~~~~                                                                                                                                                 
*** Error code 1

As I'm even less familiar with the details of libc malloc() and similar functions than with the C language overall -- or of the details of the implementation of these functions in LLVM and in FreeBSD -- maybe it'll be a complex kind of issue to debug, still.

Whether in the form of the error emitted by LLVM or that emitted by GCC, it seems that a similar issue has occurred sometimes, with some components in ports and at least one component in the base system. So, I suppose it's not an entirely new thing, though I'm newly confounded of how to work around it, or what exactly is the cause of the build failure.

Considering the content of the mailing list thread, as referenced, maybe this particular issue may somehow disappear after running a freebsd-update on the build host. Intractable thing that it may seem to be, that may be the next tractable option though. Maybe the build failure won't recur after running freebsd-update then building from the updated host.
 
Unless you know what you're doing (and can also oversee the results) then I'd definitely recommend not messing with anything compiler related. This is also why I mentioned that care should be taken with "just" disabling options: because even if you manage to cleanly build your base system it is possible that you left out so many tools and/or options that the new system can't build the world anymore because of those missing aspects. Something you wouldn't see coming.

First step to check if something is wrong somewhere is to remove src.conf and try to build a default base and GENERIC kernel. If that succeeds then you'll know that whatever caused this was a result of too much tinkering. Then you can add a few options to /etc/src.conf but only those you'd really need, nothing compiling or building related.

That's the best way to try and find a possible cause.
 
I know this is an old thread, but machdep_ldisx is also causing a buildworld failure here with stable-13, head, and with or without both make.conf and src.conf. I'm stumped... [ it does not cause other forum member(s) a buildworld failure... AFAIK ]
 
easily duplicated by changing to /usr/src/lib/libc and running make...
/edit/ ...
.... solved here [ other thread has details ].
 
Last edited:
Back
Top