Re: error installing world from R/O src and obj

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Sat, 12 Oct 2019 14:23:20 +0200
On 11 Oct 2019, at 20:00, Andriy Gapon <avg_at_FreeBSD.org> wrote:
> 
> On 11/10/2019 20:51, Dimitry Andric wrote:
>> On 11 Oct 2019, at 11:24, Andriy Gapon <avg_at_FreeBSD.org> wrote:
>>> 
>>> On 11/10/2019 12:05, Andriy Gapon wrote:
>>>> 
>>>> Attempting to install r353380 (amd64) with src and obj mounted via NFS.
>>>> The world has just been built albeit with NO_CLEAN=1.
>>>> Getting this:
>>>> ...
>>>> ===> lib/clang (install)
>>>> ===> lib/clang/libllvm (install)
>>>> ===> lib/clang/libclang (install)
>>>> ===> lib/clang/liblldb (install)
>>>> ===> lib/clang/headers (install)
>>>> clang-tblgen -gen-arm-fp16  -I
>>>> /usr/devel/svn/quick-head/contrib/llvm/tools/clang/include/clang/Basic -d
>>>> arm_fp16.h.d  -o arm_fp16.h
>>>> /usr/devel/svn/quick-head/contrib/llvm/tools/clang/include/clang/Basic/arm_fp16.td
>>>> clang-tblgen: error opening arm_fp16.h.d:Read-only file system
>>>> *** Error code 1
>>>> 
>>>> Stop.
>>>> 
>>>> The command is:
>>>> make installworld __MAKE_CONF=/dev/null SRCCONF=/dev/null DB_FROM_SRC=1 DESTDIR=/mnt
>>>> 
>>> 
>>> It seems that buildworld NO_CLEAN=1 is not regenerating that header for some reason.
>>> The command was: make buildworld -s -j12 __MAKE_CONF=/dev/null SRCCONF=/dev/null
>>> NO_CLEAN=1
>>> 
>>> If I do make buildenv and then cd lib/clang/headers/ and run make there, I see this:
>>> $ make
>>> clang-tblgen -gen-arm-fp16  -I
>>> /usr/devel/svn/quick-head/contrib/llvm/tools/clang/include/clang/Basic -d
>>> arm_fp16.h.d  -o arm_fp16.h
>>> /usr/devel/svn/quick-head/contrib/llvm/tools/clang/include/clang/Basic/arm_fp16.td
>>> 
>>> But afterwards:
>>> $ ls -l /usr/obj/usr/devel/svn/quick-head/amd64.amd64/lib/clang/headers/arm_fp16.h*
>>> -rw-r--r--  1 avg  wheel  36361 21 Jun 15:12
>>> /usr/obj/usr/devel/svn/quick-head/amd64.amd64/lib/clang/headers/arm_fp16.h
>>> -rw-r--r--  1 avg  wheel    100 11 Oct 12:16
>>> /usr/obj/usr/devel/svn/quick-head/amd64.amd64/lib/clang/headers/arm_fp16.h.d
>>> 
>>> The .h.d file has a fresh timestamp, but .h is still old.
>> 
>> The files should be generated when "make depend" is run, but are your
>> NFS server and client clocks in sync?  Usually this kind of thing is
>> caused by time differences.
> 
> Yes, they are in sync.
> Could it be that clang-tblgen for some reason does not overwrite the existing file?

It should error out under that condition.  In any case, I tried but
cannot reproduce the problem on my side.  I updated to r353444, set the
filesystem containing the sources ro, then did a normal buildworld,
followed by a NO_CLEAN buildworld.  Both just worked as they should.

By any chance, did you upgrade src from before r353358 (llvm 9.0.0
import) to a revision after it, and then did an incremental build?
Maybe, for some reason the depend stage is then not run, which could
lead to this scenario.

-Dimitry


Received on Sat Oct 12 2019 - 10:23:32 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:22 UTC