Trouble Building
Closed this issue · 8 comments
llvm seemed to build successfully but I hit an error when building dragonffi
cmake -DCMAKE_BUILD_TYPE=release -DLLVM_CONFIG=../llvm/llvm-5.0.1.src/build/bin/llvm-config .. (numba-xnd)
-- The C compiler identification is AppleClang 9.1.0.9020039
-- The CXX compiler identification is AppleClang 9.1.0.9020039
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using llvm-config: /Users/saul/p/dragonffi/llvm/llvm-5.0.1.src/build/bin/llvm-config
-- Performing Test C_SUPPORTS_FPIC
-- Performing Test C_SUPPORTS_FPIC - Success
-- Performing Test CXX_SUPPORTS_FPIC
-- Performing Test CXX_SUPPORTS_FPIC - Success
-- Building with -fPIC
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG - Success
-- Performing Test C_SUPPORTS_WERROR_DATE_TIME
-- Performing Test C_SUPPORTS_WERROR_DATE_TIME - Success
-- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME
-- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME - Success
-- Performing Test CXX_SUPPORTS_CXX11
-- Performing Test CXX_SUPPORTS_CXX11 - Success
-- Clang resources directory: /Users/saul/p/dragonffi/llvm/llvm-5.0.1.src/build/lib/clang/6.0.0
CMake Error at llvm/llvm-5.0.1.src/cmake/modules/LLVM-Config.cmake:175 (message):
Target AArch64 is not in the set of libraries.
Call Stack (most recent call first):
CMakeLists.txt:121 (llvm_map_components_to_libnames)
-- Configuring incomplete, errors occurred!
See also "/Users/saul/p/dragonffi/build/CMakeFiles/CMakeOutput.log".
EDIT: here is the log: https://gist.github.com/saulshanabrook/7c7ca86d26e02a73ea4655e5fd499370
Hmm that's weird. Which cmake command did you use to compile LLVM?
Can you try to replace ${LLVM_TARGETS_TO_BUILD}
line 63 in dragonffi/CMakeLists.txt
by X86
and launch cmake again?
EDIT: more easily, apply this patch: https://gist.github.com/aguinet/6ec0b7c5471ba76b2b5e9f1223179946
That worked! I also updated to your latest commit. But now I am getting errors running make :)
cmake -DCMAKE_BUILD_TYPE=release -DLLVM_CONFIG=../llvm/llvm-5.0.1.src/build/bin/llvm-config .. (numba-xnd)
-- The C compiler identification is AppleClang 9.1.0.9020039
-- The CXX compiler identification is AppleClang 9.1.0.9020039
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using llvm-config: /Users/saul/p/dragonffi/llvm/llvm-5.0.1.src/build/bin/llvm-config
-- Performing Test C_SUPPORTS_FPIC
-- Performing Test C_SUPPORTS_FPIC - Success
-- Performing Test CXX_SUPPORTS_FPIC
-- Performing Test CXX_SUPPORTS_FPIC - Success
-- Building with -fPIC
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG - Success
-- Performing Test C_SUPPORTS_WERROR_DATE_TIME
-- Performing Test C_SUPPORTS_WERROR_DATE_TIME - Success
-- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME
-- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME - Success
-- Performing Test CXX_SUPPORTS_CXX11
-- Performing Test CXX_SUPPORTS_CXX11 - Success
-- Clang resources directory: /Users/saul/p/dragonffi/llvm/llvm-5.0.1.src/build/lib/clang/6.0.0
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of _Complex
-- Check size of _Complex - done
-- Found PythonInterp: /usr/local/miniconda3/envs/numba-xnd/bin/python (found version "3.6.5")
-- Found PythonLibs: /usr/local/miniconda3/envs/numba-xnd/lib/libpython3.6m.dylib (found version "3.6.5")
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/saul/p/dragonffi/build
make (numba-xnd)
[ 1%] Packing clang ressources into a header file...
Scanning dependencies of target dffi
[ 3%] Building CXX object CMakeFiles/dffi.dir/lib/dffi_api.cpp.o
[ 5%] Building CXX object CMakeFiles/dffi.dir/lib/dffi_impl.cpp.o
/Users/saul/p/dragonffi/lib/dffi_impl.cpp:79:17: error: no member named 'DW_CC_LLVM_Win64' in namespace 'llvm::dwarf'
case dwarf::DW_CC_LLVM_Win64:
~~~~~~~^
/Users/saul/p/dragonffi/lib/dffi_impl.cpp:81:17: error: no member named 'DW_CC_LLVM_X86_64SysV' in namespace 'llvm::dwarf'
case dwarf::DW_CC_LLVM_X86_64SysV:
~~~~~~~^
/Users/saul/p/dragonffi/lib/dffi_impl.cpp:83:17: error: no member named 'DW_CC_LLVM_AAPCS' in namespace 'llvm::dwarf'
case dwarf::DW_CC_LLVM_AAPCS:
~~~~~~~^
/Users/saul/p/dragonffi/lib/dffi_impl.cpp:85:17: error: no member named 'DW_CC_LLVM_AAPCS_VFP' in namespace 'llvm::dwarf'
case dwarf::DW_CC_LLVM_AAPCS_VFP:
~~~~~~~^
/Users/saul/p/dragonffi/lib/dffi_impl.cpp:87:17: error: no member named 'DW_CC_LLVM_IntelOclBicc' in namespace 'llvm::dwarf'
case dwarf::DW_CC_LLVM_IntelOclBicc:
~~~~~~~^
/Users/saul/p/dragonffi/lib/dffi_impl.cpp:89:17: error: no member named 'DW_CC_LLVM_SpirFunction' in namespace 'llvm::dwarf'
case dwarf::DW_CC_LLVM_SpirFunction:
~~~~~~~^
/Users/saul/p/dragonffi/lib/dffi_impl.cpp:91:17: error: no member named 'DW_CC_LLVM_OpenCLKernel' in namespace 'llvm::dwarf'
case dwarf::DW_CC_LLVM_OpenCLKernel:
~~~~~~~^
/Users/saul/p/dragonffi/lib/dffi_impl.cpp:93:17: error: no member named 'DW_CC_LLVM_Swift' in namespace 'llvm::dwarf'; did you mean
'DW_LANG_Swift'?
case dwarf::DW_CC_LLVM_Swift:
~~~~~~~^~~~~~~~~~~~~~~~
DW_LANG_Swift
/usr/local/miniconda3/envs/numba-xnd/include/llvm/BinaryFormat/Dwarf.def:653:1: note: 'DW_LANG_Swift' declared here
HANDLE_DW_LANG(0x001e, Swift, 5, DWARF)
^
/usr/local/miniconda3/envs/numba-xnd/include/llvm/BinaryFormat/Dwarf.h:180:51: note: expanded from macro 'HANDLE_DW_LANG'
#define HANDLE_DW_LANG(ID, NAME, VERSION, VENDOR) DW_LANG_##NAME = ID,
^
<scratch space>:67:1: note: expanded from here
DW_LANG_Swift
^
/Users/saul/p/dragonffi/lib/dffi_impl.cpp:95:17: error: no member named 'DW_CC_LLVM_PreserveMost' in namespace 'llvm::dwarf'
case dwarf::DW_CC_LLVM_PreserveMost:
~~~~~~~^
/Users/saul/p/dragonffi/lib/dffi_impl.cpp:97:17: error: no member named 'DW_CC_LLVM_PreserveAll' in namespace 'llvm::dwarf'; did you
mean 'DW_CC_LLVM_vectorcall'?
case dwarf::DW_CC_LLVM_PreserveAll:
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
DW_CC_LLVM_vectorcall
/usr/local/miniconda3/envs/numba-xnd/include/llvm/BinaryFormat/Dwarf.def:715:1: note: 'DW_CC_LLVM_vectorcall' declared here
HANDLE_DW_CC(0xc0, LLVM_vectorcall)
^
/usr/local/miniconda3/envs/numba-xnd/include/llvm/BinaryFormat/Dwarf.h:196:32: note: expanded from macro 'HANDLE_DW_CC'
#define HANDLE_DW_CC(ID, NAME) DW_CC_##NAME = ID,
^
<scratch space>:91:1: note: expanded from here
DW_CC_LLVM_vectorcall
^
/Users/saul/p/dragonffi/lib/dffi_impl.cpp:99:17: error: no member named 'DW_CC_LLVM_X86RegCall' in namespace 'llvm::dwarf'; did you
mean 'DW_CC_LLVM_vectorcall'?
case dwarf::DW_CC_LLVM_X86RegCall:
~~~~~~~^~~~~~~~~~~~~~~~~~~~~
DW_CC_LLVM_vectorcall
/usr/local/miniconda3/envs/numba-xnd/include/llvm/BinaryFormat/Dwarf.def:715:1: note: 'DW_CC_LLVM_vectorcall' declared here
HANDLE_DW_CC(0xc0, LLVM_vectorcall)
^
/usr/local/miniconda3/envs/numba-xnd/include/llvm/BinaryFormat/Dwarf.h:196:32: note: expanded from macro 'HANDLE_DW_CC'
#define HANDLE_DW_CC(ID, NAME) DW_CC_##NAME = ID,
^
<scratch space>:91:1: note: expanded from here
DW_CC_LLVM_vectorcall
^
/Users/saul/p/dragonffi/lib/dffi_impl.cpp:97:10: error: duplicate case value 'DW_CC_LLVM_vectorcall'
case dwarf::DW_CC_LLVM_PreserveAll:
^
/Users/saul/p/dragonffi/lib/dffi_impl.cpp:75:10: note: previous case defined here
case dwarf::DW_CC_LLVM_vectorcall:
^
/Users/saul/p/dragonffi/lib/dffi_impl.cpp:99:10: error: duplicate case value 'DW_CC_LLVM_vectorcall'
case dwarf::DW_CC_LLVM_X86RegCall:
^
/Users/saul/p/dragonffi/lib/dffi_impl.cpp:97:10: note: previous case defined here
case dwarf::DW_CC_LLVM_PreserveAll:
^
13 errors generated.
make[2]: *** [CMakeFiles/dffi.dir/lib/dffi_impl.cpp.o] Error 1
make[1]: *** [CMakeFiles/dffi.dir/all] Error 2
make: *** [all] Error 2
That's strange, it looks like it's compiling against an LLVM6 installation :/
What do /Users/saul/p/dragonffi/llvm/llvm-5.0.1.src/build/bin/clang --version
and /Users/saul/p/dragonffi/llvm/llvm-5.0.1.src/build/bin/llvm-config --version
say?
EDIT: and also /Users/saul/p/dragonffi/llvm/llvm-5.0.1.src/build/bin/llvm-config --prefix
The fact that it's giving you this directory /usr/local/miniconda3/envs/numba-xnd/include/llvm/BinaryFormat/Dwarf.def
confirms that something wrong is happening!
There is no /Users/saul/p/dragonffi/llvm/llvm-5.0.1.src/build/bin/clang
file.
/Users/saul/p/dragonffi/llvm/llvm-5.0.1.src/build/bin/llvm-config --version (numba-xnd)
5.0.1
/Users/saul/p/dragonffi/llvm/llvm-5.0.1.src/build/bin/llvm-config --prefix (numba-xnd)
/Users/saul/p/dragonffi/llvm/llvm-5.0.1.src/build
which clang (numba-xnd)
/usr/local/miniconda3/envs/numba-xnd/bin/clang
/usr/local/miniconda3/envs/numba-xnd/bin/clang --version (numba-xnd)
clang version 6.0.0 (tags/RELEASE_600/final)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /usr/local/miniconda3/envs/numba-xnd/bin
Okay. I think clang hasn't been built when you compiled LLVM. Are you sure your symlink in tools/clang works :) ?
I am also compiling the 0.3.0 release, so if you can wait ~1h, you will be able to download it from pip :)
Okay. I think clang hasn't been built when you compiled LLVM. Are you sure your symlink in tools/clang works :) ?
Ah that was it. The symlink was relatively instead of absolute.
I am also compiling the 0.3.0 release, so if you can wait ~1h, you will be able to download it from pip :)
Oh, thank you! yep!