osxcross icon indicating copy to clipboard operation
osxcross copied to clipboard

"cannot find clang intrinsic headers" on Ubuntu

Open aleb opened this issue 8 years ago • 7 comments

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

aleb avatar Oct 19 '17 13:10 aleb

Which version of Ubuntu are you on?

tpoechtrager avatar Oct 24 '17 11:10 tpoechtrager

Ubuntu 17.04

aleb avatar Oct 24 '17 11:10 aleb

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

DrMcCoy avatar Jun 08 '18 11:06 DrMcCoy

20.04

ekristen avatar Sep 26 '21 03:09 ekristen

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.

tpoechtrager avatar Sep 26 '21 11:09 tpoechtrager

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 avatar Sep 26 '21 14:09 ekristen

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

ekristen avatar Sep 26 '21 18:09 ekristen