Skip to content

libclingJupyter.so didn't created using build instructions #537

@orhosko

Description

@orhosko

After using these commands, cling works as expected.

git clone https://github.com/root-project/llvm-project.git
cd llvm-project
git checkout cling-latest
cd ..
git clone https://github.com/root-project/cling.git
mkdir cling-build && cd cling-build
cmake -DLLVM_EXTERNAL_PROJECTS=cling -DLLVM_EXTERNAL_CLING_SOURCE_DIR=../cling/ -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_TARGETS_TO_BUILD="host;NVPTX" -DCMAKE_BUILD_TYPE=Release ../llvm-project/llvm
cmake --build . --target clang
cmake --build . --target cling

However when I run these instructions for Jupyter support

export PATH=/cling-install-prefix/bin:$PATH
cd /cling-install-prefix/share/cling/Jupyter/kernel

pip install -e .
jupyter-kernelspec install --user cling-cpp17
jupyter-kernelspec install --user cling-cpp1z
jupyter-kernelspec install --user cling-cpp14
jupyter-kernelspec install --user cling-cpp11

I got kernel inside Jupyter but it dies immediately. As far as i understood, the earlier issues solved with an update and there is no similar problems. Here is the error:

    raise RuntimeError('Cannot find ' + clingInstDir + '/lib/libclingJupyter.{so,dylib,dll}')
RuntimeError: Cannot find /home/xxx/Documents/projects/cling/cling-build/lib/libclingJupyter.{so,dylib,dll}

It seemes like the file doesn't even created in .../cling-build/lib/. So, I don't think it's about not finding the file. When I ran make command inside .../cling-build/tools/cling/tools/Jupyter, it solved the issue. Now, I have .../cling-build/lib/libclingJupyter.so and works fine.

I didn't get any error while linking and my consecutive runs didn't changed anything. Maybe important point, I learnt that I need to run first after my first error cmake --build . --target clang. However, I also ran cmake --build . --target cling afterwards so I don't think this is the issue.

I'm on fedora 40 and ran soft linked directory from another drive if it helps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions