Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 May 2012 17:05:07 +0200
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        Vladimir Sharun <atz@ukr.net>
Cc:        Current FreeBSD <freebsd-current@freebsd.org>
Subject:   Re: Recent nandfs commits broke buildworld with clang
Message-ID:  <20120521150507.GD15732@dft-labs.eu>
In-Reply-To: <16704.1337518855.3384805505326252032@front-ffe4.ukr.net>
References:  <16704.1337518855.3384805505326252032@front-ffe4.ukr.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120521150507.GD15732>