Package Details: clang-analyzer-svn 3.9.0svn_r274222-1

Git Clone URL: https://aur.archlinux.org/llvm-svn.git (read-only)
Package Base: llvm-svn
Description: Source code analysis tool for Clang, supporting C, C++, and Objective-C
Upstream URL: http://clang-analyzer.llvm.org/
Keywords: clang llvm
Licenses: custom:University of Illinois
Groups: llvm-toolchain-svn
Conflicts: clang-analyzer
Provides: clang-analyzer
Replaces: clang-analyzer
Submitter: None
Maintainer: kerberizer
Last Packager: kerberizer
Votes: 69
Popularity: 0.197567
First Submitted: 2007-08-02 07:15
Last Updated: 2016-06-30 12:08

Required by (1)

  • clang-svn (requires clang-analyzer-svn) (optional)

Sources (5)

Pinned Comments

kerberizer commented on 2016-08-11 00:39

[NOTICE] This is the updated pinned comment, a.k.a. README. If you already know the package well, you may safely ignore it.

IMPORTANT INFORMATION // PLEASE READ CAREFULLY

This is a fairly complex package. The only recommended and supported method of building is in a clean chroot as described on the Arch Wiki.[1] A crude example is also provided further below. The use of AUR helpers (yaourt, pacaur, etc.)[2] in particular is discouraged; it may or may not work for you.

* * *

Note that failing regression tests do not necessarily indicate a problem with the package. Such failures are fairly normal for an actively developed code (i.e. SVN trunk or Git master). If this happens, wait for some time before trying the build again: a few hours to a day or two at most should be enough. If you desperately need the package built right away, you may also comment out the "make check" and "make check-clang" lines or append "|| true" to them, but do this only if you really know what you're doing and why.

* * *

Pre-built, binary packages are available from two unofficial repositories:

o lordheavy's [mesa-git],[3] which may be particularly useful for those who need LLVM solely as a Mesa dependency. Note that the packages are built against the [testing] repos. lordheavy is an Arch Linux developer and trusted user (TU).

o kerberizer's [llvm-svn],[4] which is automatically rebuilt every 6 hours from this PKGBUILD and the latest SVN code. The packages are built against the [core/extra] repos. kerberizer (yours truly) is the current maintainer.

Both repos provide x86_64, i686 and multilib packages. kerberizer's repo is also PGP signed.

* * *

Those who use LLVM as a Mesa dependency may also find helpful the topic "mesa-git - latest videodrivers & issues" on the Arch Linux forums.[5]

* * *

If you need a more detailed and specific example on how to build this package in a clean chroot, a crude excerpt from the build script of the kerberizer's binary repo follows. It is meant to allow building lib32-llvm-svn too, hence why gcc-multilib is used. The code takes advantage of multiple cores when building and compressing; the example here is tailored to an 8-core/threads system. The user's ccache cache [sic] is utilised as well, so frequent rebuilds can be much faster. If you don't sign your packages, omit the lines mentioning PACKAGER and GPGKEY, otherwise they need to be set correctly. The chroot ("${x86_64_chroot}") is best set up in /tmp, but this requires a lot of RAM (most likely at least 32 GB, since /tmp is by default half the size of the physical RAM detected); second best solution is on an SSD. The latter goes for ~/.ccache as well. Note that the latest versions of systemd mount /tmp with the nosuid flag. You need to turn this flag off before building on /tmp, or else the build will fail.

$ cd /path/to/where/llvm-svn/is/cloned

$ x86_64_chroot="/chroot/x86_64"

$ sudo mkdir -p "${x86_64_chroot}/root"

$ sudo /usr/bin/mkarchroot \
-C /usr/share/devtools/pacman-multilib.conf \
-M /usr/share/devtools/makepkg-x86_64.conf \
-c /var/cache/pacman/pkg \
"${x86_64_chroot}/root" \
base-devel ccache

$ sudo /usr/bin/arch-nspawn "${x86_64_chroot}/root" /bin/bash -c "yes | pacman -Sy gcc-multilib"

$ sudo /usr/bin/arch-nspawn "${x86_64_chroot}/root" /bin/bash -c \
"echo -e \"CCACHE_DIR='/.ccache'\nXZ_DEFAULTS='--threads=8'\" >>/etc/environment ; \
sed \
-e 's/^#MAKEFLAGS=.*$/MAKEFLAGS=\"-j9\"/' \
-e '/^BUILDENV=/s/\!ccache/ccache/' \
-e 's/^#PACKAGER=.*$/PACKAGER=\"Some One <someone@somewhere.com>\"/' \
-e 's/^#GPGKEY=.*$/GPGKEY=\"0x0000000000000000\"/' \
-i /etc/makepkg.conf"

