-
Notifications
You must be signed in to change notification settings - Fork 107
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
ERROR: LoadError: UndefVarError: JULIA_HOME not defined #398
Comments
It worked for me when I built Julia from source, I got a similar error when using a download version of julia. |
It is still not working with non-"built from source" Julia installations. That error could be simply corrected by putting I'm slowly (just a couple of minute a day) trying to figure out how to use BinaryBuilder.jl to ship compiled LLVM/Clang for Cxx in downloaded Julia installations. |
UPDATE: @cdsousa I tried a binary build on Linux, after tweaking the makefile, it's basically working. PrerequisitesJulia binary is not shipped with Clang and LLVM tools, so the first step is to build Julia 1.0 compatible LLVM tools and Clang. Although LLVMBuilder has released several versions of LLVM binaries, it looks like none of them are 1.0 compatible. Fortunately, I've locally(CI is too slow for such a thing) built a 1.0 compatible version a while ago for Clang.jl, so we can use it here. Now, we have LLVM tools, build/libs, build/includes. Rebuild ClangUsing the Clang built via LLVMBuilder directly, I got weird link errors like rontend -lclangTooling -lclangToolingCore -lclangCodeGen -lclangARCMigrate -lclangFormat build/bootstrap.o
│ Undefined symbols for architecture x86_64:
│ "llvm::Type::dump() const", referenced from:
│ _llvmtdump in bootstrap.o
│ "llvm::Value::dump() const", referenced from:
│ _ReplaceFunctionForDecl in bootstrap.o
│ _llvmdump in bootstrap.o
│ ld: symbol(s) not found for architecture x86_64
│ clang: error: linker command failed with exit code 1 (use -v to see invocation)
│ make: *** [usr/lib/libcxxffi.dylib] Error 1
│ [ Info: Building julia source build Build boostrap & libcxxffiFrom the source code, we have Clang src/libs, src/include and LLVM src/include. We also have Julia libs and includes that are already shipped with Julia binary by default. Now, just tweak those variables in Troubleshootingif CMake complains about |
@cdsousa, have you made much progress on the |
@twadleigh , nothing since #390 (comment). |
Here is the routine I used for building libcxxffi: https://github.com/Gnimuc/LLVMBuilder/tree/libcxxffi-cmake#build-libcxxffi But I'm still not crystal clear about what's the canonical way to build Julia1.0-compatible LLVM/Clang binaries. You may notice that the BB version I used is Given prebuild LLVM/Clang binaries, it's actually not hard to build libcxxffi, just cross-compile bootstrap.cpp and link LLVM/Clang and Julia. As for Windows support, the last thing that I can't figure out is the compatibility of Windows Julia binaries. I guess a potential solution would be JuliaLang/julia#30338. |
(v1.0) pkg> add Cxx#master
Building Cxx ─→
~/.julia/packages/Cxx/81BGP/deps/build.log
┌ Error: Error building
Cxx
:│ [ Info: Building julia binary build
│ ERROR: LoadError: UndefVarError: JULIA_HOME not defined
│ Stacktrace:
│ [1] top-level scope at logging.jl:312
│ [2] top-level scope at /root/.julia/packages/Cxx/81BGP/deps/build.jl:43
│ [3] include at ./boot.jl:317 [inlined]
│ [4] include_relative(::Module, ::String) at ./loading.jl:1041
│ [5] include(::Module, ::String) at ./sysimg.jl:29
│ [6] include(::String) at ./client.jl:388
│ [7] top-level scope at none:0
│ in expression starting at /root/.julia/packages/Cxx/81BGP/deps/build.jl:42
│ writing path.jl file
│ Tuning for julia installation at /root/julia-1.0/bin with sources possibly at /root/julia-1.0/bin/../..
└ @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1069
Julia Version 1.0.1
Commit 0d713926f8 (2018-09-29 19:05 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, skylake)
The text was updated successfully, but these errors were encountered: