[Pkg-opencl-devel] Bug#1078750: pocl: FTBFS on arm64: /usr/lib/llvm-17/bin/llc: error: unable to get target for 'unknown', see --version and --triple.
Andreas Beckmann
anbe at debian.org
Thu Aug 15 21:46:35 BST 2024
Control: tag -1 help
Control: retitle -1 pocl: FTBFS on arm64: Clang link test FAILED.
On 15/08/2024 13.13, Sebastian Ramacher wrote:
> /usr/lib/llvm-17/bin/llc: error: unable to get target for 'unknown', see --version and --triple.
> make[1]: [debian/rules:88: override_dh_auto_configure] Error 1 (ignored)
Nope, that is not the problem.
I think we are failing in CMake with this output:
...
-- Running LLVM link test
-- LLVM link test OK
-- Running Clang link test
-- Clang link test output: Change Dir: '/<<PKGBUILDDIR>>/obj-aarch64-linux-gnu/CMakeFiles/CMakeTmp'
Run Build Command(s): /usr/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile cmTC_30306/fast
gmake[2]: Entering directory '/<<PKGBUILDDIR>>/obj-aarch64-linux-gnu/CMakeFiles/CMakeTmp'
/usr/bin/gmake -f CMakeFiles/cmTC_30306.dir/build.make CMakeFiles/cmTC_30306.dir/build
gmake[3]: Entering directory '/<<PKGBUILDDIR>>/obj-aarch64-linux-gnu/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_30306.dir/LinkTestClang.cc.o
/usr/bin/c++ -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/lib/llvm-17/include -std=c++17 -fno-exceptions -funwind-tables -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DLLVM_MAJOR=17 -o CMakeFiles/cmTC_30306.dir/LinkTestClang.cc.o -c /<<PKGBUILDDIR>>/cmake/LinkTestClang.cc
In file included from /usr/lib/llvm-17/include/clang/Basic/TokenKinds.h:27,
from /usr/lib/llvm-17/include/clang/Basic/IdentifierTable.h:20,
from /usr/lib/llvm-17/include/clang/AST/DeclarationName.h:18,
from /usr/lib/llvm-17/include/clang/AST/DeclBase.h:18,
from /usr/lib/llvm-17/include/clang/AST/Decl.h:19,
from /usr/lib/llvm-17/include/clang/AST/ASTContext.h:21,
from /usr/lib/llvm-17/include/clang/Frontend/ASTUnit.h:17,
from /usr/lib/llvm-17/include/clang/Frontend/FrontendAction.h:23,
from /usr/lib/llvm-17/include/clang/CodeGen/CodeGenAction.h:12,
from /<<PKGBUILDDIR>>/cmake/LinkTestClang.cc:26:
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:23:26: error: pasting "kw_" and "[" does not give a valid preprocessing token
23 | #define KEYWORD(X,Y) TOK(kw_ ## X)
| ^~~
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:756:30: note: in expansion of macro ‘KEYWORD’
756 | #define KEYWORD_ATTRIBUTE(X) KEYWORD(X, KEYALL)
| ^~~~~~~
/usr/lib/llvm-17/include/clang/Basic/AttrTokenKinds.inc:9:1: note: in expansion of macro ‘KEYWORD_ATTRIBUTE’
9 | KEYWORD_ATTRIBUTE(__arm_streaming)
| ^~~~~~~~~~~~~~~~~
In file included from /usr/lib/llvm-17/include/clang/Basic/TokenKinds.h:35:
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:23:26: error: pasting "kw_" and "[" does not give a valid preprocessing token
23 | #define KEYWORD(X,Y) TOK(kw_ ## X)
| ^~~
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:756:30: note: in expansion of macro ‘KEYWORD’
756 | #define KEYWORD_ATTRIBUTE(X) KEYWORD(X, KEYALL)
| ^~~~~~~
/usr/lib/llvm-17/include/clang/Basic/AttrTokenKinds.inc:9:1: note: in expansion of macro ‘KEYWORD_ATTRIBUTE’
9 | KEYWORD_ATTRIBUTE(__arm_streaming)
| ^~~~~~~~~~~~~~~~~
In file included from /usr/lib/llvm-17/include/clang/Basic/TokenKinds.h:43:
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:23:26: error: pasting "kw_" and "[" does not give a valid preprocessing token
23 | #define KEYWORD(X,Y) TOK(kw_ ## X)
| ^~~
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:756:30: note: in expansion of macro ‘KEYWORD’
756 | #define KEYWORD_ATTRIBUTE(X) KEYWORD(X, KEYALL)
| ^~~~~~~
/usr/lib/llvm-17/include/clang/Basic/AttrTokenKinds.inc:9:1: note: in expansion of macro ‘KEYWORD_ATTRIBUTE’
9 | KEYWORD_ATTRIBUTE(__arm_streaming)
| ^~~~~~~~~~~~~~~~~
In file included from /usr/lib/llvm-17/include/clang/Basic/TokenKinds.h:51:
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:23:26: error: pasting "kw_" and "[" does not give a valid preprocessing token
23 | #define KEYWORD(X,Y) TOK(kw_ ## X)
| ^~~
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:756:30: note: in expansion of macro ‘KEYWORD’
756 | #define KEYWORD_ATTRIBUTE(X) KEYWORD(X, KEYALL)
| ^~~~~~~
/usr/lib/llvm-17/include/clang/Basic/AttrTokenKinds.inc:9:1: note: in expansion of macro ‘KEYWORD_ATTRIBUTE’
9 | KEYWORD_ATTRIBUTE(__arm_streaming)
| ^~~~~~~~~~~~~~~~~
In file included from /usr/lib/llvm-17/include/clang/Basic/TypeTraits.h:23,
from /usr/lib/llvm-17/include/clang/AST/Expr.h:29,
from /usr/lib/llvm-17/include/clang/AST/DeclCXX.h:22,
from /usr/lib/llvm-17/include/clang/Sema/DeclSpec.h:25,
from /usr/lib/llvm-17/include/clang/Sema/CodeCompleteConsumer.h:21,
from /usr/lib/llvm-17/include/clang/Frontend/ASTUnit.h:28:
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:23:26: error: pasting "kw_" and "[" does not give a valid preprocessing token
23 | #define KEYWORD(X,Y) TOK(kw_ ## X)
| ^~~
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:756:30: note: in expansion of macro ‘KEYWORD’
756 | #define KEYWORD_ATTRIBUTE(X) KEYWORD(X, KEYALL)
| ^~~~~~~
/usr/lib/llvm-17/include/clang/Basic/AttrTokenKinds.inc:9:1: note: in expansion of macro ‘KEYWORD_ATTRIBUTE’
9 | KEYWORD_ATTRIBUTE(__arm_streaming)
| ^~~~~~~~~~~~~~~~~
In file included from /usr/lib/llvm-17/include/clang/Basic/TypeTraits.h:26:
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:23:26: error: pasting "kw_" and "[" does not give a valid preprocessing token
23 | #define KEYWORD(X,Y) TOK(kw_ ## X)
| ^~~
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:756:30: note: in expansion of macro ‘KEYWORD’
756 | #define KEYWORD_ATTRIBUTE(X) KEYWORD(X, KEYALL)
| ^~~~~~~
/usr/lib/llvm-17/include/clang/Basic/AttrTokenKinds.inc:9:1: note: in expansion of macro ‘KEYWORD_ATTRIBUTE’
9 | KEYWORD_ATTRIBUTE(__arm_streaming)
| ^~~~~~~~~~~~~~~~~
In file included from /usr/lib/llvm-17/include/clang/Basic/TypeTraits.h:29:
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:23:26: error: pasting "kw_" and "[" does not give a valid preprocessing token
23 | #define KEYWORD(X,Y) TOK(kw_ ## X)
| ^~~
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:756:30: note: in expansion of macro ‘KEYWORD’
756 | #define KEYWORD_ATTRIBUTE(X) KEYWORD(X, KEYALL)
| ^~~~~~~
/usr/lib/llvm-17/include/clang/Basic/AttrTokenKinds.inc:9:1: note: in expansion of macro ‘KEYWORD_ATTRIBUTE’
9 | KEYWORD_ATTRIBUTE(__arm_streaming)
| ^~~~~~~~~~~~~~~~~
In file included from /usr/lib/llvm-17/include/clang/Basic/TypeTraits.h:32:
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:23:26: error: pasting "kw_" and "[" does not give a valid preprocessing token
23 | #define KEYWORD(X,Y) TOK(kw_ ## X)
| ^~~
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:756:30: note: in expansion of macro ‘KEYWORD’
756 | #define KEYWORD_ATTRIBUTE(X) KEYWORD(X, KEYALL)
| ^~~~~~~
/usr/lib/llvm-17/include/clang/Basic/AttrTokenKinds.inc:9:1: note: in expansion of macro ‘KEYWORD_ATTRIBUTE’
9 | KEYWORD_ATTRIBUTE(__arm_streaming)
| ^~~~~~~~~~~~~~~~~
In file included from /usr/lib/llvm-17/include/clang/Basic/TypeTraits.h:35:
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:23:26: error: pasting "kw_" and "[" does not give a valid preprocessing token
23 | #define KEYWORD(X,Y) TOK(kw_ ## X)
| ^~~
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:756:30: note: in expansion of macro ‘KEYWORD’
756 | #define KEYWORD_ATTRIBUTE(X) KEYWORD(X, KEYALL)
| ^~~~~~~
/usr/lib/llvm-17/include/clang/Basic/AttrTokenKinds.inc:9:1: note: in expansion of macro ‘KEYWORD_ATTRIBUTE’
9 | KEYWORD_ATTRIBUTE(__arm_streaming)
| ^~~~~~~~~~~~~~~~~
In file included from /usr/lib/llvm-17/include/clang/Basic/TypeTraits.h:38:
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:23:26: error: pasting "kw_" and "[" does not give a valid preprocessing token
23 | #define KEYWORD(X,Y) TOK(kw_ ## X)
| ^~~
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:756:30: note: in expansion of macro ‘KEYWORD’
756 | #define KEYWORD_ATTRIBUTE(X) KEYWORD(X, KEYALL)
| ^~~~~~~
/usr/lib/llvm-17/include/clang/Basic/AttrTokenKinds.inc:9:1: note: in expansion of macro ‘KEYWORD_ATTRIBUTE’
9 | KEYWORD_ATTRIBUTE(__arm_streaming)
| ^~~~~~~~~~~~~~~~~
In file included from /usr/lib/llvm-17/include/clang/Basic/TypeTraits.h:44:
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:23:26: error: pasting "kw_" and "[" does not give a valid preprocessing token
23 | #define KEYWORD(X,Y) TOK(kw_ ## X)
| ^~~
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:756:30: note: in expansion of macro ‘KEYWORD’
756 | #define KEYWORD_ATTRIBUTE(X) KEYWORD(X, KEYALL)
| ^~~~~~~
/usr/lib/llvm-17/include/clang/Basic/AttrTokenKinds.inc:9:1: note: in expansion of macro ‘KEYWORD_ATTRIBUTE’
9 | KEYWORD_ATTRIBUTE(__arm_streaming)
| ^~~~~~~~~~~~~~~~~
In file included from /usr/lib/llvm-17/include/clang/Basic/TypeTraits.h:47:
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:23:26: error: pasting "kw_" and "[" does not give a valid preprocessing token
23 | #define KEYWORD(X,Y) TOK(kw_ ## X)
| ^~~
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:756:30: note: in expansion of macro ‘KEYWORD’
756 | #define KEYWORD_ATTRIBUTE(X) KEYWORD(X, KEYALL)
| ^~~~~~~
/usr/lib/llvm-17/include/clang/Basic/AttrTokenKinds.inc:9:1: note: in expansion of macro ‘KEYWORD_ATTRIBUTE’
9 | KEYWORD_ATTRIBUTE(__arm_streaming)
| ^~~~~~~~~~~~~~~~~
In file included from /usr/lib/llvm-17/include/clang/Basic/TypeTraits.h:54:
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:23:26: error: pasting "kw_" and "[" does not give a valid preprocessing token
23 | #define KEYWORD(X,Y) TOK(kw_ ## X)
| ^~~
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:756:30: note: in expansion of macro ‘KEYWORD’
756 | #define KEYWORD_ATTRIBUTE(X) KEYWORD(X, KEYALL)
| ^~~~~~~
/usr/lib/llvm-17/include/clang/Basic/AttrTokenKinds.inc:9:1: note: in expansion of macro ‘KEYWORD_ATTRIBUTE’
9 | KEYWORD_ATTRIBUTE(__arm_streaming)
| ^~~~~~~~~~~~~~~~~
In file included from /usr/lib/llvm-17/include/clang/Basic/TypeTraits.h:58:
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:23:26: error: pasting "kw_" and "[" does not give a valid preprocessing token
23 | #define KEYWORD(X,Y) TOK(kw_ ## X)
| ^~~
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:756:30: note: in expansion of macro ‘KEYWORD’
756 | #define KEYWORD_ATTRIBUTE(X) KEYWORD(X, KEYALL)
| ^~~~~~~
/usr/lib/llvm-17/include/clang/Basic/AttrTokenKinds.inc:9:1: note: in expansion of macro ‘KEYWORD_ATTRIBUTE’
9 | KEYWORD_ATTRIBUTE(__arm_streaming)
| ^~~~~~~~~~~~~~~~~
In file included from /usr/lib/llvm-17/include/clang/Basic/ExpressionTraits.h:23,
from /usr/lib/llvm-17/include/clang/AST/ExprCXX.h:34,
from /usr/lib/llvm-17/include/clang/Analysis/ConstructionContext.h:20,
from /usr/lib/llvm-17/include/clang/Analysis/CFG.h:18,
from /usr/lib/llvm-17/include/clang/Analysis/AnalysisDeclContext.h:22,
from /usr/lib/llvm-17/include/clang/Analysis/PathDiagnostic.h:17,
from /usr/lib/llvm-17/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h:17,
from /usr/lib/llvm-17/include/clang/Frontend/CompilerInvocation.h:22,
from /usr/lib/llvm-17/include/clang/Frontend/CompilerInstance.h:16,
from /<<PKGBUILDDIR>>/cmake/LinkTestClang.cc:29:
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:23:26: error: pasting "kw_" and "[" does not give a valid preprocessing token
23 | #define KEYWORD(X,Y) TOK(kw_ ## X)
| ^~~
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:756:30: note: in expansion of macro ‘KEYWORD’
756 | #define KEYWORD_ATTRIBUTE(X) KEYWORD(X, KEYALL)
| ^~~~~~~
/usr/lib/llvm-17/include/clang/Basic/AttrTokenKinds.inc:9:1: note: in expansion of macro ‘KEYWORD_ATTRIBUTE’
9 | KEYWORD_ATTRIBUTE(__arm_streaming)
| ^~~~~~~~~~~~~~~~~
In file included from /usr/lib/llvm-17/include/clang/Basic/ExpressionTraits.h:26:
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:23:26: error: pasting "kw_" and "[" does not give a valid preprocessing token
23 | #define KEYWORD(X,Y) TOK(kw_ ## X)
| ^~~
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:756:30: note: in expansion of macro ‘KEYWORD’
756 | #define KEYWORD_ATTRIBUTE(X) KEYWORD(X, KEYALL)
| ^~~~~~~
/usr/lib/llvm-17/include/clang/Basic/AttrTokenKinds.inc:9:1: note: in expansion of macro ‘KEYWORD_ATTRIBUTE’
9 | KEYWORD_ATTRIBUTE(__arm_streaming)
| ^~~~~~~~~~~~~~~~~
/usr/lib/llvm-17/include/clang/Basic/AttrTokenKinds.inc:9:19: warning: ‘streaming’ attribute only applies to function types [-Wattributes]
9 | KEYWORD_ATTRIBUTE(__arm_streaming)
| ^~~~~~~~~~~~~~~
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.h:26:16: note: in definition of macro ‘TOK’
26 | #define TOK(X) X,
| ^
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.def:756:30: note: in expansion of macro ‘KEYWORD’
756 | #define KEYWORD_ATTRIBUTE(X) KEYWORD(X, KEYALL)
| ^~~~~~~
/usr/lib/llvm-17/include/clang/Basic/AttrTokenKinds.inc:9:1: note: in expansion of macro ‘KEYWORD_ATTRIBUTE’
9 | KEYWORD_ATTRIBUTE(__arm_streaming)
| ^~~~~~~~~~~~~~~~~
/usr/lib/llvm-17/include/clang/Basic/AttrTokenKinds.inc: In function ‘constexpr bool clang::tok::isRegularKeywordAttribute(TokenKind)’:
/usr/lib/llvm-17/include/clang/Basic/TokenKinds.h:112:44: error: ‘kw___arm_streaming’ is not a member of ‘clang::tok’
112 | #define KEYWORD_ATTRIBUTE(X) || (K == tok::kw_##X)
| ^~~
/usr/lib/llvm-17/include/clang/Basic/AttrTokenKinds.inc:9:1: note: in expansion of macro ‘KEYWORD_ATTRIBUTE’
9 | KEYWORD_ATTRIBUTE(__arm_streaming)
| ^~~~~~~~~~~~~~~~~
gmake[3]: *** [CMakeFiles/cmTC_30306.dir/build.make:78: CMakeFiles/cmTC_30306.dir/LinkTestClang.cc.o] Error 1
gmake[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-aarch64-linux-gnu/CMakeFiles/CMakeTmp'
gmake[2]: *** [Makefile:127: cmTC_30306/fast] Error 2
gmake[2]: Leaving directory '/<<PKGBUILDDIR>>/obj-aarch64-linux-gnu/CMakeFiles/CMakeTmp'
CMake Error at cmake/LLVM.cmake:788 (message):
Clang link test FAILED. This mostly happens when your Clang installation
does not have all dependencies and/or headers installed.
Call Stack (most recent call first):
CMakeLists.txt:581 (include)
I had a quick test with llvm-18, but that seemed to run into test failures ...
but I currently don't have time to debug building with either of these llvms.
Andreas
More information about the Pkg-opencl-devel
mailing list