diff options
author | Luchesar V. ILIEV | 2015-12-13 12:48:26 +0200 |
---|---|---|
committer | Luchesar V. ILIEV | 2015-12-13 14:34:31 +0200 |
commit | 08e8f59872f610ce616b8adc83e8103b8db1ed24 (patch) | |
tree | d175e22f2f0688057e67a8ee6fc02200937dc243 /PKGBUILD | |
parent | d45aa18b828029b3cd8ff696603ceb3fd6d9d230 (diff) | |
download | aur-08e8f59872f610ce616b8adc83e8103b8db1ed24.tar.gz |
Update the incompatible OCaml bindings check
It turns out that even same version bindings can cause problems,
so assume any installed system-wide bindings as incompatible.
Also, check earlier so users don't waste time unnecessarily.
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 23 |
1 files changed, 14 insertions, 9 deletions
@@ -117,6 +117,20 @@ pkgver() { prepare() { cd "${srcdir}/${_pkgname}" + # Building with any already installed on the system LLVM OCaml bindings is very error-prone. + # The problems almost certainly arise from incompatibilities between the installed system-wide + # bindings and the newly built ones. Unfortunately, the OCAMLPATH environment variable doesn't + # allow overriding the search path set in the system configuration file, only adding to it. + # Even same version bindings cause problems in certain circumstances, so let's play safe. + ocamlfind query llvm >/dev/null 2>&1 && { + error 'Incompatible LLVM OCaml bindings installed.' + plain 'Building with already installed on the system LLVM OCaml bindings is not supported.' + plain 'Please either uninstall any currently installed llvm-ocaml* package before building,' + plain 'or, __preferably__, build in a clean chroot, as described on the Arch Linux wiki:' + plain 'https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot' + exit 1 + } + svn export --force "${srcdir}/clang" tools/clang svn export --force "${srcdir}/clang-tools-extra" tools/clang/tools/extra svn export --force "${srcdir}/compiler-rt" projects/compiler-rt @@ -156,15 +170,6 @@ build() { "../${_pkgname}" # Must run this target independently, or else docs/cmake_install.cmake will fail. - # Also, we must check that there isn't an incompatible llvm-ocaml package installed, - # or else the build will fail with "inconsistent assumptions over interface" errors. - [[ $(ocamlfind query -format %v llvm 2>/dev/null | tr - _) =~ (${pkgver}|^$) ]] || { - error 'Incompatible LLVM OCaml bindings installed.' - plain 'Please either uninstall any currently installed llvm-ocaml* package before building,' - plain 'or, __preferably__, build in a clean chroot, as described on the Arch Linux wiki:' - plain 'https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot' - exit 1 - } make ocaml_doc make |