Package Details: xeus-cling 0.15.3-4

Git Clone URL: https://aur.archlinux.org/xeus-cling.git (read-only, click to copy)
Package Base: xeus-cling
Description: A C++ jupyter kernel based on xeus and cling
Upstream URL: https://github.com/jupyter-xeus/xeus-cling
Licenses: BSD-3-Clause
Submitter: sgsaenger
Maintainer: carlosal1015 (kaelingre)
Last Packager: kaelingre
Votes: 4
Popularity: 0.000106
First Submitted: 2020-09-23 16:30 (UTC)
Last Updated: 2024-05-06 12:28 (UTC)

Latest Comments

« First ‹ Previous 1 2 3 Next › Last »

carlosal1015 commented on 2023-05-19 17:38 (UTC)

Very many thanks @kaelingre. The package is now up to date.

kaelingre commented on 2023-02-01 18:47 (UTC)

I managed to build 0.15.0. PKGBUILD:

# Maintainer: Sebastian Gsänger <sebastian_gsaenger@web.de>
# Maintainer: chn <g897331845@gmail.com>

pkgname=xeus-cling
pkgver=0.15.0
pkgrel=1
pkgdesc="A C++ jupyter kernel based on xeus and cling"
arch=('x86_64')
url="https://github.com/jupyter-xeus/xeus-cling"
license=('BSD')
depends=('xtl' 'xproperty' 'xeus' 'nlohmann-json'
         'jupyter-notebook' 'jupyter-widgetsnbextension'
         'cling' 'pugixml' 'argparse' 'xeus-zmq')
makedepends=('cmake' 'cppzmq')
source=("https://github.com/jupyter-xeus/$pkgname/archive/$pkgver.tar.gz"
        "0001-Rename-kernels.patch"
        "0002-Use-llvm-from-cling.patch"
        "0003-put-config-file-at-etc.patch")
md5sums=('67c3c4d2fbf2d131736d28e7f5a5c0a8'
         'e03c81c3701e4f0dea249955051c2ddf'
         '4b0544ce3074ec327fb764820cfff53f'
         'fb1bf5fdaa53af1c010b9da9d29f63b6')

prepare() {
    cd "$pkgname-$pkgver"

    local src
    for src in "${source[@]}"; do
        src="${src%%::*}"
        src="${src##*/}"
        [[ $src = *.patch ]] || continue
        echo "Applying patch $src..."
        patch -Np1 < "../$src"
    done
}

build() {

    if [ -z $CPLUS_INCLUDE_PATH ]
    then
        export CPLUS_INCLUDE_PATH=/opt/cling/include
    else
        export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/opt/cling/include
    fi

    cd "$pkgname-$pkgver"
    mkdir -p build
    cd build

    cmake \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_BUILD_TYPE=Release \
        -DClang_DIR=/opt/cling/lib/cmake/clang \
        ..

    cmake --build .
}

package() {
    cd "$pkgname-$pkgver"

    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

    cd "build"

    DESTDIR="$pkgdir" cmake --build . -t install
}

Updated 0002-Use-llvm-from-cling.patch

--- xeus-cling-0.15.0/CMakeLists.txt    2023-01-30 21:26:07.000000000 +0100
+++ xeus-cling-0.15.0-fixed/CMakeLists.txt  2023-02-01 18:35:36.914901732 +0100
@@ -50,59 +50,6 @@
     "${CMAKE_CURRENT_SOURCE_DIR}/share/jupyter/kernels/xcpp17/kernel.json"
 )

-#######################
-# Rely on llvm-config #
-#######################
-
-set(CONFIG_OUTPUT)
-find_program(LLVM_CONFIG "llvm-config")
-if(LLVM_CONFIG)
-    message(STATUS "Found LLVM_CONFIG as ${LLVM_CONFIG}")
-    set(CONFIG_COMMAND ${LLVM_CONFIG}
-        "--assertion-mode"
-        "--bindir"
-        "--libdir"
-        "--includedir"
-        "--prefix"
-        "--src-root")
-    execute_process(COMMAND ${CONFIG_COMMAND}
-                    RESULT_VARIABLE HAD_ERROR
-                    OUTPUT_VARIABLE CONFIG_OUTPUT)
-    if(NOT HAD_ERROR)
-        string(REGEX REPLACE
-               "[ \t]*[\r\n]+[ \t]*" ";"
-               CONFIG_OUTPUT ${CONFIG_OUTPUT})
-    else()
-        string(REPLACE ";" " " CONFIG_COMMAND_STR "${CONFIG_COMMAND}")
-        message(STATUS "${CONFIG_COMMAND_STR}")
-        message(FATAL_ERROR "llvm-config failed with status ${HAD_ERROR}")
-    endif()
-else()
-    message(FATAL_ERROR "llvm-config not found -- ${LLVM_CONFIG}")
-endif()
-
-list(GET CONFIG_OUTPUT 0 ENABLE_ASSERTIONS)
-list(GET CONFIG_OUTPUT 1 TOOLS_BINARY_DIR)
-list(GET CONFIG_OUTPUT 2 LIBRARY_DIR)
-list(GET CONFIG_OUTPUT 3 INCLUDE_DIR)
-list(GET CONFIG_OUTPUT 4 LLVM_OBJ_ROOT)
-list(GET CONFIG_OUTPUT 5 MAIN_SRC_DIR)
-
-if(NOT MSVC_IDE)
-    set(LLVM_ENABLE_ASSERTIONS ${ENABLE_ASSERTIONS} CACHE BOOL "Enable assertions")
-    mark_as_advanced(LLVM_ENABLE_ASSERTIONS)
-endif()
-
-set(LLVM_TOOLS_BINARY_DIR ${TOOLS_BINARY_DIR} CACHE PATH "Path to llvm/bin")
-set(LLVM_LIBRARY_DIR ${LIBRARY_DIR} CACHE PATH "Path to llvm/lib")
-set(LLVM_MAIN_INCLUDE_DIR ${INCLUDE_DIR} CACHE PATH "Path to llvm/include")
-set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree")
-set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")
-
-include_directories(${LLVM_MAIN_INCLUDE_DIR})
-link_directories(${LLVM_LIBRARY_DIR})
-add_definitions(-DLLVM_DIR="${LLVM_BINARY_DIR}")
-
 ################
 # Dependencies #
 ################
@@ -112,8 +59,10 @@
 find_package(xeus-zmq ${xeus-zmq_REQUIRED_VERSION} REQUIRED)
 find_package(pugixml REQUIRED)

-find_package(Clang REQUIRED)
 find_package(Cling REQUIRED)
+find_package(Clang REQUIRED)
+find_package(LLVM REQUIRED)
+add_definitions(-DLLVM_DIR="${LLVM_INSTALL_PREFIX}")
 find_package(argparse REQUIRED)

 #########
@@ -219,6 +168,7 @@

 target_include_directories(xeus-cling
                            PUBLIC
+                          $<BUILD_INTERFACE:${LLVM_INCLUDE_DIR}>
                            $<BUILD_INTERFACE:${XEUS_CLING_INCLUDE_DIR}>
                            $<INSTALL_INTERFACE:include>)
 target_link_libraries(xeus-cling PUBLIC clingInterpreter clingMetaProcessor clingUtils xeus-zmq pugixml argparse::argparse)

Patch 0004 is no longer needed.

Edorion commented on 2023-01-31 14:19 (UTC)

Any updates on 0.15.0 ? 0.13.0 crashes even with @Manifolds patch:

/home/NAME/Downloads/xeus-cling/src/xeus-cling-0.13.0/src/xmagics/executable.cpp:214:55: error: cannot convert ‘llvm::SmallVector<llvm::StringRef, 16>’ to ‘const char**’
  214 |         int ret = llvm::sys::ExecuteAndWait(Compiler, Args, llvm::NoneType::None,
      |                                                       ^~~~
      |                                                       |

Manifolds commented on 2022-05-14 14:57 (UTC)

PATCH

--- xeus-cling-0.13.0.orig/src/xoptions.cpp
+++ xeus-cling-0.13.0/src/xoptions.cpp
12a13
> #include <iterator>

carlosal1015 commented on 2022-04-03 15:24 (UTC)

Hi, now jupyter is replaced by jupyter-notebook.

carlosal1015 commented on 2021-10-12 00:30 (UTC)

Indeed, I can confirm the issue report by @Ayaka, and resolve it with @kaelingre's suggestion below.

kaelingre commented on 2021-10-08 08:01 (UTC)

@Ayaka: I had a similar problem. It is because (intermediate) build files of cling are needed, which are often deleted once the package has been built (e.g. when using yay). A workaround is to rebuild cling and make sure the folder '/build/cling/src/build', in your case, is not deleted. (E.g. run 'makepkg' in '/build/cling')

Ayaka commented on 2021-10-08 06:31 (UTC)

make[2]: *** No rule to make target '/build/cling/src/build/lib/libclingInterpreter.a', needed by 'libxeus-cling.so.0.13.0'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:88: CMakeFiles/xeus-cling.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

okasha commented on 2021-09-16 19:57 (UTC)

xeus needs to be updated to version 2.0.0

okasha commented on 2021-09-16 19:30 (UTC) (edited on 2021-09-16 19:31 (UTC) by okasha)

/home/okasha/.cache/yay/xeus-cling/src/xeus-cling-0.13.0/src/main.cpp: In function ‘int main(int, char**)’:
/home/okasha/.cache/yay/xeus-cling/src/xeus-cling-0.13.0/src/main.cpp:95:26: error: ‘make_context’ is not a member of ‘xeus’
   95 |     auto context = xeus::make_context<zmq::context_t>();
      |                          ^~~~~~~~~~~~
/home/okasha/.cache/yay/xeus-cling/src/xeus-cling-0.13.0/src/main.cpp:95:53: error: expected primary-expression before ‘>’ token
   95 |     auto context = xeus::make_context<zmq::context_t>();
      |                                                     ^
/home/okasha/.cache/yay/xeus-cling/src/xeus-cling-0.13.0/src/main.cpp:95:55: error: expected primary-expression before ‘)’ token
   95 |     auto context = xeus::make_context<zmq::context_t>();
      |                                                       ^
/home/okasha/.cache/yay/xeus-cling/src/xeus-cling-0.13.0/src/main.cpp:105:36: error: ‘make_xserver_zmq’ is not a member of ‘xeus’; did you mean ‘make_xserver’?
  105 |                              xeus::make_xserver_zmq);
      |                                    ^~~~~~~~~~~~~~~~
      |                                    make_xserver
/home/okasha/.cache/yay/xeus-cling/src/xeus-cling-0.13.0/src/main.cpp:120:36: error: ‘make_xserver_zmq’ is not a member of ‘xeus’; did you mean ‘make_xserver’?
  120 |                              xeus::make_xserver_zmq);
      |                                    ^~~~~~~~~~~~~~~~
      |                                    make_xserver
make[2]: *** [CMakeFiles/xcpp.dir/build.make:76: CMakeFiles/xcpp.dir/src/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:114: CMakeFiles/xcpp.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
FAIL: 4