[clang] kernel build failure

From: Boris Samorodov <bsam_at_passap.ru>
Date: Thu, 09 Aug 2012 16:15:36 +0400
Hi!

The kernel build fails at fresh CURRENT. At first I get a couple of
same warnings like:
-----
clang -c -O -pipe  -std=c99 -g -Wall -Wredundant-decls -Wnested-externs 
-Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline 
-Wcast-qual  -Wundef -Wno-pointer-sign -
fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option 
-Wno-error-tautological-compare -Wno-error-empty-body 
-Wno-error-parentheses-equality -nostdinc  -I. -I/usr/
src/sys -I/usr/src/sys/contrib/altq -D_KERNEL 
-DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h  -mno-aes -mno-avx 
-mno-mmx -mno-sse -msoft-float -ffreestanding -fstack-protector
    /usr/src/sys/cam/scsi/scsi_cd.c
/usr/src/sys/cam/scsi/scsi_cd.c:571:7: warning: implicit declaration of 
function 'scsi_extract_sense_ccb' is invalid in C99 
[-Wimplicit-function-declaration]
                     scsi_extract_sense_ccb(ccb,
                     ^
-----

And then I get an error:
-----
linking kernel.debug
cam_periph.o: In function `cam_periph_error':
/usr/src/sys/cam/cam_periph.c:1776: undefined reference to 
`scsi_extract_sense_ccb'
scsi_cd.o: In function `cdasync':
/usr/src/sys/cam/scsi/scsi_cd.c:571: undefined reference to 
`scsi_extract_sense_ccb'
scsi_da.o: In function `daasync':
/usr/src/sys/cam/scsi/scsi_da.c:1394: undefined reference to 
`scsi_extract_sense_ccb'
*** [kernel.debug] Error code 1
-----

The system...:
-----
% uname -a
FreeBSD bsam.wart.ru 10.0-CURRENT FreeBSD 10.0-CURRENT #21 r238828M: Fri 
Jul 27 16:26:02 SAMT 2012     bsam_at_bsam.wart.ru:/usr/obj/usr/src/sys/BBX 
  i386
-----

...is build with options:
-----
WITH_CLANG_IS_CC="YES"
WITH_LIBCPLUSPLUS="YES"
-----

-- 
WBR, Boris Samorodov (bsam)
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve
Received on Thu Aug 09 2012 - 10:15:38 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:29 UTC