Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to precompile on macOS Catalina #442

Closed
Nate711 opened this issue Oct 21, 2019 · 4 comments · Fixed by #447
Closed

Fails to precompile on macOS Catalina #442

Nate711 opened this issue Oct 21, 2019 · 4 comments · Fixed by #447

Comments

@Nate711
Copy link

Nate711 commented Oct 21, 2019

julia> using Cxx
[ Info: Precompiling Cxx [a0b5b9ef-44b7-5148-a2d1-f6db19f3c3d2]
ERROR: LoadError: LoadError: "/usr/include" is missing, please install those headers by running `sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /`
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] collectStdHeaders!(::Array{Tuple{String,Int32},1}) at /Users/nathan/.julia/packages/Cxx/vxYtJ/src/initialization.jl:231
 [3] collectAllHeaders! at /Users/nathan/.julia/packages/Cxx/vxYtJ/src/initialization.jl:386 [inlined]
 [4] collectAllHeaders(::Bool) at /Users/nathan/.julia/packages/Cxx/vxYtJ/src/initialization.jl:390
 [5] top-level scope at /Users/nathan/.julia/packages/Cxx/vxYtJ/src/initialization.jl:420
 [6] include at ./boot.jl:328 [inlined]
 [7] include_relative(::Module, ::String) at ./loading.jl:1094
 [8] include at ./Base.jl:31 [inlined]
 [9] include(::String) at /Users/nathan/.julia/packages/Cxx/vxYtJ/src/Cxx.jl:144
 [10] top-level scope at /Users/nathan/.julia/packages/Cxx/vxYtJ/src/Cxx.jl:170
 [11] include at ./boot.jl:328 [inlined]
 [12] include_relative(::Module, ::String) at ./loading.jl:1094
 [13] include(::Module, ::String) at ./Base.jl:31
 [14] top-level scope at none:2
 [15] eval at ./boot.jl:330 [inlined]
 [16] eval(::Expr) at ./client.jl:432
 [17] top-level scope at ./none:3
in expression starting at /Users/nathan/.julia/packages/Cxx/vxYtJ/src/initialization.jl:420
in expression starting at /Users/nathan/.julia/packages/Cxx/vxYtJ/src/Cxx.jl:170
ERROR: Failed to precompile Cxx [a0b5b9ef-44b7-5148-a2d1-f6db19f3c3d2] to /Users/nathan/.julia/compiled/v1.2/Cxx/ESGkI.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1253
 [3] _require(::Base.PkgId) at ./loading.jl:1013
 [4] require(::Base.PkgId) at ./loading.jl:911
 [5] require(::Module, ::Symbol) at ./loading.jl:906
@Gnimuc
Copy link
Member

Gnimuc commented Oct 21, 2019

Should be fixed on master, see #428.

@Nate711
Copy link
Author

Nate711 commented Oct 21, 2019

julia> Pkg.add(PackageSpec(url="https://github.com/JuliaInterop/Cxx.jl"))
   Cloning git-repo `https://github.com/JuliaInterop/Cxx.jl`
  Updating git-repo `https://github.com/JuliaInterop/Cxx.jl`
  Updating git-repo `https://github.com/JuliaInterop/Cxx.jl`
 Resolving package versions...
  Updating `~/.julia/environments/v1.2/Project.toml`
  [a0b5b9ef] + Cxx v0.3.2 #master (https://github.com/JuliaInterop/Cxx.jl)
  Updating `~/.julia/environments/v1.2/Manifest.toml`
  [a0b5b9ef] + Cxx v0.3.2 #master (https://github.com/JuliaInterop/Cxx.jl)
  Building Cxx → `~/.julia/packages/Cxx/c7DTV/deps/build.log`

