tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Compilation failures in current
Jun 20, 2023, 20:50 by rokuyama.rk%gmail.com@localhost:
> Seems like your /usr/share/mk is outdated. Addig ``-m (location of share/mk from -current)'' option to make(1) may work around the problem.
> But, the best practice I can suggest is to always use toolchain built from -current.
>
> Thanks,
> rin
>
> 2023年6月21日(水) 12:29 <> bsdprg%tuta.io@localhost> >:
>
>> Hi,
>>
>> Since past 3–4 days, I am getting consistent failures while compiling the kernel – current.
>> I tried commenting out offending drivers/modules in my kernel config. But, it looks like a lot of drivers are resulting into this compilation failure. The source of errors seems to be drivers taking an int pointer of a struct, which could be a common operation.
>>
>> # compile MYKERNEL/ar5416_xmit.o
>> gcc -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -mno-avx -msoft-float -mindirect-branch=thunk -mindirect-branch-register -ffreestanding -fno-zero-initialized-in-bss -fno-delete-null-pointer-checks -g -O2 -fno-omit-frame-pointer -fstack-protector -Wstack-protector --param ssp-buffer-size=1 -fstack-usage -Wstack-usage=3584 -fno-strict-aliasing -fno-common -std=gnu99 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-unreachable-code -Wno-pointer-sign -Wno-attributes -Wno-type-limits -Wextra -Wno-unused-parameter -Wold-style-definition -Wno-sign-compare -Walloca -Damd64 -Dx86_64 -I. -I../../../../external/mit/xen-include-public/dist/ -I../../../../external/bsd/libnv/dist -I../../../../external/bsd/acpica/dist -I../../../../../common/lib/libx86emu -I../../../../../common/lib/libc/misc -I../../../../../common/include -I../../../../arch -I../../../.. -nostdinc -DCOMPAT_UTILS -D__XEN_INTERFACE_VERSION__=0x3020a -DDIAGNOSTIC -DCOMPAT_44 -D_KERNEL -D_KERNEL_OPT -std=gnu99 -I../../../../lib/libkern/../../../common/lib/libc/quad -I../../../../lib/libkern/../../../common/lib/libc/string -I../../../../lib/libkern/../../../common/lib/libc/arch/x86_64/string -I../../../../lib/libkern/../../../common/lib/libc/arch/x86_64/atomic -I../../../../lib/libkern/../../../common/lib/libc/hash/sha3 -D_FORTIFY_SOURCE=2 -I../../../../external/isc/atheros_hal/dist -I../../../../external/isc/atheros_hal/ic -I../../../../../common/include -I../../../../external/bsd/acpica/dist/include -I../../../../external/bsd/libnv/dist -c ../../../../external/isc/atheros_hal/dist/ar5416/ar5416_xmit.c -o ar5416_xmit.o
>> In file included from ../../../../external/isc/atheros_hal/dist/ar5416/ar5416_xmit.c:28:
>> ../../../../external/isc/atheros_hal/dist/ar5416/ar5416_xmit.c: In function ‘ar5416ProcTxDesc’:
>> ../../../../external/isc/atheros_hal/dist/ar5416/ar5416desc.h:32:3: error: taking address of packed member of ‘struct ar5416_desc’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
>> 32 | ((uint32_t*)(&(_ads)->u.tx.status[_get_index(_ah)]))
>> | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> ../../../../external/isc/atheros_hal/dist/ar5416/ar5416_xmit.c:470:26: note: in expansion of macro ‘AR5416_DS_TXSTATUS’
>> 470 | uint32_t *ds_txstatus = AR5416_DS_TXSTATUS(ah,ads);
>> | ^~~~~~~~~~~~~~~~~~
>> ../../../../external/isc/atheros_hal/dist/ar5416/ar5416_xmit.c:560:27: error: this statement may fall through [-Werror=implicit-fallthrough=]
>> 560 | case 3: ts->ts_longretry += MS(ads->ds_ctl2, AR_XmitDataTries2);
>> ../../../../external/isc/atheros_hal/dist/ar5416/ar5416_xmit.c:561:2: note: here
>> 561 | case 2: ts->ts_longretry += MS(ads->ds_ctl2, AR_XmitDataTries1);
>> | ^~~~
>> ../../../../external/isc/atheros_hal/dist/ar5416/ar5416_xmit.c:561:27: error: this statement may fall through [-Werror=implicit-fallthrough=]
>> 561 | case 2: ts->ts_longretry += MS(ads->ds_ctl2, AR_XmitDataTries1);
>> ../../../../external/isc/atheros_hal/dist/ar5416/ar5416_xmit.c:562:2: note: here
>> 562 | case 1: ts->ts_longretry += MS(ads->ds_ctl2, AR_XmitDataTries0);
>> | ^~~~
>> cc1: all warnings being treated as errors
>> *** Error code 1
>>
>> Stop.
>> make: stopped in /usr/src/sys/arch/amd64/compile/MYKERNEL
>>
>>
>> Best,
>> Salil
>>
Thank you, Rin Okuyama.
make -m /usr/src/share/mk
worked and I could build the kernel.
However, I could not build the tools using the same trick:
[/usr/src/tools]$ make -m /usr/src/share/mk
This fails. The errors are:
all ===> lorder
/usr/src/obj/tooldir.NetBSD-10.99.4-amd64/bin/nbsed -e "s,/bin/sh,"/bin/sh",g" -e "s,{JOIN:=.*},{JOIN:="/usr/src/obj/tooldir.NetBSD-10.99.4-amd64/bin/nbjoin"}," -e "s,{MKTEMP:=.*},{MKTEMP:="/usr/src/obj/tooldir.NetBSD-10.99.4-amd64/bin/nbmktemp"}," -e "s,{NM:=.*},{NM:="/usr/src/obj/tooldir.NetBSD-10.99.4-amd64/bin/x86_64--netbsd-nm"}," -e "s,{SED:=.*},{SED:="/usr/src/obj/tooldir.NetBSD-10.99.4-amd64/bin/nbsed"}," < /usr/src/tools/lorder/../../usr.bin/lorder/lorder.sh <http://usr.bin/lorder/lorder.sh> > lorder
sh: /usr/src/obj/tooldir.NetBSD-10.99.4-amd64/bin/nbsed: not found
*** Error code 127
Stop.
make[1]: stopped in /usr/src/tools/lorder
*** Error code 1
Home |
Main Index |
Thread Index |
Old Index