[Bug 280482] Buildworld fails with error: invalid argument '-std=gnu99' not allowed with 'C++'
Date: Sun, 28 Jul 2024 19:56:46 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280482 Bug ID: 280482 Summary: Buildworld fails with error: invalid argument '-std=gnu99' not allowed with 'C++' Product: Base System Version: 14.0-STABLE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: conf Assignee: bugs@FreeBSD.org Reporter: zagazaw2004@gmail.com Hello, I'm following this guide to update FreeBSD 14.0-STABLE and I keep getting this: **************************************************************************** ===> usr.sbin/config (obj,all,install) [Creating objdir /usr/obj/usr/src/amd64.amd64/tmp/obj-tools/usr.sbin/config...] yacc -d /usr/src/usr.sbin/config/config.y yacc: 3 rules never reduced cp y.tab.c config.c lex -olang.c /usr/src/usr.sbin/config/lang.l file2c 'char kernconfstr[] = {' ',0};' < /usr/src/usr.sbin/config/kernconf.tmpl > kernconf.c echo config.full: /usr/lib/libc.a /usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/lib/libegacy.a >> .depend echo config.full: /usr/lib/libc++.a >> .depend /usr/local/bin/ccache clang -O2 -pipe -O -O2 -pipe -march=skylake -fno-common -I. -I/usr/src/usr.sbin/config \ -g -gz=zlib -MD -MF.depend.config.o -MTconfig.o -std=gnu99 -Wno-format-zero-length -Wsystem-headers -Wall -Wno-format-y2k > /usr/local/bin/ccache clang++ -O2 -pipe -O -O2 -pipe -march=skylake -fno-common -I. -I/usr/src/usr.sbin/config \ -g -gz=zlib -MD -MF.depend.main.o -MTmain.o -Wno-format-zero-length -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-> error: invalid argument '-std=gnu99' not allowed with 'C++' *** Error code 1 Stop. make[3]: stopped in /usr/src/usr.sbin/config *** Error code 1 Stop. make[2]: stopped in /usr/src 8.11 real 4.98 user 2.96 sys *** Error code 1 Stop. make[1]: stopped in /usr/src *** Error code 1 Stop. make: stopped in /usr/src ***************************************************************************** $ uname -a FreeBSD redbox 14.0-STABLE FreeBSD 14.0-STABLE GENERIC amd64 ***************************************************************************** # cat /etc/make.conf CPUTYPE=skylake CFLAGS+= -O -O2 -pipe -march=${CPUTYPE} CXXFLAGS+=${CFLAGS} MACHINE_CPU+= avx2 avx sse42 sse41 ssse3 sse3 sse2 sse amd64 f16c mmx MAKE_JOBS_NUMBER= 16 OPTIONS_UNSET+= QT5 QT6 CUPS VESA SCFB TWM XCONSOLE XCLOCK GNOME KDE EXAMPLES \ DEBUG ASPELL CC=clang CXX=clang++ CPP=clang-cpp NO_SENDMAIL=true ******************************************************************************* # cat /etc/src.conf WITH_CCACHE_BUILD=yes WITHOUT_SENDMAIL=yes WITHOUT_TALK=yes WITHOUT_TELNET=yes WITHOUT_TFTP=yes WITHOUT_IPFILTER=yes WITHOUT_FLOPPY=yes WITHOUT_GAMES=yes ******************************************************************************** Threads I read and didn't help solve this issue (I'm not trying to use GCC and I'd like to stay with LLVM/clang if possible): https://forums.freebsd.org/threads/trying-to-build-a-linux-c-program-on-freebsd-14-with-gcc9.92731/ https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=251170 -- You are receiving this mail because: You are the assignee for the bug.