julia> using Cxx
[ Info: Precompiling Cxx [a0b5b9ef-44b7-5148-a2d1-f6db19f3c3d2]
WARNING: Could not add directory /Applications/Xcode.app/Contents/Developer/SDKs/MacOSX.sdk/usr/include to clang search path!
In file included from /Cxx.h:1:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/boot.h:16:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstring:61:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string.h:61:15: fatal error: 'string.h' file not found
#include_next <string.h>
              ^~~~~~~~~~
In file included from /Cxx.h:1:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/replpane.jl:83:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/../../deps/usr/src/clang-6.0.1/include/clang/Parse/Parser.h:17:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/../../deps/usr/src/clang-6.0.1/include/clang/AST/Availability.h:17:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/../../deps/usr/src/clang-6.0.1/include/clang/Basic/SourceLocation.h:18:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/../../deps/usr/src/clang-6.0.1/include/clang/Basic/LLVM.h:22:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/../../deps/usr/build/clang-6.0.1/include/llvm/Support/Casting.h:19:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/../../deps/usr/build/clang-6.0.1/include/llvm/Support/type_traits.h:19:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/utility:200:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__tuple:80:44: error: base specifier must name a class
template <class _Tp> struct __tuple_like : false_type {};
                                           ^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__tuple:165:63: error: base specifier must name a class
template <class... _Tp> struct __tuple_like<tuple<_Tp...> > : true_type {};
                                                              ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__tuple:197:72: error: base specifier must name a class
template <class _T1, class _T2> struct __tuple_like<pair<_T1, _T2> > : true_type {};
                                                                       ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__tuple:225:78: error: base specifier must name a class
template <class _Tp, size_t _Size> struct __tuple_like<array<_Tp, _Size> > : true_type {};
                                                                             ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__tuple:299:71: error: base specifier must name a class
template <class... _Tp> struct __tuple_like<__tuple_types<_Tp...> > : true_type {};
                                                                      ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__tuple:418:14: error: base specifier must name a class
    : public false_type {};
      ~~~~~~~^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__tuple:433:14: error: base specifier must name a class
    : public false_type {};
      ~~~~~~~^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__tuple:448:14: error: base specifier must name a class
    : public false_type {};
      ~~~~~~~^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__tuple:472:37: error: base specifier must name a class
struct __tuple_like_with_size_imp : false_type {};
                                    ^~~~~~~~~~
In file included from /Cxx.h:1:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/replpane.jl:83:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/../../deps/usr/src/clang-6.0.1/include/clang/Parse/Parser.h:17:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/../../deps/usr/src/clang-6.0.1/include/clang/AST/Availability.h:17:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/../../deps/usr/src/clang-6.0.1/include/clang/Basic/SourceLocation.h:18:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/../../deps/usr/src/clang-6.0.1/include/clang/Basic/LLVM.h:22:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/../../deps/usr/build/clang-6.0.1/include/llvm/Support/Casting.h:19:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/../../deps/usr/build/clang-6.0.1/include/llvm/Support/type_traits.h:19:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/utility:271:1: error: redefinition of 'swap' as different kind of symbol
swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np]) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/type_traits:4536:1: note: previous definition is here
swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np]) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value);
^
In file included from /Cxx.h:1:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/replpane.jl:83:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/../../deps/usr/src/clang-6.0.1/include/clang/Parse/Parser.h:17:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/../../deps/usr/src/clang-6.0.1/include/clang/AST/Availability.h:17:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/../../deps/usr/src/clang-6.0.1/include/clang/Basic/SourceLocation.h:18:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/../../deps/usr/src/clang-6.0.1/include/clang/Basic/LLVM.h:22:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/../../deps/usr/build/clang-6.0.1/include/llvm/Support/Casting.h:19:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/../../deps/usr/build/clang-6.0.1/include/llvm/Support/type_traits.h:19:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/utility:979:10: error: no member named 'memcpy' in namespace 'std'; did you mean 'memchr'?
    std::memcpy(&__r, __p, sizeof(__r));
    ~~~~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstring:81:9: note: 'memchr' declared here
using ::memchr;
        ^
In file included from /Cxx.h:1:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/replpane.jl:83:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/../../deps/usr/src/clang-6.0.1/include/clang/Parse/Parser.h:17:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/../../deps/usr/src/clang-6.0.1/include/clang/AST/Availability.h:17:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/../../deps/usr/src/clang-6.0.1/include/clang/Basic/SourceLocation.h:18:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/../../deps/usr/src/clang-6.0.1/include/clang/Basic/LLVM.h:22:
In file included from /Users/nathan/.julia/packages/Cxx/c7DTV/src/CxxREPL/../../deps/usr/build/clang-6.0.1/include/llvm/Support/Casting.h:20:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cassert:21:10: fatal error: 'assert.h' file not found
#include <assert.h>
         ^~~~~~~~~~
WARNING: Could not add directory /Applications/Xcode.app/Contents/Developer/SDKs/MacOSX.sdk/usr/include to clang search path!

@Gnimuc
Copy link
Member

Gnimuc commented Oct 22, 2019

Could you give it a check that /Applications/Xcode.app/Contents/Developer/SDKs/MacOSX.sdk/usr/include is a valid path on your machine? If not, try searching usr/include under /Applications/Xcode.app/Contents/Developer/.

@Gnimuc
Copy link
Member

Gnimuc commented Oct 22, 2019

looks like Apple changed the path again:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
https://superuser.com/questions/1488979/macos-catalina-cannot-find-usr-include-file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants