Package Base Details: llvm-git

Git Clone URL: https://aur.archlinux.org/llvm-git.git (read-only, click to copy)
Keywords: clang git lld lldb llvm polly
Submitter: yurikoles
Maintainer: Lone_Wolf (rjahanbakhshi)
Last Packager: rjahanbakhshi
Votes: 112
Popularity: 0.043241
First Submitted: 2018-12-05 13:56
Last Updated: 2021-06-23 10:38

Pinned Comments

Lone_Wolf commented on 2020-08-22 12:18

Archlinux currently has 3 llvm git implementations

  1. This package

    • It aims to provide a full llvm/clang compiler environment for development purposes.
    • Supports cross-compiling , bindings for external stuff (python, ocaml etc) , and some things not in extra-llvm.
    • intended to be used with archlinux core,extra & community repos
    • CONFLICTS with extra llvm/clang packages
    • Currently there's no repo with binary versions
  2. llvm-minimal-git

    • focuses on providing stuff needed for AUR mesa-git. Doesn't support cross-compiling or any bindings for external stuff like ocaml & python.
    • intended to be used with archlinux core,extra & community repos
    • compatible with extra llvm/clang packages
    • no repo with binary versions
  3. packages created & maintained by Lordheavy, an arch developer

    • intended to be used with archlinux testing repos
    • sometimes has problems on systems where testing repos are disabled
    • uses same package structure as llvm/clang in official repos
    • source
    • binary versions in LordHeavys unoffical repo

Lone_Wolf commented on 2019-04-12 20:41

I've looked good at clang-trunk , llvm-svn, repo llvm/clang packages and think this package is now on route to become a worthy successor to llvm-svn .

  • llvm-libs-git holds the runtime libraries.

    It conflicts with the repo llvm-libs package. This is the only way to make sure the llvm linker from git is used, and that's needed for a full dev environment.

  • llvm-git

    has llvm , clang, compiler-rt, ocaml & python bindings, polly , lld , lldb .


The Package now uses a new environment variable to make ninja behave, NINJAFLAGS. If you want to use it adjust the snippet below to your desired values and add it to makepkg.conf.

Incase you are satisfied with ninja defaults you don't need to do anything.

# Add to makepkg.conf
# limit ninja to 20 jobs
# requires special code in PKGBUILD
# see ninja --help for additonal options
NINJAFLAGS="-j20"

The check() function fails rather often, but I do suggest to build with them. If build fails due to test failure you can add --nocheck to skip the tests.

Latest Comments

« First ‹ Previous ... 2 3 4 5 6 7 8 9 10 11 12 ... Next › Last »

Lone_Wolf commented on 2020-03-06 21:01

llvm suite trunk master is known to have test failures very often.

llvm-git in Lordheavy's unoffical mesa-git repo doesn't run any tests and is used by many people.

General consensus among aur maintainers seems to be shifting towards including tests whenever possible and letting users decide whether those test failures are important enough to not use a certain version or can be worked around by using --nocheck .

gardotd426 commented on 2020-03-06 15:20

This is the full output starting with the checks:


