Package Details: cling 0.9-5

Git Clone URL: https://aur.archlinux.org/cling.git (read-only, click to copy)
Package Base: cling
Description: Interactive C++ interpreter, built on the top of LLVM and Clang libraries
Upstream URL: https://root.cern.ch/cling
Licenses: custom:Cling Release License
Conflicts: cling
Provides: cling
Submitter: archibald869
Maintainer: archibald869
Last Packager: archibald869
Votes: 16
Popularity: 0.070609
First Submitted: 2019-08-28 11:45 (UTC)
Last Updated: 2023-07-19 09:46 (UTC)

Dependencies (9)

Required by (1)

Sources (3)

Latest Comments

« First ‹ Previous 1 2 3 4 Next › Last »

receptacular commented on 2023-02-03 04:06 (UTC)

I started getting compilation errors the other day. I fixed it by changing the LLVM and Clang Git URLs to checkout the tag cling-v0.9.

diff --unified --text PKGBUILD-orig PKGBUILD
--- PKGBUILD-orig       2023-02-02 22:45:25.786854352 -0500
+++ PKGBUILD    2023-02-02 22:34:53.209842368 -0500
@@ -16,8 +16,8 @@
     "perl: support for scan-build, ccc-analyzer and c++-analyzer"
 )
 source=(
-    "llvm::git+http://root.cern/git/llvm.git#branch=cling-patches"
-    "clang::git+http://root.cern/git/clang.git#branch=cling-patches"
+    "llvm::git+http://root.cern/git/llvm.git#tag=cling-v$pkgver"
+    "clang::git+http://root.cern/git/clang.git#tag=cling-v$pkgver"
     "cling::git+http://root.cern/git/cling.git#tag=v$pkgver"
 )
 sha256sums=(

krnlpk commented on 2021-10-25 09:09 (UTC) (edited on 2021-10-25 09:10 (UTC) by krnlpk)

The PKGBUILD keeps being broken for me, and fails with

make: Entering directory '/home/krnlpk/.cache/paru/clone/cling/src/build/tools/clang'
make: *** No targets specified and no makefile found.  Stop.
make: Leaving directory '/home/krnlpk/.cache/paru/clone/cling/src/build/tools/clang'

If I edit the PKGBUILD to use Ninja instead of Make, not only the build is noticeably speedier, but it doesn't suffer from this problem (I simply build the right targets instead of doing -C):

diff --git a/PKGBUILD b/PKGBUILD
index add937e..ebe78b8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -46,6 +46,7 @@ build() {
     cd "$srcdir/build"

     cmake \
+        -G Ninja \
         -DCMAKE_BUILD_TYPE=Release \
         -DCMAKE_INSTALL_PREFIX="/opt/cling" \
         -DLLVM_TARGETS_TO_BUILD="host;NVPTX" \
@@ -59,14 +60,14 @@ build() {
         -DFFI_INCLUDE_DIR=$(pkg-config --cflags-only-I libffi | cut -c3-) \
         "$srcdir/llvm"

-    make -C tools/clang
-    make -C tools/cling
+    ninja clang
+    ninja cling
 }

 package() {
     cd "$srcdir/build"

-    make DESTDIR="$pkgdir" install
+    env DESTDIR="$pkgdir" ninja install

     install -d "$pkgdir/usr/bin"
     ln -s "/opt/cling/bin/cling" "$pkgdir/usr/bin/cling"

archibald869 commented on 2021-10-22 18:56 (UTC)

I added the suggested patch. Can you give it another try please?

chn commented on 2021-10-07 05:47 (UTC)

It seems necessary to patch ClingTargets.cmake after installing it.

sed -i 's/IMPORTED_LOCATION_RELEASE\ \".*\/\([^\/]*\)/IMPORTED_LOCATION_RELEASE\ \"\/opt\/cling\/lib\/\1/g' "$pkgdir/opt/cling/lib/cmake/cling/ClingTargets.cmake"

Otherwise, other packages (such as xeus-cling) will try to find libraries in $srcdir other than /opt. If build cache of cling have been removed. xeus-cling will build failed.

krnlpk commented on 2021-10-01 08:48 (UTC)

The only error is make complaining about that there is no Makefile in build/tools/clang. I tried replacing make everywhere with ninja, adding -G Ninja to the cmake invocation and do

ninja clang ninja cling ... env DESTDIR="$pkgdir" ninja install

and it seems like it built without an hitch.

chn commented on 2021-10-01 08:45 (UTC)

@krnlpk build on my PC success, maybe you could check whether there is any error or warning in the output?

krnlpk commented on 2021-10-01 08:14 (UTC) (edited on 2021-10-01 08:15 (UTC) by krnlpk)

cling 0.9-2 doesn't build for me; in build() the PKGBUILD calls

make -C tools/clang
make -C tools/cling

but no Makefiles are generated inside those directories, so the build fails almost immediately.

archibald869 commented on 2021-09-29 19:07 (UTC)

Thanks for the hint! I updated the PKGBUILD as suggested. Can you please check if it works now?

chn commented on 2021-09-14 16:59 (UTC)

Using the current PKGBUILD, ClingTargets.cmake will not be packaged, which makes other packages failed to build if they have find_package(Cling REQUIRED) in their cmake file (such as xeus-cling).

Simply add install lib/cmake/cling/ClingTargets.cmake "$pkgdir/opt/cling/lib/cmake/cling" to the end of package() will resolve the problem.

I am not familiar with cmake and I could not figure out why cling does not install this file automatically. Maybe it is just a little bug?

archibald869 commented on 2021-08-13 12:11 (UTC) (edited on 2021-08-13 12:12 (UTC) by archibald869)

I just tried to build and install it in a fresh Arch environment and it succeeded without any problems. How do you build the package?