Hi All, I am working on Compressed Cache project for NetBSD ( https://wiki.netbsd.org/projects/project/compressed-cache/) . I am trying to set up the cross compilation environment for NetBSD current. Copying tech-kern in this email since my emails to current-users seems to be not getting delivered).
Host machine (where I am compiling): Ubuntu(64-bit) running on x86_64 Target architecture (where I intend to boot NetBSD): amd64 I am trying to compile tools using build.sh. Command used: /build.sh -U -m amd64 tools I see a bunch of compiler errors saying compilation terminated since a file was not found (#include <sys/disk.h> fails with file not found). Eventually the build fails with message "ERROR: Failed to make build_install in "tools"". Attaching the last few lines of the build log. I was able to cross compile 6-1-4 release branch. hence I am guessing that I have all the necessary tools installed properly. Any help will be helpful and greatly appreciated. Thanks, Vinay #################################################################################################################################### /usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/bin/nbhost-mkdep -f biosboot.d.tmp -- -I/usr/NetBSD_Current/tools/gpt -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/nbinclude -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/compat -I/usr/NetBSD_Current/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 /usr/NetBSD_Current/tools/gpt/../../sbin/gpt/biosboot.c && mv biosboot.d.tmp biosboot.d /usr/NetBSD_Current/tools/gpt/../../sbin/gpt/biosboot.c:46:22: fatal error: sys/disk.h: No such file or directory #include <sys/disk.h> ^ compilation terminated. # create gpt/create.d /usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/bin/nbhost-mkdep -f create.d.tmp -- -I/usr/NetBSD_Current/tools/gpt -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/nbinclude -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/compat -I/usr/NetBSD_Current/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 /usr/NetBSD_Current/tools/gpt/../../sbin/gpt/create.c && mv create.d.tmp create.d # create gpt/dehumanize_number.d /usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/bin/nbhost-mkdep -f dehumanize_number.d.tmp -- -I/usr/NetBSD_Current/tools/gpt -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/nbinclude -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/compat -I/usr/NetBSD_Current/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 /usr/NetBSD_Current/tools/gpt/../../lib/libc/gen/dehumanize_number.c && mv dehumanize_number.d.tmp dehumanize_number.d # create gpt/destroy.d /usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/bin/nbhost-mkdep -f destroy.d.tmp -- -I/usr/NetBSD_Current/tools/gpt -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/nbinclude -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/compat -I/usr/NetBSD_Current/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 /usr/NetBSD_Current/tools/gpt/../../sbin/gpt/destroy.c && mv destroy.d.tmp destroy.d # create gpt/gpt.d /usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/bin/nbhost-mkdep -f gpt.d.tmp -- -I/usr/NetBSD_Current/tools/gpt -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/nbinclude -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/compat -I/usr/NetBSD_Current/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 /usr/NetBSD_Current/tools/gpt/../../sbin/gpt/gpt.c && mv gpt.d.tmp gpt.d /usr/NetBSD_Current/tools/gpt/../../sbin/gpt/gpt.c:43:22: fatal error: sys/disk.h: No such file or directory #include <sys/disk.h> ^ compilation terminated. # create gpt/gpt_uuid.d /usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/bin/nbhost-mkdep -f gpt_uuid.d.tmp -- -I/usr/NetBSD_Current/tools/gpt -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/nbinclude -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/compat -I/usr/NetBSD_Current/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 /usr/NetBSD_Current/tools/gpt/../../sbin/gpt/gpt_uuid.c && mv gpt_uuid.d.tmp gpt_uuid.d # create gpt/label.d /usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/bin/nbhost-mkdep -f label.d.tmp -- -I/usr/NetBSD_Current/tools/gpt -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/nbinclude -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/compat -I/usr/NetBSD_Current/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 /usr/NetBSD_Current/tools/gpt/../../sbin/gpt/label.c && mv label.d.tmp label.d # create gpt/map.d /usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/bin/nbhost-mkdep -f map.d.tmp -- -I/usr/NetBSD_Current/tools/gpt -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/nbinclude -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/compat -I/usr/NetBSD_Current/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 /usr/NetBSD_Current/tools/gpt/../../sbin/gpt/map.c && mv map.d.tmp map.d # create gpt/migrate.d /usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/bin/nbhost-mkdep -f migrate.d.tmp -- -I/usr/NetBSD_Current/tools/gpt -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/nbinclude -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/compat -I/usr/NetBSD_Current/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 /usr/NetBSD_Current/tools/gpt/../../sbin/gpt/migrate.c && mv migrate.d.tmp migrate.d # create gpt/opendisk.d /usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/bin/nbhost-mkdep -f opendisk.d.tmp -- -I/usr/NetBSD_Current/tools/gpt -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/nbinclude -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/compat -I/usr/NetBSD_Current/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 /usr/NetBSD_Current/tools/gpt/../../lib/libutil/opendisk.c && mv opendisk.d.tmp opendisk.d # create gpt/recover.d /usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/bin/nbhost-mkdep -f recover.d.tmp -- -I/usr/NetBSD_Current/tools/gpt -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/nbinclude -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/compat -I/usr/NetBSD_Current/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 /usr/NetBSD_Current/tools/gpt/../../sbin/gpt/recover.c && mv recover.d.tmp recover.d # create gpt/remove.d /usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/bin/nbhost-mkdep -f remove.d.tmp -- -I/usr/NetBSD_Current/tools/gpt -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/nbinclude -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/compat -I/usr/NetBSD_Current/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 /usr/NetBSD_Current/tools/gpt/../../sbin/gpt/remove.c && mv remove.d.tmp remove.d # create gpt/resize.d /usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/bin/nbhost-mkdep -f resize.d.tmp -- -I/usr/NetBSD_Current/tools/gpt -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/nbinclude -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/compat -I/usr/NetBSD_Current/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 /usr/NetBSD_Current/tools/gpt/../../sbin/gpt/resize.c && mv resize.d.tmp resize.d # create gpt/resizedisk.d /usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/bin/nbhost-mkdep -f resizedisk.d.tmp -- -I/usr/NetBSD_Current/tools/gpt -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/nbinclude -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/compat -I/usr/NetBSD_Current/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 /usr/NetBSD_Current/tools/gpt/../../sbin/gpt/resizedisk.c && mv resizedisk.d.tmp resizedisk.d # create gpt/set.d /usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/bin/nbhost-mkdep -f set.d.tmp -- -I/usr/NetBSD_Current/tools/gpt -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/nbinclude -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/compat -I/usr/NetBSD_Current/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 /usr/NetBSD_Current/tools/gpt/../../sbin/gpt/set.c && mv set.d.tmp set.d # create gpt/show.d /usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/bin/nbhost-mkdep -f show.d.tmp -- -I/usr/NetBSD_Current/tools/gpt -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/nbinclude -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/compat -I/usr/NetBSD_Current/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 /usr/NetBSD_Current/tools/gpt/../../sbin/gpt/show.c && mv show.d.tmp show.d # create gpt/type.d /usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/bin/nbhost-mkdep -f type.d.tmp -- -I/usr/NetBSD_Current/tools/gpt -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/nbinclude -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/compat -I/usr/NetBSD_Current/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 /usr/NetBSD_Current/tools/gpt/../../sbin/gpt/type.c && mv type.d.tmp type.d # create gpt/unset.d /usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/bin/nbhost-mkdep -f unset.d.tmp -- -I/usr/NetBSD_Current/tools/gpt -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/nbinclude -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/compat -I/usr/NetBSD_Current/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 /usr/NetBSD_Current/tools/gpt/../../sbin/gpt/unset.c && mv unset.d.tmp unset.d # create gpt/.depend rm -f .depend /usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/bin/nbhost-mkdep -s .lo\ .ln -d -f .depend add.d biosboot.d create.d dehumanize_number.d destroy.d gpt.d gpt_uuid.d label.d map.d migrate.d opendisk.d recover.d remove.d resize.d resizedisk.d set.d show.d type.d unset.d # compile gpt/add.lo cc -O -I/usr/NetBSD_Current/tools/gpt -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/nbinclude -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/compat -I/usr/NetBSD_Current/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -c -o add.lo.o /usr/NetBSD_Current/tools/gpt/../../sbin/gpt/add.c mv add.lo.o add.lo # compile gpt/biosboot.lo cc -O -I/usr/NetBSD_Current/tools/gpt -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/nbinclude -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/compat -I/usr/NetBSD_Current/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -c -o biosboot.lo.o /usr/NetBSD_Current/tools/gpt/../../sbin/gpt/biosboot.c /usr/NetBSD_Current/tools/gpt/../../sbin/gpt/biosboot.c:46:22: fatal error: sys/disk.h: No such file or directory #include <sys/disk.h> ^ compilation terminated. *** Failed target: biosboot.lo *** Failed command: cc -O -I/usr/NetBSD_Current/tools/gpt -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/nbinclude -I/usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/include/compat -I/usr/NetBSD_Current/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -c -o biosboot.lo.o /usr/NetBSD_Current/tools/gpt/../../sbin/gpt/biosboot.c *** Error code 1 Stop. nbmake[3]: stopped in /usr/NetBSD_Current/tools/gpt *** Failed target: dependall *** Failed command: cd "/usr/NetBSD_Current/tools/gpt"; /usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/bin/nbmake realall *** Error code 1 Stop. nbmake[2]: stopped in /usr/NetBSD_Current/tools/gpt *** Failed target: dependall-gpt *** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; real="/usr/NetBSD_Current/tools" ;; *) this="${dir}/"; real="/usr/NetBSD_Current/tools/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget gpt dependall *** Error code 1 Stop. nbmake[1]: stopped in /usr/NetBSD_Current/tools *** Failed target: build_install *** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; real="/usr/NetBSD_Current/tools" ;; *) this="${dir}/"; real="/usr/NetBSD_Current/tools/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /usr/NetBSD_Current/obj/tooldir.Linux-3.11.0-12-generic-x86_64/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget . dependall-disklabel dependall-gpt *** Error code 1 Stop. nbmake: stopped in /usr/NetBSD_Current/tools ERROR: Failed to make build_install in "tools" *** BUILD ABORTED *** ####################################################################################################################################