JuliaInterop / Cxx.jl

The Julia C++ Interface
Other
757 stars 108 forks source link

Issue building Cxx on Mac with v0.7 #388

Closed Roger-luo closed 5 years ago

Roger-luo commented 6 years ago
(v0.7) pkg> build Cxx
  Building Cxx → `~/.julia/dev/Cxx/deps/build.log`
 Resolving package versions...
┌ Error: Error building `Cxx`:
│ ERROR: LoadError: UndefVarError: JULIA_HOME not defined
│ Stacktrace:
│  [1] top-level scope at none:0
│  [2] include at ./boot.jl:317 [inlined]
│  [3] include_relative(::Module, ::String) at ./loading.jl:1034
│  [4] include(::Module, ::String) at ./sysimg.jl:29
│  [5] include(::String) at ./client.jl:393
│  [6] top-level scope at none:0
│ in expression starting at /Users/roger/.julia/dev/Cxx/deps/build.jl:16
└ @ Pkg.Operations ~/Documents/Repos/julia-git/usr/share/julia/stdlib/v0.7/Pkg/src/Operations.jl:1007

Julia Version

julia> versioninfo()
Julia Version 0.7.0-beta2.0
Commit b145832402* (2018-07-13 19:54 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin17.7.0)
  CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  WORD_SIZE: 64
  LIBM: libimf
  LLVM: libLLVM-6.0.0 (ORCJIT, skylake)
programmeroftheeve commented 6 years ago

This isn't only an issue on MacOS, this issue will happen on any OS with the latest 0.7 releases. This is the tip of the Iceberg so to speak. I was able to get Cxx to build the shim library after making some changes to the source to account for the LLVM update and updating the build script to account for the 0.7 changes, however it fails to load the package after that. After that, we will have to wait for @Keno do so some work, as I am not that familiar with clang's library to start making changes. So the best course of action would to develop your wrapper library with 0.6.4, with the various deprecations in mind, until Cxx gets the updates it needs.

Gnimuc commented 6 years ago

I guess Cxx will adopt BinaryBuilder/BinaryProvider as its new building system in the near future, then no more compiling is needed on user's machine. For now, I tried to make the package compile but have no idea on how to fix these precompile errors: https://gist.github.com/Gnimuc/f063c20273affb13665652a55f237341