tpoechtrager / osxcross

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

"cannot find clang intrinsic headers" on Ubuntu #136

Open aleb opened 7 years ago

aleb commented 7 years ago

Where should these clang intrinsic headers be? I looked at https://github.com/pedronavf/osxcross/blob/master/wrapper/target.cpp#L304 and I see it's checking /usr/include/clang but it seems it fails to notice the 4.0 subfolder. How can I tell it to look there? Or should it find these intrinsic headers somewhere else?

  /opt/osxcross/target/bin/x86_64-apple-darwin15-clang -U_FORTIFY_SOURCE -fstack-protector -Wall -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x' -MD -MF bazel-out/darwin-fastbuild/bin/external/gtest/_objs/gtest/external/gtest/googletest/src/gtest-port.pic.d '-frandom-seed=bazel-out/darwin-fastbuild/bin/external/gtest/_objs/gtest/external/gtest/googletest/src/gtest-port.pic.o' -fPIC -iquote external/gtest -iquote bazel-out/darwin-fastbuild/genfiles/external/gtest -iquote external/bazel_tools -iquote bazel-out/darwin-fastbuild/genfiles/external/bazel_tools -isystem external/bazel_tools/tools/cpp/gcc3 -Iexternal/gtest/googletest/include -Iexternal/gtest/googletest -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c external/gtest/googletest/src/gtest-port.cc -o bazel-out/darwin-fastbuild/bin/external/gtest/_objs/gtest/external/gtest/googletest/src/gtest-port.pic.o)
ERROR: /[...]/util/time/BUILD:3:1: C++ compilation of rule '//util/time:time' failed (Exit 1)
osxcross: warning: cannot find clang intrinsic headers; please report this issue to the OSXCross project
tpoechtrager commented 7 years ago

Which version of Ubuntu are you on?

aleb commented 7 years ago

Ubuntu 17.04

DrMcCoy commented 6 years ago

Similarily, on Gentoo ~amd64, the path is /usr/lib64/clang/6.0.0/include/xmmintrin.h, etc.

ekristen commented 3 years ago

20.04

tpoechtrager commented 3 years ago

I have no such issue on a freshly installed Ubuntu 20.04 VM. Your Clang installation is broken. Also it would be quite helpful if you wouldn't just post "20.04" and instead explain the issue you are facing. Especially the way you installed Clang.

ekristen commented 3 years ago

Apologies. It was late last night. I followed your install instruction for osxcross. I'll have to look at how clang was installed, I don't recall doing that specifically.

I am trying to cross compile SQLite in golang from Linux to Darwin,

Also, that's the error I got, there was no additional context or than to report it as a bug and it happened on 20.04

ekristen commented 3 years ago

Ok, clang installed, another error. Will dig in.