==> Starting check()...
[15/16] Running the LLVM regression tests
FAIL: LLVM :: tools/gold/X86/thinlto_weak_library.ll (34127 of 36369)
**** TEST 'LLVM :: tools/gold/X86/thinlto_weak_library.ll' FAILED ******
Script:
--
: 'RUN: at line 6';   /tmp/makepkg/llvm-git/src/_build/bin/opt -module-summary /tmp/makepkg/llvm-git/src/llvm-project/llvm/test/tools/gold/X86/thinlto_weak_library.ll -o /tmp/makepkg/llvm-git/src/_build/test/tools/gold/X86/Output/thinlto_weak_library.ll.tmp.o
: 'RUN: at line 7';   /tmp/makepkg/llvm-git/src/_build/bin/opt -module-summary /tmp/makepkg/llvm-git/src/llvm-project/llvm/test/tools/gold/X86/Inputs/thinlto_weak_library1.ll -o /tmp/makepkg/llvm-git/src/_build/test/tools/gold/X86/Output/thinlto_weak_library.ll.tmp2.o
: 'RUN: at line 8';   /tmp/makepkg/llvm-git/src/_build/bin/opt -module-summary /tmp/makepkg/llvm-git/src/llvm-project/llvm/test/tools/gold/X86/Inputs/thinlto_weak_library2.ll -o /tmp/makepkg/llvm-git/src/_build/test/tools/gold/X86/Output/thinlto_weak_library.ll.tmp3.o
: 'RUN: at line 15';   /usr/bin/ld.gold -plugin /tmp/makepkg/llvm-git/src/_build/./lib/LLVMgold.so     --plugin-opt=thinlto     --plugin-opt=save-temps     -m elf_x86_64     -o /tmp/makepkg/llvm-git/src/_build/test/tools/gold/X86/Output/thinlto_weak_library.ll.tmp4     /tmp/makepkg/llvm-git/src/_build/test/tools/gold/X86/Output/thinlto_weak_library.ll.tmp.o     --start-lib /tmp/makepkg/llvm-git/src/_build/test/tools/gold/X86/Output/thinlto_weak_library.ll.tmp2.o /tmp/makepkg/llvm-git/src/_build/test/tools/gold/X86/Output/thinlto_weak_library.ll.tmp3.o --end-lib
: 'RUN: at line 26';   /tmp/makepkg/llvm-git/src/_build/bin/llvm-dis /tmp/makepkg/llvm-git/src/_build/test/tools/gold/X86/Output/thinlto_weak_library.ll.tmp2.o.1.promote.bc -o - | /tmp/makepkg/llvm-git/src/_build/bin/FileCheck /tmp/makepkg/llvm-git/src/llvm-project/llvm/test/tools/gold/X86/thinlto_weak_library.ll
--
Exit Code: 1

Command Output (stderr):

