# llvm12 fails to build - *-i386 files not found



## weif (May 9, 2021)

I am having LLVM12 fail to build from ports for the last three weeks with the port tree being updated several times. Each time it fails with a long list of:
`pkg-static: Unable to access file /usr/ports/devel/llvm12/work/stage/usr/local/llvm12/lib/clang/12.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a:No such file or directory`
I have confirmed that these files do not, in fact, exist.

I have forced rebuilding all the ports that LLVM12 is supposedly dependent on, and each of those installs (or, rather, reinstalls) fine.

I have tried using portinstall as well as cding to `/usr/ports/devel/llvm12/` and running `make clean install`. Both have the same result. I have also tried `make rmconfig` and then `make clean install` with the same result.

Of course, this works fine on the other computer on the desk...


----------



## T-Daemon (May 9, 2021)

weif said:


> pkg-static: Unable to access file /usr/ports/devel/llvm12/work/stage/usr/local/llvm12/lib/clang/12.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a:No such file or directory





weif said:


> Of course, this works fine on the other computer on the desk...



Are you sure the ports tree is up to date on that particular system? The build failure in this PR 255527 is exactly what you are experiencing (search for above quoted code). There was a commit on 2021-05-03 to correct this issue. If there are no problems on the other system then it looks like the ports tree is not up to date or otherwise affected. Are the two systems the same version, same architecture or do they differ?

How is the the ports tree updated on the system where the build failure occurs and how on the other system? If with git, what does `git show 6354328d5f77001b261a22475dbf4f465d3e4758`  report? It should show the above mentioned commit.

If you update ports by other means compare the diff with the Makefile.


----------



## weif (May 9, 2021)

The architecture on the two systems is different, but they are using the same ports tree (updated near simultaneously via portsnap) and are on the same version of FreeBSD (12.2-RELEASE-p6).


----------



## T-Daemon (May 9, 2021)

weif said:


> The architecture on the two systems is different,


On which architecture is the affected one running?

Check if the Makefile has the updates from the committed diff.

Please execute:

/usr/ports/devel/llvm12 # `grep COMPILER_RT_USES=  Makefile`

Does it return `COMPILER_RT_USES=    localbase` ?


----------



## debguy (May 11, 2021)

weif said:


> The architecture on the two systems is different, but they are using the same ports tree (updated near simultaneously via portsnap) and are on the same version of FreeBSD (12.2-RELEASE-p6).


Yes, you aren't going to thunk an old timer chip on a new motherboard:  you cannot.

My advice is you shouldn't be in that branch.  Make sure your build shell environment is clean.

android / platform /  / prebuilts / clang / host / linux-x86 / f8901db697a294e418813287043562caa29b4614 / . / clang-r353983b / runtimes_ndk_cxx / libclang_rt.ubsan_standalone-aarch64-android.so

_ubsan_standalone_-x86_64.a: No such file or directory clang: error:

Did you google it?  It looks like this same question is already a well known pretzel twist time waster.

_UBSAN_ is a runtime undefined behaviour checker. _UBSAN_ uses compile-time instrumentation to catch undefined behavior (UB). Does FreeBSD and clang support that on x86 (avoiding android if then)? I bet it doesn't. So why is it looking unless your environment is pulling the wrong if/then during 'make' ?? IDK.


----------



## weif (May 15, 2021)

T-Daemon,
Sorry for the silence, it's been a hectic week. After your first post, I deleted the contents of /usr/ports/ and re-extracted the ports tree using portsnap. After this, LLVM12 did build.


----------

