11.0: amd64 -> powerpc64/armv6 -r302331 -> -r302412 re-cross-builds (updates): got "sh: ./make_keys: Exec format error" again for init_ketry.h in ncursesw
Mark Millard
markmi at dsl-only.net
Sat Jul 9 21:13:37 UTC 2016
[Sending to freebsd-ppc this time, now that I've tried such a cross build.]
[Before the below cross build/update attempt I updated my amd64 from -r302331 -> -r302412.]
Summary: It appears that WITHOUT_META_MODE= still needs to be forced for cross compiles at least sometimes in order to avoid "Exec format error". man src.conf only mentions WITHOUT_META_MODE= in one place:
> WITH_DIRDEPS_BUILD
. . .
> WITH_META_MODE (unless WITHOUT_META_MODE is set explicitly)
. . .
> This must be set in the environment, make command line, or
> /etc/src-env.conf, not /etc/src.conf.
Any cross build to an incompatible TARGET_ARCH likely has this sort of issue at certain specific places in the WITH_META_MODE build if they are rebuilt instead of skipped.
In attempting to update my cross build (amd64 -> armv6 or powerpc64) from -r302331 to -r302412 it failed with the likes of (powerpc64 example using powerpc64-gcc to build based a libc++ based 11.0):
> --- init_keytry.h ---
> sh: ./make_keys: Exec format error
> . . .
> --- lib/ncurses/ncursesw__L ---
> *** [init_keytry.h] Error code 126
>
> make[4]: stopped in /usr/src/lib/ncurses/ncursesw
> .ERROR_TARGET='init_keytry.h'
> .ERROR_META_FILE='/usr/obj/xtoolchain/powerpc.powerpc64/usr/src/lib/ncurses/ncursesw/init_keytry.h.meta'
> .MAKE.LEVEL='4'
> MAKEFILE=''
> .MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose'
> .CURDIR='/usr/src/lib/ncurses/ncursesw'
> .MAKE='make'
> .OBJDIR='/usr/obj/xtoolchain/powerpc.powerpc64/usr/src/lib/ncurses/ncursesw'
> .TARGETS='all'
> DESTDIR='/usr/obj/xtoolchain/powerpc.powerpc64/usr/src/tmp'
> LD_LIBRARY_PATH=''
> MACHINE='powerpc'
> MACHINE_ARCH='powerpc64'
> MAKEOBJDIRPREFIX='/usr/obj/xtoolchain/powerpc.powerpc64'
> MAKESYSPATH='/usr/src/share/mk'
> MAKE_VERSION='20160606'
> PATH='/usr/obj/xtoolchain/powerpc.powerpc64/usr/src/tmp/legacy/usr/sbin:/usr/obj/xtoolchain/powerpc.powerpc64/usr/src/tmp/legacy/usr/bin:/usr/obj/xtoolchain/powerpc.powerpc64/usr/src/tmp/legacy/bin:/usr/obj/xtoolchain/powerp
> c.powerpc64/usr/src/tmp/usr/sbin:/usr/obj/xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin'
> SRCTOP='/usr/src'
> OBJTOP='/usr/obj/xtoolchain/powerpc.powerpc64/usr/src'
> .MAKE.MAKEFILES='/usr/src/share/mk/sys.mk /usr/src/share/mk/local.sys.env.mk /usr/src/share/mk/src.sys.env.mk /root/src.configs/src.conf.powerpc64-xtoolchain.amd64-host /usr/src/share/mk/bsd.mkopt.mk /root/src.configs/make.conf /usr/src/share/mk/local.sys.mk /usr/src/share/mk/src.sys.mk /etc/src.conf /usr/src/lib/ncurses/ncursesw/Makefile /usr/src/lib/ncurses/ncursesw/../ncurses/Makefile /usr/src/share/mk/src.opts.mk /usr/src/share/mk/bsd.own.mk /usr/src/share/mk/bsd.opts.mk /usr/src/share/mk/bsd.cpu.mk /usr/src/share/mk/bsd.compiler.mk /usr/src/share/mk/bsd.compiler.mk /usr/src/lib/ncurses/ncursesw/../config.mk /usr/src/share/mk/bsd.lib.mk /usr/src/share/mk/bsd.init.mk /usr/src/share/mk/local.init.mk /usr/src/share/mk/src.init.mk /usr/src/lib/ncurses/ncursesw/../Makefile.inc /usr/src/lib/ncurses/ncursesw/../../Makefile.inc /usr/src/share/mk/bsd.libnames.mk /usr/src/share/mk/src.libnames.mk /usr/src/share/mk/bsd.symver.mk /usr/src/share/mk/bsd.nls.mk /usr/src/share/mk/bsd.files.mk /usr/src/share/mk/bsd.incs.mk /usr/src/share/mk/bsd.confs.mk /usr/src/share/mk/bsd.links.mk /usr/src/share/mk/bsd.dep.mk /usr/src/share/mk/bsd.clang-analyze.mk /usr/src/share/mk/bsd.obj.mk /usr/src/share/mk/bsd.subdir.mk /usr/src/share/mk/bsd.sys.mk'
> .PATH='. /usr/src/lib/ncurses/ncursesw /usr/src/lib/ncurses/ncursesw/../ncurses /usr/src/lib/ncurses/ncursesw/../../../contrib/ncurses/include /usr/src/lib/ncurses/ncursesw/../../../contrib/ncurses/ncurses/base /usr/src/lib/ncurses/ncursesw/../../../contrib/ncurses/ncurses/tinfo /usr/src/lib/ncurses/ncursesw/../../../contrib/ncurses/ncurses/tty /usr/src/lib/ncurses/ncursesw/../../../contrib/ncurses/ncurses/widechar /usr/src/lib/ncurses/ncursesw/../../../contrib/ncurses/ncurses/trace /usr/src/lib/ncurses/ncursesw/../../../contrib/ncurses/man'
> 1 error
This was based on (powerpc64 example):
> # more ~/sys_build_scripts.amd64-host/make_powerpc64vtsc_nodebug_incl_clang_xtoolchain-amd64-host.sh
> kldload -n filemon && \
> script ~/sys_typescripts/typescript_make_powerpc64vtsc_nodebug_incl_clang_xtoolchain-amd64-host-$(date +%Y-%m-%d:%H:%M:%S) \
> env __MAKE_CONF="/root/src.configs/make.conf" SRC_ENV_CONF="/root/src.configs/src.conf.powerpc64-xtoolchain.amd64-host" \
> WITH_META_MODE=yes \
> MAKEOBJDIRPREFIX="/usr/obj/xtoolchain" \
> make $*
and (powerpc64 example). . .
> # more ~/src.configs/src.conf.powerpc64-xtoolchain.amd64-host
> TO_TYPE=powerpc64
> TOOLS_TO_TYPE=${TO_TYPE}
> VERSION_CONTEXT=11.0
> #
> KERNCONF=GENERIC64vtsc-NODEBUG
> TARGET=powerpc
> .if ${.MAKE.LEVEL} == 0
> TARGET_ARCH=${TO_TYPE}
> .export TARGET_ARCH
> .endif
> #
> WITHOUT_CROSS_COMPILER=
> WITHOUT_SYSTEM_COMPILER=
> #
> WITH_LIBCPLUSPLUS=
> WITHOUT_BINUTILS_BOOTSTRAP=
> WITHOUT_CLANG_BOOTSTRAP=
> WITH_CLANG=
> WITH_CLANG_IS_CC=
> WITH_CLANG_FULL=
> WITH_CLANG_EXTRAS=
> WITH_LLDB=
> #
> WITH_BOOT=
> # powerpc64 LIB32 builds via gcc 4.9 or later variants that I've tried
> # but the LIB32 does not work [crtbeginS code problem(s)]
> WITHOUT_LIB32=
> #
> WITHOUT_ELFTOOLCHAIN_BOOTSTRAP=
> WITHOUT_GCC_BOOTSTRAP=
> WITHOUT_GCC=
> WITHOUT_GCC_IS_CC=
> WITHOUT_GNUCXX=
> #
> NO_WERROR=
> #WERROR=
> MALLOC_PRODUCTION=
> #
> WITH_DEBUG_FILES=
> #
> #
> # For TO (so-called "cross") stages . . .
> # So-called-cross via ${TO_TYPE}-xtoolchain-gcc/${TO_TYPE}-gcc. . .
> # TOOLS_TO_TYPE based on ${TO_TYPE}-xtoolchain-gcc related binutils. . .
> #
> CROSS_TOOLCHAIN=${TO_TYPE}-gcc
> X_COMPILER_TYPE=gcc
> CROSS_BINUTILS_PREFIX=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/
> .if ${.MAKE.LEVEL} == 0
> XCC=/usr/local/bin/${TOOLS_TO_TYPE}-portbld-freebsd${VERSION_CONTEXT}-gcc
> XCXX=/usr/local/bin/${TOOLS_TO_TYPE}-portbld-freebsd${VERSION_CONTEXT}-g++
> XCPP=/usr/local/bin/${TOOLS_TO_TYPE}-portbld-freebsd${VERSION_CONTEXT}-cpp
> .export XCC
> .export XCXX
> .export XCPP
> XAS=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/as
> XAR=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ar
> XLD=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ld
> XNM=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/nm
> XOBJCOPY=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/objcopy
> XOBJDUMP=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/objdump
> XRANLIB=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ranlib
> XSIZE=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/size
> #NO-SUCH: XSTRINGS=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/strings
> XSTRINGS=/usr/local/bin/${TOOLS_TO_TYPE}-freebsd-strings
> .export XAS
> .export XAR
> .export XLD
> .export XNM
> .export XOBJCOPY
> .export XOBJDUMP
> .export XRANLIB
> .export XSIZE
> .export XSTRINGS
> .endif
> #
> #
> # From based on clang (via system). . .
> #
> .if ${.MAKE.LEVEL} == 0
> CC=/usr/bin/clang
> CXX=/usr/bin/clang++
> CPP=/usr/bin/clang-cpp
> .export CC
> .export CXX
> .export CPP
> .endif
make.conf was empty.
===
Mark Millard
markmi at dsl-only.net
More information about the freebsd-ppc
mailing list