/tmp/makepkg/llvm-git/src/llvm-project/llvm/test/tools/gold/X86/thinlto_weak_library.ll:27:10: error: CHECK: expected string not found in input ; CHECK: declare dso_local i32 @f() ^ <stdin>:1:1: note: scanning from here ; ModuleID = '/tmp/makepkg/llvm-git/src/_build/test/tools/gold/X86/Output/thinlto_weak_library.ll.tmp2.o.1.promote.bc' ^ <stdin>:8:1: note: possible intended match here define dso_local i32 @test1() local_unnamed_addr { ^

--


FAIL: LLVM :: tools/gold/X86/v1.16/wrap-2.ll (34134 of 36369) **** TEST 'LLVM :: tools/gold/X86/v1.16/wrap-2.ll' FAILED ****** Script: -- : 'RUN: at line 15'; /tmp/makepkg/llvm-git/src/_build/bin/opt -module-summary /tmp/makepkg/llvm-git/src/llvm-project/llvm/test/tools/gold/X86/v1.16/wrap-2.ll -o /tmp/makepkg/llvm-git/src/_build/test/tools/gold/X86/v1.16/Output/wrap-2.ll.tmp.o : 'RUN: at line 16'; /tmp/makepkg/llvm-git/src/_build/bin/opt -module-summary /tmp/makepkg/llvm-git/src/llvm-project/llvm/test/tools/gold/X86/v1.16/Inputs/wrap-bar.ll -o /tmp/makepkg/llvm-git/src/_build/test/tools/gold/X86/v1.16/Output/wrap-2.ll.tmp1.o : 'RUN: at line 17'; /usr/bin/ld.gold -m elf_x86_64 -plugin /tmp/makepkg/llvm-git/src/_build/./lib/LLVMgold.so /tmp/makepkg/llvm-git/src/_build/test/tools/gold/X86/v1.16/Output/wrap-2.ll.tmp.o /tmp/makepkg/llvm-git/src/_build/test/tools/gold/X86/v1.16/Output/wrap-2.ll.tmp1.o -shared -o /tmp/makepkg/llvm-git/src/_build/test/tools/gold/X86/v1.16/Output/wrap-2.ll.tmp.so -wrap=bar : 'RUN: at line 18'; /tmp/makepkg/llvm-git/src/_build/bin/llvm-objdump -d /tmp/makepkg/llvm-git/src/_build/test/tools/gold/X86/v1.16/Output/wrap-2.ll.tmp.so | /tmp/makepkg/llvm-git/src/_build/bin/FileCheck /tmp/makepkg/llvm-git/src/llvm-project/llvm/test/tools/gold/X86/v1.16/wrap-2.ll -check-prefix=THIN : 'RUN: at line 19'; /tmp/makepkg/llvm-git/src/_build/bin/llvm-readobj --symbols /tmp/makepkg/llvm-git/src/_build/test/tools/gold/X86/v1.16/Output/wrap-2.ll.tmp.so | /tmp/makepkg/llvm-git/src/_build/bin/FileCheck -check-prefix=BIND /tmp/makepkg/llvm-git/src/llvm-project/llvm/test/tools/gold/X86/v1.16/wrap-2.ll -- Exit Code: 1

Command Output (stderr):

/tmp/makepkg/llvm-git/src/llvm-project/llvm/test/tools/gold/X86/v1.16/wrap-2.ll:29:9: error: THIN: expected string not found in input ; THIN: foo: ^ <stdin>:2:1: note: scanning from here /tmp/makepkg/llvm-git/src/_build/test/tools/gold/X86/v1.16/Output/wrap-2.ll.tmp.so: file format elf64-x86-64 ^ <stdin>:7:19: note: possible intended match here 0000000000000290 <foo>: ^

--


Testing Time: 257.36s


Failing Tests (2): LLVM :: tools/gold/X86/thinlto_weak_library.ll LLVM :: tools/gold/X86/v1.16/wrap-2.ll

Expected Passes : 35051 Expected Failures : 156 Unsupported Tests : 1160 Unexpected Failures: 2 FAILED: test/CMakeFiles/check-llvm cd /tmp/makepkg/llvm-git/src/_build/test && /usr/bin/python /tmp/makepkg/llvm-git/src/_build/./bin/llvm-lit -sv /tmp/makepkg/llvm-git/src/_build/test ninja: build stopped: subcommand failed. ==> ERROR: A failure occurred in check(). Aborting...

gardotd426 commented on 2020-03-06 15:17

@nstgc Actually I just tried it with removing python-yaml first and it still failed with two tests:


Failing Tests (2):
    LLVM :: tools/gold/X86/thinlto_weak_library.ll
    LLVM :: tools/gold/X86/v1.16/wrap-2.ll

nstgc commented on 2020-03-06 14:16

@gardotd426 This is just my two cents as a two bit user, but I don't see why it's worth taking chances when you can easily run pacman -Rdd python-yaml and then reinstall it after compiling is down. You could even make it a one liner:

sudo pacman -Rdd python-yaml && makepkg -sir && sudo pacman -S --noconfirm python-yaml 

Assuming you didn't delete the package archive, that shouldn't take long.

gardotd426 commented on 2020-03-06 14:08

So does python-yaml need to be removed before this will properly work, or is it enough to just use --nocheck?

nstgc commented on 2020-03-05 14:54

@Lone_Wolf Thanks for that! python-yaml is required by lutris, but I can uninstall that long enough to build this. And I will take your advise and build llvm-minimum-git instead. It has this same issue by the way.

Lone_Wolf commented on 2020-03-05 14:39

I've confirmed the test failure occurs only with python-yaml present and reported the bug.

https://bugs.llvm.org/show_bug.cgi?id=45119

Lone_Wolf commented on 2020-03-05 00:53

Yup, those are the log files I needed.

File "/home/nstgc5/Installers/llvm-git.aur/src/llvm-project/llvm/tools/opt-viewer/opt-viewer.py", line 200, in render_entry
    escaped_name = cgi.escape(r.DemangledFunctionName)
AttributeError: module 'cgi' has no attribute 'escape'

cgi.escape was removed in python 3.8, so the error itself is correct. Not sure why llvm tools want to use deprecated functionality.

The log also mentions you have python module yaml , and yaml is not present in my build environment .

  • llvm git/svn versions are tricky to build
  • When problems occur, I verify they're not due to my build machine by building in a clean chroot. check https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_clean_chroot
  • mesa-git supports all videocards supported by stock mesa, no need to wait.
  • Incase you only need llvm trunk for mesa-git, llvm-minimal-git is probably a better choice.

nstgc commented on 2020-03-04 16:09

@Lone_Worlf These are the logs I think you are looking for:
https://gist.github.com/nstgc/34b6824016e861a0e310656793a7828c
https://gist.github.com/nstgc/ea881f98eeec5c4cc8db704f5bb1f218

nstgc commented on 2020-03-04 14:49

@Lone_Wolf A question (sorry). I was reading through the stickies for llvm-minimal-git and it mentioned errors for non-amdgpu (and to ignore them). I'm building llvm (and mesa) ahead of installing a new video. Should I wait until I have the AMD card in my computer before compiling this stuff? I've never compiled drivers or kernels before so I'm not really sure of best practices.