Solved Unable to compile dump on 12.2-release

Hi all
I have a server running 12.2 RELEASE which until q2 months back was running 10.2-RELEASE.
I used freebsd-update for the upgrade.

Since then dump has exited with this error
Code:
Assertion failed: (spcl.c_count + blks < TP_NINDIR), function appendextdata, file /usr/src/sbin/dump/traverse.c, line 759.
exactly as in the thread at https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244470

I do not want to go back to compiling from source but the fix for this bug is only in -STABLE at this time.

I thought I could just recompile dump by itself, I used to compile from source (FBSD5 till 9 were all compile upgrades IIRC, takes ages on this Intel server!) but now I get this (before and/or after applying the patch to traverse.c)
Code:
@/usr/src/sbin/dump> make
cc  -O -pipe -fno-common -DRDUMP   -g -MD  -MF.depend.itime.o -MTitime.o -std=gnu99 -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments  -c /usr/src/sbin/dump/itime.c -o itime.o
In file included from /usr/src/sbin/dump/itime.c:40:
In file included from /usr/include/sys/param.h:96:
In file included from /usr/include/sys/types.h:46:
/usr/include/machine/endian.h:6:10: fatal error: 'x86/endian.h' file not found
#include <x86/endian.h>
         ^~~~~~~~~~~~~~
1 error generated.
*** Error code 1
I have confirmed that endian.h exists in several places in the source tree (like ..../x86/include/endian.h), and if I force it to be found by doing something like
export CPATH=/usr/src/sys && make
then it fails to find x86/signal.h instead, pointing to a more systematic include path problem.
I did git clone the source tree today, and I tried a 'make buildworld' with similar errors.
(maybe I need to refresh /usr/include too? if so, how?)

I have been trying to figure out where and how the build system sets the include paths, figuring I can maybe then see what is wrong, but I have gotten lost in the maze of .mk files. Also tried to find an option for cc to display the include paths without success.
Please can someone point me in the right direction to fix this.

Thanks
 
Thankyou, this has enabled me to fetch a STABLE dump binary that appears to be ok, will know for sure after tonights dump run.
Note that this box is running i386 not amd64 so I downloaded that version.

However, this does not solve my actual compiling problem.
/usr/src contains the following endian.h files:
Code:
./contrib/ofed/include/endian.h
./contrib/openbsm/compat/endian.h
./sys/amd64/include/endian.h
./sys/arm/include/endian.h
./sys/arm64/include/endian.h
./sys/i386/include/endian.h
./sys/mips/include/endian.h
./sys/powerpc/include/endian.h
./sys/riscv/include/endian.h
./sys/sparc64/include/endian.h
./sys/sys/endian.h
./sys/x86/include/endian.h
./usr.bin/mkimg/endian.h
none of which match the path that the source files actually include, namely:
Code:
#include <x86/endian.h>
as indicated by the error messages:
Code:
In file included from /usr/src/sbin/dump/itime.c:40:
In file included from /usr/include/sys/param.h:96:
In file included from /usr/include/sys/types.h:46:
/usr/include/machine/endian.h:6:10: fatal error: 'x86/endian.h' file not found

If I force this file to be found by copying ./sys/x86/include/endian.h to ./sys/x86/ and then adding /usr/src/sys to CPATH then it finds endian.h but fails to find <x86/signal.h> and I have no doubt that if I copy that file to the x86 folder then it will fail to find some other .h file because something in the build environment is broken that I need to fix. This is what I really need help with (-:
 
It appears I have found the problem and solution.
/usr/include/x86 was missing the endian.h file, and some others, which I replaced from
and now dump will compile correctly. (so the /usr/src make system is not as selfcontained as we hoped, it needs /usr/include/ as well)

Exactly how my base system ended up with missing files will forever be a mystery, like I said, this was first installed as FreeBSD 5 and has been upgraded mostly through source compiles of every major version till 9.x and lately using freebsd-update to get to 12.2-RELEASE
 
MD5 (/usr/src/sys/x86/include/endian.h) = 6bc242616715656e5bd4e55564e62546
MD5 (/usr/include/x86/endian.h) = 6bc242616715656e5bd4e55564e62546
on a 12.2-RELEASE box
 
Back
Top