Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Apr 2018 13:28:18 -0700
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        "Rodney W. Grimes" <freebsd-rwg@pdx.rh.CN85.dnsmgr.net>, "Simon J. Gerraty" <sjg@juniper.net>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Module compiles looking in /usr/src when alternate src tree is in use
Message-ID:  <f4bc3052-cb06-4c53-b3de-3544c4040e22@FreeBSD.org>
In-Reply-To: <fa983f66-9d6d-347d-2a9a-6303e4b0fab7@FreeBSD.org>
References:  <201804110029.w3B0TPUf025467@pdx.rh.CN85.dnsmgr.net> <115747a8-a7f9-9112-d7b0-c4fc24742708@FreeBSD.org> <fa983f66-9d6d-347d-2a9a-6303e4b0fab7@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--6WCvRrcXi3sTZG30t6JNBw96gELIZIgRi
Content-Type: multipart/mixed; boundary="5ftsNCKK7euUYYCGLAbqTQWsCvx4B4NKf";
 protected-headers="v1"
From: Bryan Drewery <bdrewery@FreeBSD.org>
To: "Rodney W. Grimes" <freebsd-rwg@pdx.rh.CN85.dnsmgr.net>,
 "Simon J. Gerraty" <sjg@juniper.net>
Cc: freebsd-current@freebsd.org
Message-ID: <f4bc3052-cb06-4c53-b3de-3544c4040e22@FreeBSD.org>
Subject: Re: Module compiles looking in /usr/src when alternate src tree is in
 use
References: <201804110029.w3B0TPUf025467@pdx.rh.CN85.dnsmgr.net>
 <115747a8-a7f9-9112-d7b0-c4fc24742708@FreeBSD.org>
 <fa983f66-9d6d-347d-2a9a-6303e4b0fab7@FreeBSD.org>
In-Reply-To: <fa983f66-9d6d-347d-2a9a-6303e4b0fab7@FreeBSD.org>

--5ftsNCKK7euUYYCGLAbqTQWsCvx4B4NKf
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

On 4/12/2018 1:20 PM, Bryan Drewery wrote:
> On 4/12/2018 1:11 PM, Bryan Drewery wrote:
>> On 4/10/2018 5:29 PM, Rodney W. Grimes wrote:
>>>> Rodney W. Grimes <freebsd-rwg@pdx.rh.CN85.dnsmgr.net> wrote:
>>>>
>>>>> I am having a compile time issue for a patched that compiled fine o=
n my
>>>>> r329294 system, but now failes to compile with what looks like a wr=
ong
>>>>> 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 bogu=
s -I
>>>>
>>>
>>> Thank you, that does help narrow it down:  (I backed up a vew lines
>>> from the first place I saw src/.)
>>>
>>> ...
>>> Global:.PARSEFILE =3D bsd.kmod.mk
>>> Global:.PARSEDIR =3D /usr/src-topo/share/mk
>>> Global:.PARSEFILE =3D bsd.kmod.mk
>>> Result[] of :U is "/usr/src/sys"
>>> Result[] of :U is "/usr/src/sys"
>>> Global:SYSDIR =3D ${:U/usr/src/sys:tA}
>>> Global:.PARSEDIR =3D /usr/src-topo/share/mk
>>> Global:.PARSEFILE =3D 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 =3D /usr/src-topo/share/mk/sys.mk /usr/src-top=
o/share/mk/local.sys.env.mk /usr/src-topo/share/mk/src.sys.env.mk /usr/sr=
c-topo/share/mk/bsd.mkopt.m
>>> k /usr/src-topo/share/mk/src.sys.obj.mk /usr/src-topo/share/mk/auto.o=
bj.mk /usr/src-topo/share/mk/bsd.suffixes.mk /usr/src-topo/share/mk/local=
=2Esys.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 =3D /usr/src/sys/conf
>>> Global:.PARSEFILE =3D kmod.mk
>>> Global:.INCLUDEDFROMDIR =3D /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/inte=
l \
>>>>> -I/usr/src-topo/sys/amd64/vmm/amd -I. -I/usr/src-topo/sys -fno-comm=
on  \
>>>>>                                        ^^^^^^^^^^^^^^^^^ this is wh=
at I would expect
>>>>
>>>>
>>>
>>
>> Is this buildkernel or a direct module directory build?
>>
>> Does reverting r331683 and r331682 help? Perhaps I missed ensuring
>> SYSDIR is exported properly.
>>
>=20
> Ok I see the problem with a direct module build. I am fixing it. Sorry
> about that.
>=20

Fixed in r332453.

--=20
Regards,
Bryan Drewery


--5ftsNCKK7euUYYCGLAbqTQWsCvx4B4NKf--

--6WCvRrcXi3sTZG30t6JNBw96gELIZIgRi
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBAgAGBQJaz8FiAAoJEDXXcbtuRpfP5TQH/3z2rm9L0xgmlNGDWIKo7eBt
kfXUDIuTV5Gj8bPr8byJUU67xysSfMO8II6p2nc7/eG3lT18d2N8brPR06cdwwtL
6TV7NVWacEs29A1aFd0jvAkPVWCgrUSJRhiMAj80SueBfJ2smYxhc4Lbr5PG0AJs
U+LMgDZT9LB/jfkMNf5x3sTnLd5o2Yi0ltm4hq24GpCwtgPrUpmmTwohd4mZwYm5
HVZuHw/O5ut3/XgIDf6IvaGGDfr4EbD2tr53z+60RMar915I2CS0Wj8gfG0XRmQR
rwq0TAW29/WOQYoQXPriX143BSUzWt6Udjw1qfwrp+cHScqrjitvUEqZ1j6oY78=
=9bfx
-----END PGP SIGNATURE-----

--6WCvRrcXi3sTZG30t6JNBw96gELIZIgRi--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f4bc3052-cb06-4c53-b3de-3544c4040e22>