From owner-freebsd-questions@freebsd.org Mon Jul 31 18:09:05 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11A7FDB5D3B for ; Mon, 31 Jul 2017 18:09:05 +0000 (UTC) (envelope-from fred@sunbot.homedns.org) Received: from resqmta-po-09v.sys.comcast.net (resqmta-po-09v.sys.comcast.net [IPv6:2001:558:fe16:19:96:114:154:168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "resqmta-po-01v.sys.comcast.net", Issuer "COMODO RSA Organization Validation Secure Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D9F062F8F for ; Mon, 31 Jul 2017 18:09:04 +0000 (UTC) (envelope-from fred@sunbot.homedns.org) Received: from resomta-po-01v.sys.comcast.net ([96.114.154.225]) by resqmta-po-09v.sys.comcast.net with ESMTP id cF74dgShkrtUOcF74dbbFR; Mon, 31 Jul 2017 18:08:18 +0000 Received: from sunbot.homedns.org ([73.241.96.95]) by resomta-po-01v.sys.comcast.net with SMTP id cF73dwvbo9FqscF74ds1I6; Mon, 31 Jul 2017 18:08:18 +0000 Received: from sparky.sunbot.homedns.org (sparky [192.168.0.140]) (authenticated bits=0) by sunbot.homedns.org (8.15.2/8.15.2) with ESMTPSA id v6VI8GYG054011 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 31 Jul 2017 11:08:17 -0700 (PDT) (envelope-from fred@sunbot.homedns.org) Message-Id: <201707311808.v6VI8GYG054011@sunbot.homedns.org> X-Authentication-Warning: sunbot.homedns.org: Host sparky [192.168.0.140] claimed to be sparky.sunbot.homedns.org Date: Mon, 31 Jul 2017 11:06:39 -0700 From: Fred To: freebsd-questions@freebsd.org Subject: Painted myself into a corner.... User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 EasyPG/1.0.0 Emacs/26.0 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Milter: Spamilter (Reciever: sunbot.homedns.org; Sender-ip: 192.168.0.140; Sender-helo: sparky.sunbot.homedns.org; ) X-CMAE-Envelope: MS4wfFty9uobjpsZ8TXmbFkLwFY8yGmV/oztgTsZfcU1HD4DJNQe+nkw1Pl9tZK0dRMl0P3ug1TDQ9T+scxwspfv8bAxT42M+gZjO8+mAFePiZW9sdEEKSZl k+gy7Br76WwDHmD+Z+Tz1laHsVg3/tKyaE30hoen5kY88y9wYWhIqwZTB4ywLNY6jPU4itOKBrC/UA== X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 18:09:05 -0000 I have been updating my system from source since time immemorial. A while back I updated to FreeBSD 10.3 and then FreeBSD 10-stable. In the process I decided that I didn't need 23 different compilers (ok, that's a bit of an exaggeration). I need a GCC compiler for a particular application I help maintain (CMU Lisp). And I figured I only needed one Clang compiler. So I installed Clang 4 and set NO_CLANG in my src.conf. Here's my src.conf: ---------------------------------------- CC=/usr/local/bin/clang40 CXX=/usr/local/bin/clang++40 CPP=/usr/local/bin/clang-cpp40 WITHOUT_ACCT=yes WITHOUT_ATM=yes WITHOUT_BLUETOOTH=yes WITHOUT_CAPSICUM=yes WITHOUT_CLANG=yes WITHOUT_FLOPPY=yes WITHOUT_GPIB=yes WITHOUT_GPIO=yes # WITHOUT_HYPERV=yes WITHOUT_IPX=yes WITHOUT_KERBEROS=yes WITHOUT_NDIS=yes WITHOUT_PC_SYSINSTALL=yes WITHOUT_QUOTAS=yes WITHOUT_RADIUS_SUPPORT=yes WITHOUT_RESCUE=yes WITHOUT_SHAREDOCS=yes WITHOUT_SENDMAIL=yes WITHOUT_UNBOUND=yes WITHOUT_WIRELESS=yes WITHOUT_ZFS=yes NO_PROFILE=true ---------------------------------------- I happily built the system and a custom kernel and everything was fine until I went for a couple months without building. Suddenly /usr/src won't build. It is either not finding various include files or finding outdated versions. It looks like it's looking in /usr/include instead of the /usr/src version of the includes. Thinking it was just a minor problem I tried copying a few include files into /usr/include/sys from /usr/src/sys/sys but the problem seems pervasive. There are many include files that aren't found or that have changed from /usr/include. I speculated that perhaps rebuilding the Clang toolchain in /usr/src might fix this, but I can't; errors occur too early in the process. Any suggestions for how I can get back to a buildable state? I've tried re-fetching /usr/src. I also tried going to the releng-10.3 version. But nothing works. Here's the latest error I get, just to give an idea. These identifiers are declared in include files in /usr/src/sys/mman.h but not in /usr/include/sys/mman.h. --- ioctl.o --- /usr/local/bin/clang40 -O2 -pipe -I/usr/src/usr.bin/kdump/../ktrace -I/usr/src/usr.bin/kdump -I/usr/src/usr.bin/kdump/../.. -I. -DPF -std=gnu99 -Qunused-arguments -fstack-protector -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 -Wmissing-variable-declarations -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -c ioctl.c -o ioctl.o --- kdump_subr.o --- kdump_subr.c:593:7: error: use of undeclared identifier 'INHERIT_ZERO' case INHERIT_ZERO: ^ kdump_subr.c:2348:24: error: use of undeclared identifier 'MAP_GUARD' if (!((flags > 0) ^ ((MAP_GUARD) > 0))) ^ kdump_subr.c:2349:22: error: use of undeclared identifier 'MAP_GUARD' if_print_or(flags, MAP_GUARD, or); ^ kdump_subr.c:2349:22: error: use of undeclared identifier 'MAP_GUARD' 4 errors generated. *** [kdump_subr.o] Error code 1 make[4]: stopped in /usr/src/usr.bin/kdump --- ioctl.o --- In file included from ioctl.c:51: /usr/include/dev/lmc/if_lmc.h:939:13: warning: no previous extern declaration for non-static variable 'ssi_cables' [-Wmissing-variable-declarations] const char *ssi_cables[] = ^ 1 warning generated. 1 error make[4]: stopped in /usr/src/usr.bin/kdump *** [all_subdir_kdump] Error code 2 make[3]: stopped in /usr/src/usr.bin 1 error make[3]: stopped in /usr/src/usr.bin *** [usr.bin.all__D] Error code 2 make[2]: stopped in /usr/src --- usr.sbin.all__D --- A failure has been detected in another branch of the parallel make make[4]: stopped in /usr/src/usr.sbin/faithd *** [all_subdir_faithd] Error code 2 make[3]: stopped in /usr/src/usr.sbin 1 error make[3]: stopped in /usr/src/usr.sbin *** [usr.sbin.all__D] Error code 2 make[2]: stopped in /usr/src 2 errors make[2]: stopped in /usr/src *** [everything] Error code 2 make[1]: stopped in /usr/src 1 error make[1]: stopped in /usr/src *** [buildworld] Error code 2 make: stopped in /usr/src 1 error make: stopped in /usr/src root@sunbot:/usr/src # -- Fred Gilham fred@sunbot.homedns.org just make me lighter make me lighter still 'til the yellow of the sun takes me [oh what Lazarus saw! I cannnot bear this anymore!] -- Linshuang Lu