Discussion:
cd /sys/amd64/compile/GENERIC;make cleandepend; make cleandepend
(too old to reply)
Julian H. Stacey
2018-05-13 18:26:38 UTC
Permalink
Hi current@
Any ideas please on a problem with a current kernel from a day or
2 ago, & after a make world:

uname -a
FreeBSD lapr.js.berklix.net 12.0-CURRENT FreeBSD 12.0-CURRENT #0:
Sat May 12 13:37:23 CEST 2018
***@lapr.js.berklix.net:/data/release/s4/usr/obj/usr/src/amd64.amd64/sys/GENERIC
amd64

cd /sys/amd64/compile/GENERIC
make cleandepend
make: "../../../conf/../../../conf/kern.pre.mk" line 125: amd64 kernel requires linker ifunc support

/etc/make.conf :
.include "/site/domain/this/etc/make.conf"
.include "/site/etc/make.conf.sasl"
DEFAULT_VERSIONS+=ssl=openssl

All commented out & I still see it.

/etc/src.conf :
WITH_RCMDS=YES

I updated to
.svn_revision 333575
.ctm_status src-cur 13520
Patched out /usr/src/sys/conf/kern.pre.mk
# .error amd64 kernel requires linker ifunc support
make depend && make all && make install
linking kernel.full
iflib.o:(.rodata+0x178): undefined reference to `noop_attach'
iflib.o:(.rodata+0x188): undefined reference to `iflib_pseudo_detach'

find . -name \*iflib\* | sort| xargs ls -l
-rw-r--r-- 1 jhs staff 0 May 13 16:28 ./amd64/compile/GENERIC/opt_iflib.h
-rw-r--r-- 1 root staff 4651 May 13 18:35 ./amd64/compile/LAPR.small/.depend.iflib.o
-rw-r--r-- 1 root staff 648592 May 13 18:35 ./amd64/compile/LAPR.small/iflib.o
-rw-r--r-- 1 jhs staff 0 May 12 17:29 ./amd64/compile/LAPR.small/opt_iflib.h
-rw-r--r-- 1 jhs staff 174046 May 13 16:31 ./net/iflib.c
-rw-r--r-- 1 jhs staff 13187 May 13 16:31 ./net/iflib.h
-rw-r--r-- 1 jhs staff 7674 May 13 16:31 ./net/iflib_clone.c
-rw-r--r-- 1 jhs staff 2480 May 13 16:31 ./net/iflib_private.h

/usr/src/UPDATING last ref. to iflib is way back: 20170112

Cheers,
Julian
--
Julian Stacey, Computer Consultant, Systems Engineer, BSD Linux Unix, Munich
Brexit Referendum stole 3,700,000 votes, inc. 700,000 from British in EU.
UK Govt. lied it's "democratic" in Article 50 letter to EU paragraph 3.
Petition for votes: http://berklix.eu/queen/
Ryan Stone
2018-05-13 21:00:50 UTC
Permalink
Are you building with WITH_LD_IS_LLD=no? -CURRENT can no longer be
built with a GPLv2 ld. You either have to use ldd or install a newer
(GPLv3) binutils package.
Julian H. Stacey
2018-05-14 00:16:11 UTC
Permalink
Date: Sun, 13 May 2018 17:00:50 -0400
Thanks for reply :-)
Are you building with WITH_LD_IS_LLD=no?
Not that I've set anywhere. Unless it comes from make world ?
-CURRENT can no longer be
built with a GPLv2 ld. You either have to use ldd or install a newer
-r-xr-xr-x 1 root wheel 19352 May 13 12:52 /usr/bin/ldd*
(GPLv3) binutils package.
pkg info | grep binutils
binutils-2.30_3,1 GNU binary tools
gnatdroid-binutils-2.27_1 Infrastructure for C/Ada Android cross-compiler (ARMv7)

pkg upgrade
The process will require 132 MiB more space.
569 MiB to be downloaded.

I'll leave it running & report back later, Thanks

Cheers,
Julian
--
Julian Stacey, Computer Consultant, Systems Engineer, BSD Linux Unix, Munich
Brexit Referendum stole 3,700,000 votes, inc. 700,000 from British in EU.
UK Govt. lied it's "democratic" in Article 50 letter to EU paragraph 3.
Petition for votes: http://berklix.eu/queen/
Julian H. Stacey
2018-05-14 01:24:15 UTC
Permalink
Post by Julian H. Stacey
Date: Sun, 13 May 2018 17:00:50 -0400
Thanks for reply :-)
Are you building with WITH_LD_IS_LLD=no?
Not that I've set anywhere. Unless it comes from make world ?
-CURRENT can no longer be
built with a GPLv2 ld. You either have to use ldd or install a newer
-r-xr-xr-x 1 root wheel 19352 May 13 12:52 /usr/bin/ldd*
(GPLv3) binutils package.
pkg info | grep binutils
binutils-2.30_3,1 GNU binary tools
gnatdroid-binutils-2.27_1 Infrastructure for C/Ada Android cross-compiler (ARMv7)
pkg upgrade
The process will require 132 MiB more space.
569 MiB to be downloaded.
I'll leave it running & report back later, Thanks
/sys/amd64/compile/LAPR.small xs !!
xs make
cc -c -O2 -pipe -fno-strict-aliasing -g -nostdinc -I. -I../../.. -I../../../contrib/ck/include -I../../../contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -MD -MF.depend.iflib.o -MTiflib.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-error-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -Werror ../../../net/iflib.c
ctfconvert -L VERSION -g iflib.o
MAKE="make" sh ../../../conf/newvers.sh JHS_Lapr
cc -c -O2 -pipe -fno-strict-aliasing -g -nostdinc -I. -I../../.. -I../../../contrib/ck/include -I../../../contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-error-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -Werror vers.c
ctfconvert -L VERSION -g vers.o
linking kernel.full
iflib.o:(.rodata+0x178): undefined reference to `noop_attach'
iflib.o:(.rodata+0x188): undefined reference to `iflib_pseudo_detach'
*** Error code 1

pkg info | grep binutils

l `which ldd`
-r-xr-xr-x 1 root wheel 19352 May 13 12:52 /usr/bin/ldd*

l /usr/bin/ld
-r-xr-xr-x 2 root wheel 1935992 May 13 12:48 /usr/bin/ld*

cd /usr;mv local localMV;rehash
cd /sys/amd64/conf;cd ../compile/`hostname -s | dd conv=ucase`.small
make
iflib.o:(.rodata+0x178): undefined reference to `noop_attach'
iflib.o:(.rodata+0x188): undefined reference to `iflib_pseudo_detach'

so nothing to do with packages & local.
For decades it been policy that src/ must be able to build itself
without needing ports/ So what's wrong ? Anyone else see this ?

Cheers,
Julian
--
Julian Stacey, Computer Consultant, Systems Engineer, BSD Linux Unix, Munich
Brexit Referendum stole 3,700,000 votes, inc. 700,000 from British in EU.
UK Govt. lied it's "democratic" in Article 50 letter to EU paragraph 3.
Petition for votes: http://berklix.eu/queen/
Julian H. Stacey
2018-05-14 12:21:14 UTC
Permalink
Hi, Reference my
Post by Julian H. Stacey
linking kernel.full
iflib.o:(.rodata+0x178): undefined reference to `noop_attach'
iflib.o:(.rodata+0x188): undefined reference to `iflib_pseudo_detach'
[ Thanks for call Gary, I have: ]

ls -l /usr/bin/ld*
-r-xr-xr-x 2 root wheel 1935992 May 13 12:48 /usr/bin/ld*
-r-xr-xr-x 2 root wheel 1935992 May 13 12:48 /usr/bin/ld.bfd*
-r-xr-xr-x 1 root wheel 40449288 May 13 12:54 /usr/bin/ld.lld*
-r-xr-xr-x 1 root wheel 19352 May 13 12:52 /usr/bin/ldd*
-r-xr-xr-x 1 root wheel 26872 May 13 08:59 /usr/bin/ldd32*

uname -a
FreeBSD lapr.js.berklix.net 12.0-CURRENT FreeBSD 12.0-CURRENT #0: Sat May 12 13:37:23 CEST 2018 ***@lapr.js.berklix.net:/data/release/s4/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64

cat .svn_revision # 333575
cat .ctm_status # src-cur 13520

In case there's more tool dependency checking/ auto update done,
I'm now running 'script' & within that 'cd /usr/src; make buildkernel'

(Instead of my previous
cd /sys/amd64/conf; make links; make # (makes my host conf.)
config `hostname -s | dd conv=ucase`.small
cd ../compile/`hostname -s | dd conv=ucase`.small
make obj; make cleandepend && make depend && make all && make install
)

Cheers,
Julian
--
Julian Stacey, Computer Consultant, Systems Engineer, BSD Linux Unix, Munich
Brexit Referendum stole 3,700,000 votes, inc. 700,000 from British in EU.
UK Govt. lied it's "democratic" in Article 50 letter to EU paragraph 3.
Petition for votes: http://berklix.eu/queen/
Julian H. Stacey
2018-05-14 14:46:21 UTC
Permalink
Date: Mon, 14 May 2018 14:21:14 +0200
In case there's more tool dependency checking/ auto update done,
I'm now running 'script' & within that 'cd /usr/src; make buildkernel'
That worked !
(Although looking at my template script I've run that before recently)

===> zlib (all)
[Creating objdir /data/release/s4/usr/obj/usr/src/amd64.amd64/sys/GENERIC/modules/usr/src/sys/modules/zlib...]
machine -> /usr/src/sys/amd64/include
x86 -> /usr/src/sys/x86/include
cc -target x86_64-unknown-freebsd12.0 --sysroot=/data/release/s4/usr/obj/usr/src/amd64.amd64/tmp -B/data/release/s4/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include /data/release/s4/usr/obj/usr/src/amd64.amd64/sys/GENERIC/opt_global.h -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/data/release/s4/usr/obj/usr/src/amd64.amd64/sys/GENERIC -MD -MF.depend.zlib.o -MTzlib.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-b!
ody -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-error-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -c /usr/src/sys/libkern/zlib.c -o zlib.o
ctfconvert -L VERSION -g zlib.o
ld -m elf_x86_64_fbsd -d -warn-common --build-id=sha1 -r -d -o zlib.ko.full zlib.o
ctfmerge -L VERSION -g -o zlib.ko.full zlib.o
:> export_syms
awk -f /usr/src/sys/conf/kmod_syms.awk zlib.ko.full export_syms | xargs -J% objcopy % zlib.ko.full
objcopy --only-keep-debug zlib.ko.full zlib.ko.debug
objcopy --strip-debug --add-gnu-debuglink=zlib.ko.debug zlib.ko.full zlib.ko
--------------------------------------------------------------
Kernel build for GENERIC completed on Mon May 14 15:07:43 CEST 2018
make installkernel ; reboot # OK!

Sorry, I can't pin it down, at least yet, now trying a custom kernel.

Cheers,
Julian
--
Julian Stacey, Computer Consultant, Systems Engineer, BSD Linux Unix, Munich
Brexit Referendum stole 3,700,000 votes, inc. 700,000 from British in EU.
UK Govt. lied it's "democratic" in Article 50 letter to EU paragraph 3.
Petition for votes: http://berklix.eu/queen/
Loading...