maleadt / LLVM.jl

Julia wrapper for the LLVM C API
Other
129 stars 40 forks source link

error building #3

Closed domluna closed 7 years ago

domluna commented 7 years ago
Julia Version 0.5.0
Commit 3c9d753 (2016-09-19 18:14 UTC)
Platform Info:
  System: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7 CPU         870  @ 2.93GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Nehalem)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.1 (ORCJIT, nehalem)

Output after running DEBUG=1 j5 build.jl --compilecache=no. j5 is the alias I have setup for julia-0.5.

DEBUG: Acceptable LLVM versions: 3.7.1, 3.8.0, 3.8.1, 3.9.0, 4.0.0
DEBUG: Searching for config binaries in /home/dom/github/julia-0.5/bin
DEBUG: Searching for config binaries in /home/dom/conda/bin
DEBUG: Searching for config binaries in /home/dom/.cargo/bin
DEBUG: Searching for config binaries in /home/dom/.nix-profile/bin
DEBUG: Searching for config binaries in /home/dom/bin
DEBUG: Searching for config binaries in /usr/local/sbin
DEBUG: Searching for config binaries in /usr/local/bin
DEBUG: Searching for config binaries in /usr/sbin
DEBUG: Searching for config binaries in /usr/bin
DEBUG: - found llvm-config at /usr/bin/llvm-config-3.9
DEBUG: Searching for libraries using /usr/bin/llvm-config-3.9
DEBUG: ... contains libraries in /usr/lib/llvm-3.9/lib
DEBUG: - found v3.9.0 at /usr/lib/llvm-3.9/lib/libLLVM-3.9.so
DEBUG: - found v3.9.0 at /usr/lib/llvm-3.9/lib/libLLVM-3.9.0.so
DEBUG: - found v3.9.0 at /usr/lib/llvm-3.9/lib/libLLVM.so
DEBUG: Searching for config binaries in /sbin
DEBUG: Searching for config binaries in /bin
DEBUG: Searching for config binaries in /usr/games
DEBUG: Searching for config binaries in /usr/local/games
DEBUG: Searching for config binaries in /home/dom/.fzf/bin
INFO: Found 3 LLVM installations, providing 1 different versions
rm -f libLLVM_extra.so ./Target.o ./Target/NVPTX.o ./Transforms/IPO.o ./IR/Pass.o ./IR/PassManager.o
g++ -I/usr/lib/llvm-3.9/include -std=c++0x -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wno-comment -std=c++11 -ffunction-sections -fdata-sections -O2 -g -DNDEBUG -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fPIC -I/usr/lib/llvm-3.9/include   -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_AARCH64 -DTARGET_AMDGPU -DTARGET_ARM -DTARGET_BPF -DTARGET_HEXAGON -DTARGET_MIPS -DTARGET_MSP430 -DTARGET_NVPTX -DTARGET_POWERPC -DTARGET_SPARC -DTARGET_SYSTEMZ -DTARGET_X86 -DTARGET_XCORE  -c -o Target.o Target.cpp
g++ -I/usr/lib/llvm-3.9/include -std=c++0x -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wno-comment -std=c++11 -ffunction-sections -fdata-sections -O2 -g -DNDEBUG -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fPIC -I/usr/lib/llvm-3.9/include   -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_AARCH64 -DTARGET_AMDGPU -DTARGET_ARM -DTARGET_BPF -DTARGET_HEXAGON -DTARGET_MIPS -DTARGET_MSP430 -DTARGET_NVPTX -DTARGET_POWERPC -DTARGET_SPARC -DTARGET_SYSTEMZ -DTARGET_X86 -DTARGET_XCORE  -c -o Target/NVPTX.o Target/NVPTX.cpp
g++ -I/usr/lib/llvm-3.9/include -std=c++0x -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wno-comment -std=c++11 -ffunction-sections -fdata-sections -O2 -g -DNDEBUG -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fPIC -I/usr/lib/llvm-3.9/include   -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_AARCH64 -DTARGET_AMDGPU -DTARGET_ARM -DTARGET_BPF -DTARGET_HEXAGON -DTARGET_MIPS -DTARGET_MSP430 -DTARGET_NVPTX -DTARGET_POWERPC -DTARGET_SPARC -DTARGET_SYSTEMZ -DTARGET_X86 -DTARGET_XCORE  -c -o Transforms/IPO.o Transforms/IPO.cpp
g++ -I/usr/lib/llvm-3.9/include -std=c++0x -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wno-comment -std=c++11 -ffunction-sections -fdata-sections -O2 -g -DNDEBUG -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fPIC -I/usr/lib/llvm-3.9/include   -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_AARCH64 -DTARGET_AMDGPU -DTARGET_ARM -DTARGET_BPF -DTARGET_HEXAGON -DTARGET_MIPS -DTARGET_MSP430 -DTARGET_NVPTX -DTARGET_POWERPC -DTARGET_SPARC -DTARGET_SYSTEMZ -DTARGET_X86 -DTARGET_XCORE  -c -o IR/Pass.o IR/Pass.cpp
g++ -I/usr/lib/llvm-3.9/include -std=c++0x -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wno-comment -std=c++11 -ffunction-sections -fdata-sections -O2 -g -DNDEBUG -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fPIC -I/usr/lib/llvm-3.9/include   -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_AARCH64 -DTARGET_AMDGPU -DTARGET_ARM -DTARGET_BPF -DTARGET_HEXAGON -DTARGET_MIPS -DTARGET_MSP430 -DTARGET_NVPTX -DTARGET_POWERPC -DTARGET_SPARC -DTARGET_SYSTEMZ -DTARGET_X86 -DTARGET_XCORE  -c -o IR/PassManager.o IR/PassManager.cpp
g++ -I/usr/lib/llvm-3.9/include -std=c++0x -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wno-comment -std=c++11 -ffunction-sections -fdata-sections -O2 -g -DNDEBUG -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fPIC -I/usr/lib/llvm-3.9/include   -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_AARCH64 -DTARGET_AMDGPU -DTARGET_ARM -DTARGET_BPF -DTARGET_HEXAGON -DTARGET_MIPS -DTARGET_MSP430 -DTARGET_NVPTX -DTARGET_POWERPC -DTARGET_SPARC -DTARGET_SYSTEMZ -DTARGET_X86 -DTARGET_XCORE -L/usr/lib/llvm-3.9/lib  -Wl,-z,defs "-Wl,-rpath,/usr/lib/llvm-3.9/lib"  -shared Target.o Target/NVPTX.o Transforms/IPO.o IR/Pass.o IR/PassManager.o -L/usr/lib/llvm-3.9/lib  -Wl,-z,defs "-Wl,-rpath,/usr/lib/llvm-3.9/lib" -lLLVM -lrt -ldl -ltinfo -lpthread -lz -lm -o libLLVM_extra.so
IR/Pass.o:(.data.rel.ro._ZTVN4llvm15JuliaModulePassE[_ZTVN4llvm15JuliaModulePassE]+0x40): undefined reference to `llvm::ModulePass::createPrinterPass(llvm::raw_ostream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
IR/Pass.o:(.data.rel.ro._ZTVN4llvm17JuliaFunctionPassE[_ZTVN4llvm17JuliaFunctionPassE]+0x40): undefined reference to `llvm::FunctionPass::createPrinterPass(llvm::raw_ostream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
IR/Pass.o:(.data.rel.ro._ZTVN4llvm19JuliaBasicBlockPassE[_ZTVN4llvm19JuliaBasicBlockPassE]+0x40): undefined reference to `llvm::BasicBlockPass::createPrinterPass(llvm::raw_ostream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
collect2: error: ld returned 1 exit status
Makefile:34: recipe for target 'libLLVM_extra.so' failed
make: *** [libLLVM_extra.so] Error 1
ERROR: LoadError: failed process: Process(`make -j9`, ProcessExited(2)) [2]
 in pipeline_error(::Base.Process) at ./process.jl:616
 in run at ./process.jl:592 [inlined]
 in (::##28#30)() at /home/dom/.julia/v0.5/LLVM/deps/build.jl:167
 in withenv(::##28#30, ::Pair{String,String}, ::Vararg{Pair{String,String},N}) at ./env.jl:153
 in cd(::##27#29, ::String) at ./file.jl:59
 in include_from_node1(::String) at ./loading.jl:488
 in process_options(::Base.JLOptions) at ./client.jl:262
 in _start() at ./client.jl:318
while loading /home/dom/.julia/v0.5/LLVM/deps/build.jl, in expression starting on line 163

On a sort of related note I'm planning to experiment with CUDAnative so should I use the julia from JuliaGPU org?

maleadt commented 7 years ago

Ah crap, C++11 ABI issues again. Did you build your LLVM with Clang? What distro are you on?

Regarding CUDAnative: you must use the julia fork from JuliaGPU for now (see the README on CUDAnative.jl and README.cuda.md on the Julia fork). We're working on making that unnecessary, I hope to have an installable CUDA(native).jl by 0.6 or the release after that.

domluna commented 7 years ago

I'm on Ubuntu 16.04 and yes, I believe it was built with Clang. Good to know about the fork, I'll use that!

domluna commented 7 years ago

Seems to work on this branch. Thanks Tim!