Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Jul 2017 11:06:39 -0700
From:      Fred <fred@SUNBOT.Homedns.ORG>
To:        freebsd-questions@freebsd.org
Subject:   Painted myself into a corner....
Message-ID:  <201707311808.v6VI8GYG054011@sunbot.homedns.org>

next in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707311808.v6VI8GYG054011>