tpoechtrager / osxcross

Mac OS X cross toolchain for Linux, FreeBSD, OpenBSD and Android (Termux)
GNU General Public License v2.0
2.81k stars 320 forks source link

warning: cannot find clang intrinsic headers; please report this issue to the OSXCross project #356

Closed efa closed 1 year ago

efa commented 1 year ago

Sorry, I posted before in a closed Issue.

osxcross worked perfectly in the past with Debian 10, it is installed in /opt/osxcross Now I upgraded to Debian 11, I do not know if was the upgrade that broke the /opt installation, the file are there 3.5 GB not touched. See the error below:

efa@08i7-2500:~/c$ osxcross-var
ODVER ___________:18
OHOST ___________:x86_64-apple-darwin18
OCROSS __________:x86_64-apple-darwin18-
OSXROOT _________:/opt/osxcross
OSX _____________:/opt/osxcross/target/bin
OSXDEPS _________:/opt/osxcross/target/macports
OSXQUARTZ _______:/opt/osxcross/target/quartz
PATH:/opt/osxcross/target/bin:.:/home/efa/script:/home/efa/bin:/home/efa/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin:/usr/local/sbin:/usr/sbin:/sbin
OSXCROSS_PKG_CONFIG_USE_NATIVE_VARIABLES:1
PKG_CONFIG_LIBDIR:/opt/osxcross/target/macports/pkgs/opt/local/lib/pkgconfig:/opt/osxcross/target/macports/pkgs/opt/local/share/pkgconfig
PKG_CONFIG_PATH _:/opt/osxcross/target/macports/pkgs/opt/local/lib/pkgconfig:/opt/osxcross/target/macports/pkgs/opt/local/share/pkgconfig
OSXCROSS_TARGET _:darwin18
SDK_VERSION _____:10.14

efa@08i7-2500:~/c$ x86_64-apple-darwin18-clang -D GNU_SOURCE=1 -O3 -std=gnu99 -Wall hello.c -lm -o hello.macOS64
osxcross: warning: cannot find clang intrinsic headers; please report this issue to the OSXCross project
osxcross: error: invoking compiler failed
osxcross: debug: --> x86_64-apple-darwin18-clang -D GNU_SOURCE=1 -O3 -std=gnu99 -Wall hello.c -lm -o hello.macOS64 
osxcross: debug: <-- clang -target x86_64-apple-darwin18 -mlinker-version=530 -isysroot /opt/osxcross/target/bin/../SDK/MacOSX10.14.sdk -cxx-isystem /opt/osxcross/target/bin/../SDK/MacOSX10.14.sdk/usr/include/c++/v1 -mmacosx-version-min=10.9.0 -arch x86_64 -D GNU_SOURCE=1 -O3 -std=gnu99 -Wall hello.c -lm -o hello.macOS64 

efa@08i7-2500:~/c$ distro
---
Distro: LMDE 5 (elsie) elsie
based on Debian 11 Bullseye 14 August 2021
---

efa@08i7-2500:~/c$ ls -l /usr/local/bin/clan*
ls: cannot access '/usr/local/bin/clan*': No such file or directory

efa@08i7-2500:~/c$ ls -l /usr/bin/clan*
ls: cannot access '/usr/bin/clan*': No such file or directory

I have no link in /usr, I do not know where (and what) are the clang intrinsics, but should be in osxcross directory Please suggest a work around. I had to reinstall osxcross?

efa commented 1 year ago

maybe those one:

efa@08i7-2500:/opt/osxcross$ find . -name "*intrin.h"
./target/SDK/MacOSX10.12.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/2.0/include/emmintrin.h
./target/SDK/MacOSX10.12.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/2.0/include/pmmintrin.h
./target/SDK/MacOSX10.12.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/2.0/include/nmmintrin.h
./target/SDK/MacOSX10.12.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/2.0/include/immintrin.h
./target/SDK/MacOSX10.12.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/2.0/include/mmintrin.h
./target/SDK/MacOSX10.12.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/2.0/include/smmintrin.h
./target/SDK/MacOSX10.12.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/2.0/include/avxintrin.h
./target/SDK/MacOSX10.12.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/2.0/include/x86intrin.h
./target/SDK/MacOSX10.12.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/2.0/include/xmmintrin.h
./target/SDK/MacOSX10.12.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/2.0/include/tmmintrin.h
./target/SDK/MacOSX10.12.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/2.0/include/wmmintrin.h
./build/apple-libtapi/src/llvm/projects/clang/lib/Headers/rtmintrin.h
...  79 files
./build/apple-libtapi/src/llvm/projects/clang/lib/Headers/wmmintrin.h

Can be related to the fact I previously used: SDK_VERSION=10.12 OSXCROSS_TARGET=darwin16 to cross-compile GTK for Quarz backend, then switched to 10.14/darwin18 and for some reasons there are no *intrin.h in the path: /opt/osxcross/target/SDK/MacOSX10.14.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/3.2/include and neither in: /opt/osxcross/target/SDK/MacOSX10.14.sdk/ at all?

But I'm sure I had successfully crosscompiled a QT app after the switch to 10.14: https://www.alus.it/AirspaceConverter/download.php?lang=en https://github.com/alus-it/AirspaceConverter https://www.alus.it/AirspaceConverter/ and also this one: https://github.com/efa/Wilderland

efa commented 1 year ago

solved. I had to reinstall those packages: $ sudo apt install clang-11 libclang-common-11-dev libobjc-10-dev libobjc4 libomp-11-dev libomp5-11