Package Details: llvm10 10.0.1-3

Git Clone URL: https://aur.archlinux.org/llvm10.git (read-only, click to copy)
Package Base: llvm10
Description: Collection of modular and reusable compiler and toolchain technologies
Upstream URL: https://llvm.org/
Licenses: custom:Apache 2.0 with LLVM Exception
Submitter: Drommer
Maintainer: Drommer
Last Packager: Drommer
Votes: 2
Popularity: 0.090521
First Submitted: 2022-06-03 20:32 (UTC)
Last Updated: 2023-06-08 22:34 (UTC)

Latest Comments

qtmax commented on 2023-01-16 22:12 (UTC)

When llvm10 is built with LTO (i.e. lto is enabled in OPTIONS in makepkg.conf), clang10 fails to build against it, failing with a ton of "undefined reference" errors when linking clang-tblgen.

LTO is enabled by default in devtools, used by aurutils when building AUR packages in a chroot. That means, aur sync -c clang10 will fail, unless llvm10 is built without LTO.

Any ideas how it can be fixed (aside from filtering out -flto from CFLAGS in PKGBUILD)?

Sample of errors:

[42/1549] Linking CXX executable bin/clang-tblgen
FAILED: bin/clang-tblgen 
: && /usr/bin/c++ -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -pedantic -Wno-long-long -O3 -DNDEBUG -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now    -Wl,-rpath-link,/home/build/clang10/src/clang-10.0.1.src/build/./lib  -Wl,-O3 -Wl,--gc-sections utils/TableGen/CMakeFiles/clang-tblgen.dir/ASTTableGen.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangASTNodesEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangASTPropertiesEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangAttrEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangCommentCommandInfoEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangCommentHTMLNamedCharacterReferenceEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangCommentHTMLTagsEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangDataCollectorsEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangDiagnosticsEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangOpcodesEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangOpenCLBuiltinEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangOptionDocEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangSACheckersEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangTypeNodesEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/MveEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/NeonEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/TableGen.cpp.o -o bin/clang-tblgen -L/opt/llvm10/lib -Wl,-rpath,"\$ORIGIN/../lib"  /opt/llvm10/lib/libLLVMSupport.a  /opt/llvm10/lib/libLLVMTableGen.a  /opt/llvm10/lib/libLLVMSupport.a  -lz  -lrt  -ldl  -ltinfo  -lm  /opt/llvm10/lib/libLLVMDemangle.a && :
/usr/bin/ld: utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangAttrEmitter.cpp.o: in function `void llvm::SmallVectorImpl<char>::append<char const*, void>(char const*, char const*) [clone .constprop.0]':
ClangAttrEmitter.cpp:(.text._ZN4llvm15SmallVectorImplIcE6appendIPKcvEEvT_S5_.constprop.0+0x5e): undefined reference to `llvm::SmallVectorBase::grow_pod(void*, unsigned long, unsigned long)'
/usr/bin/ld: utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangAttrEmitter.cpp.o: in function `NormalizeNameForSpellingComparison(llvm::StringRef)':
ClangAttrEmitter.cpp:(.text._ZL34NormalizeNameForSpellingComparisonN4llvm9StringRefE+0x37): undefined reference to `llvm::StringRef::find_first_not_of(llvm::StringRef, unsigned long) const'
/usr/bin/ld: ClangAttrEmitter.cpp:(.text._ZL34NormalizeNameForSpellingComparisonN4llvm9StringRefE+0x74): undefined reference to `llvm::StringRef::find_last_not_of(llvm::StringRef, unsigned long) const'
/usr/bin/ld: utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangAttrEmitter.cpp.o: in function `(anonymous namespace)::AttrClass::emitAttrList(llvm::raw_ostream&) const':
ClangAttrEmitter.cpp:(.text._ZNK12_GLOBAL__N_19AttrClass12emitAttrListERN4llvm11raw_ostreamE+0xf3): undefined reference to `llvm::raw_ostream::write(char const*, unsigned long)'
/usr/bin/ld: ClangAttrEmitter.cpp:(.text._ZNK12_GLOBAL__N_19AttrClass12emitAttrListERN4llvm11raw_ostreamE+0x11c): undefined reference to `llvm::raw_ostream::write(char const*, unsigned long)'
/usr/bin/ld: ClangAttrEmitter.cpp:(.text._ZNK12_GLOBAL__N_19AttrClass12emitAttrListERN4llvm11raw_ostreamE+0x145): undefined reference to `llvm::raw_ostream::write(char const*, unsigned long)'
/usr/bin/ld: ClangAttrEmitter.cpp:(.text._ZNK12_GLOBAL__N_19AttrClass12emitAttrListERN4llvm11raw_ostreamE+0x16d): undefined reference to `llvm::raw_ostream::write(char const*, unsigned long)'

<...>

Drommer commented on 2022-09-27 12:41 (UTC)

Thank you, added.

gnaggnoyil commented on 2022-09-26 15:12 (UTC)

I encountered the following error when building this package with extra-x86_64-build:

-- Installing: /build/llvm10/pkg/llvm10/opt/llvm10/lib/cmake/llvm/./GenerateVersionFromVCS.cmake
-- Installing: /build/llvm10/pkg/llvm10/opt/llvm10/lib/cmake/llvm/./LLVMExternalProjectUtils.cmake
~/llvm10/src/llvm-10.0.1.src/utils/lit ~/llvm10/src/llvm-10.0.1.src/build
Traceback (most recent call last):
  File "/build/llvm10/src/llvm-10.0.1.src/utils/lit/setup.py", line 4, in <module>
    from setuptools import setup, find_packages
ModuleNotFoundError: No module named 'setuptools'
==> ERROR: A failure occurred in package_llvm10().
    Aborting...

I then added python-setuptools as makedepends and the package is built successfully with extra-x86_64-build. I think python-setuptools should be added as makedepends.