Open xdevs-tmp opened 1 year ago
@SylvainCorlay, what may be the possible root cause for the "Segmentation fault" issue for 14 and 17?
(cling) jovyan@b03a2d5b6e2d:~/work$ /opt/conda/envs/cling/bin/xcpp -std=c++17 Warning in cling::IncrementalParser::CheckABICompatibility(): Possible C++ standard library mismatch, compiled with GLIBCXX '20210601' Extraction of runtime standard library version was: '20220527' Segmentation fault <---------------
(cling) jovyan@b03a2d5b6e2d:~/work$ /opt/conda/envs/cling/bin/xcpp -std=c++14 Warning in cling::IncrementalParser::CheckABICompatibility(): Possible C++ standard library mismatch, compiled with GLIBCXX '20210601' Extraction of runtime standard library version was: '20220527' Segmentation fault <---------------
(cling) jovyan@b03a2d5b6e2d:~/work$ /opt/conda/envs/cling/bin/xcpp -std=c++11
Warning in cling::IncrementalParser::CheckABICompatibility():
Possible C++ standard library mismatch, compiled with GLIBCXX '20210601'
Extraction of runtime standard library version was: '20220527'
Starting xeus-cling kernel...
If you want to connect to this kernel from an other client, just copy and paste the following content inside of a kernel.json
file. And then run for example:
kernel.json
{
"transport": "tcp",
"ip": "127.0.0.1",
"control_port": 64891,
"shell_port": 61218,
"stdin_port": 54142,
"iopub_port": 56446,
"hb_port": 50707,
"signature_scheme": "hmac-sha256",
"key": "060d50a125674bf7b729ea07ff6caa6a"
}
Run with XEUS 2.4.1
I have no way to find why 14 & 17 are not working? Is that 14 and 17 c++ libs are missing?
Having exactly the same issue with xeus-cling 0.13.0 on Ubuntu 22.04 with linux-aarch64, but the same version works with linux-x86_64 using exactly the same configurations.
I ran xcpp -std=c++14
and xcpp -std=c++17
inside gdb
and found that segmentation fault occurs in
clang::CXXRecordDecl::getLambdaCallOperator() const () from /usr/local/miniforge/lib/libxeus-cling.so.0
.
This was using xeus-cling
0.13.0 installed with miniforge
.
Hope this helps in isolating the issue.
I got the same issue on ubuntu 22.04 ARM64. I have a work around by the following command:
conda create -n cling "python>=3.9" jupyterlab xeus-cling gcc_linux-aarch64=9.3.0 -c conda-forge
After run this command, all of the c++ kernels can run in jupyter.
I got this workaround from this link and change a little bit for ARM64 ubuntu: https://gitlab.inria.fr/formations/cpp/gettingstartedwithmoderncpp/-/issues/26
@davidxzfei Thanks for the hint! Downgrading to gcc_linux-aarch64=9.3.0 seems to be the key. gcc 9.4.0
also worked for me, but I did not try newer versions.
I tried to install xeus-cling in a jupyter/datascience-notebook container and here is the commands i used:
I can see the C++11, C++14, C++17 showing in the Launcher, and i also found xcpp14,17 in the kernel dir: cat /opt/conda/envs/cling/share/jupyter/kernels/xcpp14/kernel.json
I tried to run:
/opt/conda/envs/cling/bin/xcpp -std=c++14
It outputs:but C++11 working:
/opt/conda/envs/cling/bin/xcpp -std=c++11
It outputs:
I guess 11 is working, because of the global cpp? (base) jovyan@xx:~$ which cpp /usr/bin/cpp