From owner-freebsd-current@freebsd.org Wed Apr 11 00:29:29 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8ED8F8300E for ; Wed, 11 Apr 2018 00:29:28 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FAD96BFF1 for ; Wed, 11 Apr 2018 00:29:27 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w3B0TP0a025468; Tue, 10 Apr 2018 17:29:25 -0700 (PDT) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd-rwg@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w3B0TPUf025467; Tue, 10 Apr 2018 17:29:25 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201804110029.w3B0TPUf025467@pdx.rh.CN85.dnsmgr.net> Subject: Re: Module compiles looking in /usr/src when alternate src tree is in use In-Reply-To: <3030.1523404597@kaos.jnpr.net> To: "Simon J. Gerraty" Date: Tue, 10 Apr 2018 17:29:25 -0700 (PDT) CC: freebsd-current@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Apr 2018 00:29:29 -0000 > Rodney W. Grimes wrote: > > > I am having a compile time issue for a patched that compiled fine on my > > r329294 system, but now failes to compile with what looks like a wrong > > header being included. > > You may find it helpful to do something like: > > make -dv -C sys/modules/vmm -V CFLAGS > /tmp/dvo 2>&1 > egrep ':.PARSE|/usr/src/sys' /tmp/dvo | grep -B1 usr/src | more > > The arg to -V doesn't matter btw. > You could narrow that down if you know what var -I/usr/src/sys is in > (probably CFLAGS but you never know) > the above should help find the makefile that is introducing the bogus -I > Thank you, that does help narrow it down: (I backed up a vew lines from the first place I saw src/.) ... Global:.PARSEFILE = bsd.kmod.mk Global:.PARSEDIR = /usr/src-topo/share/mk Global:.PARSEFILE = bsd.kmod.mk Result[] of :U is "/usr/src/sys" Result[] of :U is "/usr/src/sys" Global:SYSDIR = ${:U/usr/src/sys:tA} Global:.PARSEDIR = /usr/src-topo/share/mk Global:.PARSEFILE = bsd.kmod.mk Result[] of :U is "/usr/src/sys" Applying[] :t to "/usr/src/sys" Result[] of :t is "/usr/src/sys" Result[] of :U is "/usr/src/sys" Applying[] :t to "/usr/src/sys" Result[] of :t is "/usr/src/sys" Result[] of :U is "/usr/src/sys" Applying[] :t to "/usr/src/sys" Result[] of :t is "/usr/src/sys" Global:.MAKE.MAKEFILES = /usr/src-topo/share/mk/sys.mk /usr/src-topo/share/mk/local.sys.env.mk /usr/src-topo/share/mk/src.sys.env.mk /usr/src-topo/share/mk/bsd.mkopt.m k /usr/src-topo/share/mk/src.sys.obj.mk /usr/src-topo/share/mk/auto.obj.mk /usr/src-topo/share/mk/bsd.suffixes.mk /usr/src-topo/share/mk/local.sys.mk /usr/src-topo/sha re/mk/src.sys.mk /usr/src-topo/sys/modules/vmm/Makefile /usr/src-topo/share/mk/bsd.kmod.mk /usr/src/sys/conf/kmod.mk ^^^^^^^^^^^^^^^^^^^^^^^^^ Thats gona bust something some day.... Global:.PARSEDIR = /usr/src/sys/conf Global:.PARSEFILE = kmod.mk Global:.INCLUDEDFROMDIR = /usr/src/sys/conf Oh my! Uggggg So something in bsd.kmod.mk is going very wrong... it looks like it starts to pull all sorts of stuff from /usr/src/sys! > > > > I have wrapped the long line so I can point to a difference between > > r329294 and r332262 make log of this file. > > > > r329294 make output: > > > > cc -O2 -pipe -DVMM_KEEP_STATS -DSMP -fno-strict-aliasing -Werror -D_KERNEL \ > > -DKLD_MODULE -nostdinc -I/usr/src-topo/sys/amd64/vmm \ > > -I/usr/src-topo/sys/amd64/vmm/io -I/usr/src-topo/sys/amd64/vmm/intel \ > > -I/usr/src-topo/sys/amd64/vmm/amd -I. -I/usr/src-topo/sys -fno-common \ > > ^^^^^^^^^^^^^^^^^ this is what I would expect > > -- Rod Grimes rgrimes@freebsd.org