Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Feb 2018 19:56:49 +0100
From:      Dimitry Andric <dim@FreeBSD.org>
To:        bob prohaska <fbsd@www.zefox.net>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: Errors compiling LLVM on RPi3 at 330019
Message-ID:  <A7618659-CFAB-4E03-9102-67D6E606FBE1@FreeBSD.org>
In-Reply-To: <20180226184701.GB21104@www.zefox.net>
References:  <20180226152345.GA21006@www.zefox.net> <6AAA36E2-CDE3-42C3-B070-3C75044656C6@FreeBSD.org> <20180226184701.GB21104@www.zefox.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_205FB500-0588-41BB-A0D1-EBB9A8877F6A
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

On 26 Feb 2018, at 19:47, bob prohaska <fbsd@www.zefox.net> wrote:
>=20
> On Mon, Feb 26, 2018 at 07:16:18PM +0100, Dimitry Andric wrote:
>> On 26 Feb 2018, at 16:23, bob prohaska <fbsd@www.zefox.net> wrote:
>>>=20
>>> At revision 330019 -DNO_CLEAN buildworld stops with
>>>=20
>>> --- Target/X86/X86ISelDAGToDAG.o ---
>>> /usr/src/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:2463:7: =
error: use of undeclared identifier 'SelectCode'
>>>     SelectCode(ZextTarget.getNode());
>>>     ^
>>> /usr/src/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:2464:7: =
error: use of undeclared identifier 'SelectCode'
>>>     SelectCode(Brind.getNode());
>>>     ^
>>> /usr/src/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:2480:5: =
error: use of undeclared identifier 'SelectCode'
>>>   SelectCode(VSelect.getNode());
>>>   ^
>>> /usr/src/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:3072:3: =
error: use of undeclared identifier 'SelectCode'
>>> SelectCode(Node);
>>>=20
>>> Should I wait for an update, or run cleandir? This is on a Pi3.
>>=20
>> =46rom which revision were you upgrading?
> Probably revision 329997
>=20
>> It looks like your .inc files
>> were not regenerated properly by llvm-tblgen,
>=20
> The system has been plagued by stoppages during clang build.
> Sometimes in llvm-tblgen, but not always. A frequent error
> is 137, from clang, but "out of swap" happens too. Been using
> the -DNO_CLEAN option to pick up where it left off.

Right, I suspect that is the root cause here.  When llvm-tblgen or
clang-tblgen are writing a .inc file, and they are killed by OOM in the
middle of it, the file will have been partially written, and most likely
be incomplete.  However, on the next NO_CLEAN run, make thinks the file
is up-to-date, so starts the build of the dependencies of those .inc
files, leading to errors like you report.

Ideally the table-generated files should be atomically replaced, but
we currently don't do that.  Upstream also compares the output with any
previous file, if it exists, and does not update it if it has not
changed.  I think I still have a diff laying around to do just that,
but I never finished it up...

In any case, my advice here would be to either add some swap space, or
lower your -j level, to minimize the chance of files corrupted by OOM
killing.

-Dimitry


--Apple-Mail=_205FB500-0588-41BB-A0D1-EBB9A8877F6A
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.2

iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCWpRYcQAKCRCwXqMKLiCW
o7tRAJ96D75xivNyiIYaYX+uE4H8INhPfgCgzZT9GdT8pYrc/l/xJKi/AdpasPA=
=+OPK
-----END PGP SIGNATURE-----

--Apple-Mail=_205FB500-0588-41BB-A0D1-EBB9A8877F6A--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A7618659-CFAB-4E03-9102-67D6E606FBE1>