Re: fatal error: 'immintrin.h' file not found

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Mon, 23 Jul 2018 07:47:36 +0200
On 22 Jul 2018, at 23:48, Stefan Hagen <sh+freebsd-current_at_codevoid.de> wrote
> 
> Dimitry Andric wrote:
>> Stefan Hagen wrote:
>>> --- lz_encoder.o ---
>>> In file included from /usr/src/contrib/xz/src/liblzma/lz/lz_encoder.c:23:
>>> /usr/src/contrib/xz/src/liblzma/common/memcmplen.h:19:11: fatal error: 'immintrin.h' file not found
>>> #       include <immintrin.h>
>>>             ^~~~~~~~~~~~~
>>> 1 error generated.
>>> 
>>> Find shows me, that immintrin.h can be found in the following locations:
>>> 
>>> $ find / -name "immintrin.h"
>>> /usr/lib/clang/4.0.0/include/immintrin.h
>>> /usr/lib/clang/3.8.0/include/immintrin.h
>>> /usr/lib/clang/5.0.0/include/immintrin.h
>>> /usr/lib/clang/6.0.0/include/immintrin.h
>>> /usr/lib/clang/5.0.1/include/immintrin.h
>> 
>> What does "cc -v" show?  If it is clang 6.0.1, you are missing the 6.0.1
>> intrinsics headers, located in /usr/lib/clang/6.0.1/include.  As a quick
>> hack, you can try copying the /usr/lib/clang/6.0.0 headers there, or
>> attempt to run "make install" in /usr/src/lib/clang/headers.
> 
> $ cc -v
> FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1)
> 
> The following fixed it for me:
> 
> mkdir -p /usr/lib/clang/6.0.1/include/
> cd /usr/src/lib/clang/headers && make install
> 
> Shouldn't these headers be included in the llvm60-6.0.1_1 package?
> Or are they part of the base system?

They are part of the base system, but the port will install them in a
similar location, under /usr/local.


> I just wonder why I never had to install them before.

That is the real mystery: during a normal installworld, these headers
get installed.  Maybe you ran an installworld using WITHOUT_CLANG, and
then attempted to build a new one?

Btw, you still have the /usr/lib/clang/3.8.0 through 6.0.0 directories,
so maybe it is time to run "make delete-old" at some point. :)

-Dimitry


Received on Mon Jul 23 2018 - 03:47:49 UTC

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