Package Details: llvm-ocaml-svn 4.0.0svn_r282637-1

Git Clone URL: https://aur.archlinux.org/llvm-svn.git (read-only)
Package Base: llvm-svn
Description: OCaml bindings for LLVM
Upstream URL: http://llvm.org/
Keywords: clang llvm
Licenses: custom:University of Illinois
Conflicts: llvm-ocaml
Provides: llvm-ocaml
Replaces: llvm-ocaml
Submitter: None
Maintainer: kerberizer
Last Packager: kerberizer
Votes: 72
Popularity: 2.523833
First Submitted: 2007-08-02 07:15
Last Updated: 2016-09-28 22:55

Dependencies (10)

Required by (0)

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

farseerfc commented on 2016-09-29 03:30

@kerberizer thanks for fixing this

kerberizer commented on 2016-09-28 23:12

[NOTICE] The bug with the OCaml documentation path has been fixed. Thanks again to @farseerfc for reporting this.

If you install the llvm-ocaml-svn package, please have in mind that the HTML documentation now resides in a different place:

old: /usr/share/doc/ocaml/html/
new: /usr/share/doc/llvm/ocaml-html/

On an unrelated note, if anyone is building these packages on i686 (32-bit), I've disabled the LLVM regression tests on that architecture, as they seem to fail often and I'm not quite sure if even upstream cares that much about fixing them. The packages still build fine, and if you'd like so, you may enable the tests by editing the PKGBUILD. Again, this applies only to i686 (32-bit). For x86_64 (64-bit), which I suppose most and likely all of you use, there is no change. Also, this doesn't affect the lib32 compat packages at all.

kerberizer commented on 2016-09-28 18:05

@farseerfc, there's indeed a problem. Guess something changed upstream; I'll see to get it fixed. Thanks for reporting it!

farseerfc commented on 2016-09-28 17:57

build with an error in these 2 days:
mv: cannot stat '/build/llvm-svn/pkg/llvm-svn/usr/share/doc/ocaml': No such file or directory
==> ERROR: A failure occurred in package_llvm-svn().
Aborting...
==> ERROR: Build failed, check /var/lib/archbuild/extra-x86_64/farseerfc/build
How can I fix this problem?

kerberizer commented on 2016-09-05 18:32

[NOTICE] TL;DR: The regression tests should pass fine now.

The problem which @electricprism was facing (and likely everyone else) persists for several days already. Unfortunately, I don't have the time to search for the root cause, but it's a simple matter of ld.so not finding the built shared lib when loading the test, so I've committed a simple fix which sets LD_LIBRARY_PATH appropriately while running "make check".

kerberizer commented on 2016-09-04 04:10

@electricprism, please see the pinned comment.

electricprism commented on 2016-09-04 04:06

http://pastebin.com/pfmd4f0P

6 errors, exiting.
make[3]: *** [test/CMakeFiles/check-llvm.dir/build.make:58: test/CMakeFiles/check-llvm] Error 2
make[2]: *** [CMakeFiles/Makefile2:88672: test/CMakeFiles/check-llvm.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:68845: test/CMakeFiles/check.dir/rule] Error 2
make: *** [Makefile:16694: check] Error 2
==> ERROR: A failure occurred in check().
Aborting...
==> ERROR: Makepkg was unable to build llvm-svn.

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

All comments