Re: Recent nandfs commits broke buildworld with clang

From: Mateusz Guzik <mjguzik_at_gmail.com>
Date: Mon, 21 May 2012 17:05:07 +0200
On Sun, May 20, 2012 at 04:00:55PM +0300, Vladimir Sharun wrote:
> env MACHINE=amd64 CPP="/usr/bin/clang-cpp"  sh /usr/src/usr.bin/kdump/mkioctls print /usr/obj/usr/src/tmp/usr/include > ioctl.c
> <stdin>:34:10: fatal error: 'fs/nandfs/nandfs_fs.h' file not found
> #include <fs/nandfs/nandfs_fs.h>
>          ^
> 1 error generated.
> /bin/sh /usr/src/usr.bin/kdump/../../sys/kern/makesyscalls.sh  /usr/src/usr.bin/kdump/../../sys/amd64/linux32/syscalls.master /usr/src/usr.bin/kdump/linux_syscalls.conf
> echo "int nlinux_syscalls = sizeof(linux_syscallnames) / sizeof(linux_syscallnames[0]);"  >> linux_syscalls.c
> rm -f .depend
> CC='/usr/bin/clang' mkdep -f .depend -a    -I/usr/src/usr.bin/kdump/../ktrace -I/usr/src/usr.bin/kdump -I/usr/src/usr.bin/kdump/../.. -I. -std=gnu99  kdump_subr.c /usr/src/usr.bin/kdump/kdump.c ioctl.c /usr/src/usr.bin/kdump/../ktrace/subr.c linux_syscalls.c
> ioctl.c:57:10: fatal error: 'fs/nandfs/nandfs_fs.h' file not found
> #include <fs/nandfs/nandfs_fs.h>
>          ^
> 1 error generated.
> mkdep: compile failed
> *** [.depend] Error code 1
> 
> r235624 on amd64
> 
> # clang -v
> FreeBSD clang version 3.1 (branches/release_31 155985) 20120503
> Target: x86_64-unknown-freebsd10.0
> Thread model: posix
> 
> Didn't test it with stock gcc.

Note that you are using clang installed in your base system instead of
the one compiled during buildworld which results in wrong include
directories being searched for headers.

http://wiki.freebsd.org/BuildingFreeBSDWithClang suggests the following:
CC=clang
CXX=clang++
CPP=clang-cpp

Which should fix your problem.

-- 
Mateusz Guzik <mjguzik gmail.com>
Received on Mon May 21 2012 - 13:05:18 UTC

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