Re: I have submitted bugzilla 221107 for a (e.g.) -r321706 system clang 5 vintage TARGET_ARCH=powerpc buildkernel failure for aha.kld: R_PPC_PLTREL24 reloc against local symbol

From: Mark Millard <markmi_at_dsl-only.net>
Date: Sun, 6 Aug 2017 14:44:43 -0700
[-r322109 update failed for agp.kld instead. It may just be
a race for which happens first during the build.]

On 2017-Jul-30, at 3:03 PM, Mark Millard <markmi_at_dsl-only.net> wrote:

> [Just correcting the -r's to be -r321706.]
> 
> On 2017-Jul-30, at 1:34 PM, Mark Millard <markmi_at_dsl-only.net> wrote:
> 
> I experiment with system clang targeting powerpc
> (and powerpc64). Until recently I could buildkernel
> via system clang 4 (but it had problems if tried to
> boot such a kernel). After clang 5 it no longer
> completes the buildkernel. I'm submitting based on
> a -r321706 build attempt. The system binutils are
> in use.
> 
> The technical material from the submittal is. . .
> 
> First I list what the R_PPC_PLTREL24 is tied to
> then the error text then the build context.
> 
> objdump reports that the .text+0x2b94 involved
> is in aha_isa_probe and is a reference to aha_alloc:
> 
> (sorted objdump -x output:)
> 00002b78 R_PPC_PLTREL24    bus_alloc_resource
> 00002b88 R_PPC_PLTREL24    rman_get_start
> 00002b94 R_PPC_PLTREL24    aha_alloc
> 00002b96 R_PPC_ADDR32      .debug_str+0x0000266c
> 00002b9c R_PPC_PLTREL24    aha_probe
> 00002b9f R_PPC_ADDR32      .debug_str+0x00001904
> 
> (objdump -d --prefix-addresses output:)
> 00002aa4 <aha_isa_probe> mflr    r0
> . . .
> 00002b7c <aha_isa_probe+0xd8> cmplwi  r3,0
> 00002b80 <aha_isa_probe+0xdc> stw     r3,188(r28)
> 00002b84 <aha_isa_probe+0xe0> beq     00002c1c <aha_isa_probe+0x178>
> 00002b88 <aha_isa_probe+0xe4> bl      00002b88 <aha_isa_probe+0xe4>
> 00002b8c <aha_isa_probe+0xe8> mr      r3,r28
> 00002b90 <aha_isa_probe+0xec> mr      r27,r4
> 00002b94 <aha_isa_probe+0xf0> bl      00002b94 <aha_isa_probe+0xf0>
> 00002b98 <aha_isa_probe+0xf4> mr      r3,r28
> 00002b9c <aha_isa_probe+0xf8> bl      00002b9c <aha_isa_probe+0xf8>
> 00002ba0 <aha_isa_probe+0xfc> cmplwi  r3,0
> 
> 
> --- all_subdir_aha ---
> Building /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src/sys/modules/aha/aha.kld
> . . .
> --- all_subdir_aha ---
> Building /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src/sys/modules/aha/aha.ko.full
> . . .
> --- aha.ko.full ---
> ld: aha.kld(.text+0x2b94): R_PPC_PLTREL24 reloc against local symbol
> aha.kld: could not read symbols: Bad value
> . . .
> --- all_subdir_aha ---
> *** [aha.ko.full] Error code 1
> 
> make[4]: stopped in /usr/src/sys/modules/aha
> .ERROR_TARGET='aha.ko.full'
> .ERROR_META_FILE='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src/sys/modules/aha/aha.ko.full.meta'
> .MAKE.LEVEL='4'
> MAKEFILE=''
> .MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose'
> _ERROR_CMD='ld -m elf32ppc_fbsd -Bshareable -znotext -d -warn-common  -o aha.ko.full aha.kld;'
> .CURDIR='/usr/src/sys/modules/aha'
> .MAKE='make'
> .OBJDIR='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src/sys/modules/aha'
> .TARGETS='all'
> DESTDIR=''
> LD_LIBRARY_PATH=''
> MACHINE='powerpc'
> MACHINE_ARCH='powerpc'
> MAKEOBJDIRPREFIX='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules'
> MAKESYSPATH='/usr/src/share/mk'
> MAKE_VERSION='20170720'
> --- all_subdir_agp ---
> Building /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src/sys/modules/agp/agp.ko.full
> --- all_subdir_aha ---
> PATH='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/legacy/usr/sbin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/legacy/usr/bin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/legacy/bin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/usr/sbin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin'
> SRCTOP='/usr/src'
> OBJTOP='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/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.powerpc-clang-bootstrap.amd64-host /usr/src/share/mk/bsd.mkopt.mk /usr/src/share/mk/bsd.suffixes.mk /root/src.configs/make.conf /usr/src/share/mk/local.sys.mk /usr/src/share/mk/src.sys.mk /dev/null /usr/src/sys/modules/aha/Makefile /usr/src/share/mk/bsd.kmod.mk /usr/src/sys/conf/kmod.mk /usr/src/share/mk/bsd.init.mk /usr/src/share/mk/bsd.opts.mk /usr/src/share/mk/bsd.cpu.mk /usr/src/share/mk/local.init.mk /usr/src/share/mk/src.init.mk /usr/src/sys/modules/aha/../Makefile.inc /usr/src/share/mk/bsd.own.mk /usr/src/share/mk/bsd.compiler.mk /usr/src/share/mk/bsd.linker.mk /usr/src/sys/conf/kern.opts.mk /usr/src/sys/conf/config.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/sys/conf/kern.mk'
> .PATH='. /usr/src/sys/modules/aha /usr/src/sys/dev/aha /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG'
> 1 error
> 
> make[4]: stopped in /usr/src/sys/modules/aha
> .ERROR_TARGET='aha.ko.full'
> .ERROR_META_FILE='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src/sys/modules/aha/aha.ko.full.meta'
> .MAKE.LEVEL='4'
> MAKEFILE=''
> .MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose'
> _ERROR_CMD='ld -m elf32ppc_fbsd -Bshareable -znotext -d -warn-common  -o aha.ko.full aha.kld;'
> .CURDIR='/usr/src/sys/modules/aha'
> .MAKE='make'
> .OBJDIR='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src/sys/modules/aha'
> .TARGETS='all'
> DESTDIR=''
> LD_LIBRARY_PATH=''
> MACHINE='powerpc'
> MACHINE_ARCH='powerpc'
> MAKEOBJDIRPREFIX='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules'
> MAKESYSPATH='/usr/src/share/mk'
> MAKE_VERSION='20170720'
> PATH='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/legacy/usr/sbin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/legacy/usr/bin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/legacy/bin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/usr/sbin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin'
> SRCTOP='/usr/src'
> OBJTOP='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/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.powerpc-clang-bootstrap.amd64-host /usr/src/share/mk/bsd.mkopt.mk /usr/src/share/mk/bsd.suffixes.mk /root/src.configs/make.conf /usr/src/share/mk/local.sys.mk /usr/src/share/mk/src.sys.mk /dev/null /usr/src/sys/modules/aha/Makefile /usr/src/share/mk/bsd.kmod.mk /usr/src/sys/conf/kmod.mk /usr/src/share/mk/bsd.init.mk /usr/src/share/mk/bsd.opts.mk /usr/src/share/mk/bsd.cpu.mk /usr/src/share/mk/local.init.mk /usr/src/share/mk/src.init.mk /usr/src/sys/modules/aha/../Makefile.inc /usr/src/share/mk/bsd.own.mk /usr/src/share/mk/bsd.compiler.mk /usr/src/share/mk/bsd.linker.mk /usr/src/sys/conf/kern.opts.mk /usr/src/sys/conf/config.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/sys/conf/kern.mk'
> .PATH='. /usr/src/sys/modules/aha /usr/src/sys/dev/aha /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG'
> *** [all_subdir_aha] Error code 2
> 
> 
> Build context:
> 
> ~/sys_build_scripts.amd64-host/make_powerpcvtsc_nodebug_clang_bootstrap-amd64-host.sh -j8 buildworld buildkernel
> 
> # more ~/sys_build_scripts.amd64-host/make_powerpcvtsc_nodebug_clang_bootstrap-amd64-host.sh 
> kldload -n filemon && \
> script ~/sys_typescripts/typescript_make_powerpcvtsc_nodebug_clang_bootstrap-amd64-host-$(date +%Y-%m-%d:%H:%M:%S) \
> env __MAKE_CONF="/root/src.configs/make.conf" SRCCONF="/dev/null" SRC_ENV_CONF="/root/src.configs/src.conf.powerpc-clang-bootstrap.amd64-host" \
> WITH_META_MODE=yes \
> MAKEOBJDIRPREFIX="/usr/obj/powerpcvtsc_clang" \
> make $*
> 
> C# more /root/src.configs/make.conf
> CFLAGS.gcc+= -v
> 
> # more /root/src.configs/src.conf.powerpc-clang-bootstrap.amd64-host
> TO_TYPE=powerpc
> #
> KERNCONF=GENERICvtsc-NODBG
> TARGET=${TO_TYPE}
> .if ${.MAKE.LEVEL} == 0
> TARGET_ARCH=${TO_TYPE}
> .export TARGET_ARCH
> .endif
> #
> WITH_CROSS_COMPILER=
> WITHOUT_SYSTEM_COMPILER=
> #
> WITH_LIBCPLUSPLUS=
> WITH_BINUTILS_BOOTSTRAP=
> WITH_ELFTOOLCHAIN_BOOTSTRAP=
> WITH_CLANG_BOOTSTRAP=
> WITH_CLANG=
> WITH_CLANG_IS_CC=
> WITH_CLANG_FULL=
> WITH_CLANG_EXTRAS=
> WITHOUT_LLD=
> # lldb requires missing atomic 8-byte operations for powerpc (non-64)
> WITHOUT_LLDB=
> #
> WITH_BOOT=
> WITHOUT_LIB32=
> #
> WITHOUT_GCC_BOOTSTRAP=
> WITHOUT_GCC=
> WITHOUT_GCC_IS_CC=
> WITHOUT_GNUCXX=
> #
> NO_WERROR=
> #
> # Use WERROR to avoid stopping at the likes of:
> # error: implicit conversion from 'int' to 'int8_t' (aka 'signed char') changes value from 128 to -128 [-Werror,-Wconstant-conversion]
> WERROR=
> MALLOC_PRODUCTION=
> #
> WITH_REPRODUCIBLE_BUILD=
> WITH_DEBUG_FILES=

I have updated bugzilla 221107 for that building -r322109
as an update the failure changed to agp.kld but for the
same kind of error notices:

--- all_subdir_agp ---
Building /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src/sys/modules/agp/agp.ko.full
. . .
--- all_subdir_agp ---
--- agp.ko.full ---
ld: agp.kld(.text+0x2e08): R_PPC_PLTREL24 reloc against local symbol
agp.kld: could not read symbols: Bad value
*** [agp.ko.full] Error code 1

make[4]: stopped in /usr/src/sys/modules/agp
.ERROR_TARGET='agp.ko.full'
.ERROR_META_FILE='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src/sys/modules/agp/agp.ko.full.meta'
.MAKE.LEVEL='4'
MAKEFILE=''
.MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose'
_ERROR_CMD='ld -m elf32ppc_fbsd -Bshareable -znotext -d -warn-common  -o agp.ko.full agp.kld;'
.CURDIR='/usr/src/sys/modules/agp'
.MAKE='make'
.OBJDIR='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src/sys/modules/agp'
.TARGETS='all'
DESTDIR=''
LD_LIBRARY_PATH=''
MACHINE='powerpc'
MACHINE_ARCH='powerpc'
MAKEOBJDIRPREFIX='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules'
MAKESYSPATH='/usr/src/share/mk'
MAKE_VERSION='20170720'
PATH='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/legacy/usr/sbin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/legacy/usr/bin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/legacy/bin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/usr/sbin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin'
SRCTOP='/usr/src'
OBJTOP='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/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.powerpc-clang-bootstrap.amd64-host /usr/src/share/mk/bsd.mkopt.mk /usr/src/share/mk/bsd.suffixes.mk /root/src.configs/make.conf /usr/src/share/mk/local.sys.mk /usr/src/share/mk/src.sys.mk /dev/null /usr/src/sys/modules/agp/Makefile /usr/src/share/mk/bsd.kmod.mk /usr/src/sys/conf/kmod.mk /usr/src/share/mk/bsd.init.mk /usr/src/share/mk/bsd.opts.mk /usr/src/share/mk/bsd.cpu.mk /usr/src/share/mk/local.init.mk /usr/src/share/mk/src.init.mk /usr/src/sys/modules/agp/../Makefile.inc /usr/src/share/mk/bsd.own.mk /usr/src/share/mk/bsd.compiler.mk /usr/src/share/mk/bsd.linker.mk /usr/src/sys/conf/kern.opts.mk /usr/src/sys/conf/config.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/sys/conf/kern.mk'
.PATH='. /usr/src/sys/modules/agp /usr/src/sys/dev/agp /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG'
1 error
--- all_subdir_aha ---
A failure has been detected in another branch of the parallel make

make[4]: stopped in /usr/src/sys/modules/aha
.ERROR_TARGET=''
.ERROR_META_FILE=''
.MAKE.LEVEL='4'
MAKEFILE=''
.MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose'
_ERROR_CMD='.PHONY'
.CURDIR='/usr/src/sys/modules/aha'
.MAKE='make'
.OBJDIR='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/usr/src/sys/modules/aha'
.TARGETS='all'
DESTDIR=''
LD_LIBRARY_PATH=''
MACHINE='powerpc'
MACHINE_ARCH='powerpc'
MAKEOBJDIRPREFIX='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules'
MAKESYSPATH='/usr/src/share/mk'
MAKE_VERSION='20170720'
PATH='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/legacy/usr/sbin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/legacy/usr/bin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/legacy/bin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/usr/sbin:/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin'
SRCTOP='/usr/src'
OBJTOP='/usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG/modules/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.powerpc-clang-bootstrap.amd64-host /usr/src/share/mk/bsd.mkopt.mk /usr/src/share/mk/bsd.suffixes.mk /root/src.configs/make.conf /usr/src/share/mk/local.sys.mk /usr/src/share/mk/src.sys.mk /dev/null /usr/src/sys/modules/aha/Makefile /usr/src/share/mk/bsd.kmod.mk /usr/src/sys/conf/kmod.mk /usr/src/share/mk/bsd.init.mk /usr/src/share/mk/bsd.opts.mk /usr/src/share/mk/bsd.cpu.mk /usr/src/share/mk/local.init.mk /usr/src/share/mk/src.init.mk /usr/src/sys/modules/aha/../Makefile.inc /usr/src/share/mk/bsd.own.mk /usr/src/share/mk/bsd.compiler.mk /usr/src/share/mk/bsd.linker.mk /usr/src/sys/conf/kern.opts.mk /usr/src/sys/conf/config.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/sys/conf/kern.mk'
.PATH='. /usr/src/sys/modules/aha /usr/src/sys/dev/aha /usr/obj/powerpcvtsc_clang/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODBG'
*** [all_subdir_aha] Error code 2



===
Mark Millard
markmi at dsl-only.net
Received on Sun Aug 06 2017 - 19:44:52 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:12 UTC