$ sudo /usr/bin/makechrootpkg -c -d ~/.ccache:/.ccache -r "${x86_64_chroot}"

It's advisable to always start this from scratch, i.e. don't reuse the old chroot, but create it anew for each build (it uses the local pacman cache, so doesn't waste bandwidth, and if located in /tmp or on an SSD, is pretty fast).

----
1. https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot
2. https://wiki.archlinux.org/index.php/AUR_helpers
3. https://wiki.archlinux.org/index.php/Unofficial_user_repositories#mesa-git
4. https://wiki.archlinux.org/index.php/Unofficial_user_repositories#llvm-svn
5. https://bbs.archlinux.org/viewtopic.php?id=212819

Latest Comments

kerberizer commented on 2016-08-14 20:08

[NOTICE] For those who use the binary repo and might be wondering why my key has expired: it actually had been duly extended on the day before it would expire and the new signature had been uploaded to the PGP keyservers. So, if the key shows to you as expired, you just need to refresh it in your pacman keyring, e.g. "sudo pacman-key --refresh-keys 0x76563F75679E4525".

kerberizer commented on 2016-08-11 00:39

[NOTICE] This is the updated pinned comment, a.k.a. README. If you already know the package well, you may safely ignore it.

IMPORTANT INFORMATION // PLEASE READ CAREFULLY

This is a fairly complex package. The only recommended and supported method of building is in a clean chroot as described on the Arch Wiki.[1] A crude example is also provided further below. The use of AUR helpers (yaourt, pacaur, etc.)[2] in particular is discouraged; it may or may not work for you.

* * *

Note that failing regression tests do not necessarily indicate a problem with the package. Such failures are fairly normal for an actively developed code (i.e. SVN trunk or Git master). If this happens, wait for some time before trying the build again: a few hours to a day or two at most should be enough. If you desperately need the package built right away, you may also comment out the "make check" and "make check-clang" lines or append "|| true" to them, but do this only if you really know what you're doing and why.

* * *

Pre-built, binary packages are available from two unofficial repositories:

o lordheavy's [mesa-git],[3] which may be particularly useful for those who need LLVM solely as a Mesa dependency. Note that the packages are built against the [testing] repos. lordheavy is an Arch Linux developer and trusted user (TU).

o kerberizer's [llvm-svn],[4] which is automatically rebuilt every 6 hours from this PKGBUILD and the latest SVN code. The packages are built against the [core/extra] repos. kerberizer (yours truly) is the current maintainer.

Both repos provide x86_64, i686 and multilib packages. kerberizer's repo is also PGP signed.

* * *

Those who use LLVM as a Mesa dependency may also find helpful the topic "mesa-git - latest videodrivers & issues" on the Arch Linux forums.[5]

* * *

If you need a more detailed and specific example on how to build this package in a clean chroot, a crude excerpt from the build script of the kerberizer's binary repo follows. It is meant to allow building lib32-llvm-svn too, hence why gcc-multilib is used. The code takes advantage of multiple cores when building and compressing; the example here is tailored to an 8-core/threads system. The user's ccache cache [sic] is utilised as well, so frequent rebuilds can be much faster. If you don't sign your packages, omit the lines mentioning PACKAGER and GPGKEY, otherwise they need to be set correctly. The chroot ("${x86_64_chroot}") is best set up in /tmp, but this requires a lot of RAM (most likely at least 32 GB, since /tmp is by default half the size of the physical RAM detected); second best solution is on an SSD. The latter goes for ~/.ccache as well. Note that the latest versions of systemd mount /tmp with the nosuid flag. You need to turn this flag off before building on /tmp, or else the build will fail.

$ cd /path/to/where/llvm-svn/is/cloned

$ x86_64_chroot="/chroot/x86_64"

$ sudo mkdir -p "${x86_64_chroot}/root"

$ sudo /usr/bin/mkarchroot \
-C /usr/share/devtools/pacman-multilib.conf \
-M /usr/share/devtools/makepkg-x86_64.conf \
-c /var/cache/pacman/pkg \
"${x86_64_chroot}/root" \
base-devel ccache

$ sudo /usr/bin/arch-nspawn "${x86_64_chroot}/root" /bin/bash -c "yes | pacman -Sy gcc-multilib"

$ sudo /usr/bin/arch-nspawn "${x86_64_chroot}/root" /bin/bash -c \
"echo -e \"CCACHE_DIR='/.ccache'\nXZ_DEFAULTS='--threads=8'\" >>/etc/environment ; \
sed \
-e 's/^#MAKEFLAGS=.*$/MAKEFLAGS=\"-j9\"/' \
-e '/^BUILDENV=/s/\!ccache/ccache/' \
-e 's/^#PACKAGER=.*$/PACKAGER=\"Some One <someone@somewhere.com>\"/' \
-e 's/^#GPGKEY=.*$/GPGKEY=\"0x0000000000000000\"/' \
-i /etc/makepkg.conf"

$ sudo /usr/bin/makechrootpkg -c -d ~/.ccache:/.ccache -r "${x86_64_chroot}"

It's advisable to always start this from scratch, i.e. don't reuse the old chroot, but create it anew for each build (it uses the local pacman cache, so doesn't waste bandwidth, and if located in /tmp or on an SSD, is pretty fast).

----
1. https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot
2. https://wiki.archlinux.org/index.php/AUR_helpers
3. https://wiki.archlinux.org/index.php/Unofficial_user_repositories#mesa-git
4. https://wiki.archlinux.org/index.php/Unofficial_user_repositories#llvm-svn
5. https://bbs.archlinux.org/viewtopic.php?id=212819

kerberizer commented on 2016-07-25 18:28

@okabekudo, really glad to hear it, thank you! BTW, if you don't mind using other people's binary repos, you may save further time with @lordheavy's (who's an Arch Linux dev and TU) or mine...

https://bbs.archlinux.org/viewtopic.php?id=212819

okabekudo commented on 2016-07-25 16:51

@kerberizer I actually did yep with the -c flag but I tried again. With deleting my chroot folder and all and then it successfully built! Man I'm happy. No more waiting hours for llvm-svn to update :D

kerberizer commented on 2016-07-25 00:52

@okabekudo, I'm not seeing any problems on my build box. Are you building in a clean chroot?

kerberizer commented on 2016-07-24 19:51

@okabekudo, strange, indeed. The last automated build that I run every 6 hours has passed successfully. I'll start it manually and see if there might be some change upstream that is causing the problem.

okabekudo commented on 2016-07-24 19:19

make[3]: *** No rule to make target '/build/llvm-svn/src/llvm/include/mlvm/Target/TargetOpcodes.h', needed by 'lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/R600EmitClauseMarkers.cpp.o'. Stop.
make[2]: *** [CMakeFiles/Makefile2:5004: lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
[ 79%] Built target LLVMMipsAsmParser
[ 79%] Built target LLVMMipsDesc
[ 79%] Built target LLVMMSP430CodeGen
[ 82%] Built target LLVMMipsCodeGen
[ 85%] Built target LLVMHexagonCodeGen
make[1]: *** [CMakeFiles/Makefile2:111320: docs/CMakeFiles/ocaml_doc.dir/rule] Error 2
make: *** [Makefile:22648: ocaml_doc] Error 2
==> ERROR: A failure occurred in build().
Aborting...
==> ERROR: Build failed, check /home/michel/chroot/michel/build

Getting this right now. Probably not due to the makeflags though.

kerberizer commented on 2016-07-24 17:47

@okabekudo, I think I understand what you might be refererring to: there used to be some complications with the OCaml bindings, which weren't necessarily caused by the multithreaded building, but may had been exacerbated by it. This has however been finally fixed in December, if I remember correctly. So, yes, please do test and let me know if you still find problems.

okabekudo commented on 2016-07-24 17:16

@keberizer Well in the past that means atmost 8 months ago it would break with makeflags -j. So I haven't tried since then. So that was just a generic question so far. But if you say it worked since you took over the maintainership I will test it now and report back.

kerberizer commented on 2016-07-24 17:05

@okabekudo, this package __does__ build with parallel make threads as many as 64, and as far as I can remember it has been that way ever since I took over the maintainership a year ago. I do see there used to be such problems in the past, but the last relevant comments seem to be from 2013. So, do you have a problem with the PKGBUILD __now__, or was it just a generic question? Thank you.

All comments