Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ 17 does not work on binder #413

Open
saraedum opened this issue Aug 15, 2021 · 10 comments
Open

C++ 17 does not work on binder #413

saraedum opened this issue Aug 15, 2021 · 10 comments

Comments

@saraedum
Copy link

saraedum commented Aug 15, 2021

I am trying to prepare a few examples on mybinder.org that use C++ 17 features. However, xeus-cling does not work for me when selecting the C++ 17 kernel on binder. Since everything works fine locally, I am not sure how to debug here.

As an example, go to the following link:

https://mybinder.org/v2/gh/flatsurf/e-antic/9cde33bfff8f24cee0c9c529ed3f8551d31eb815

With the preselected C++14 kernel everything works fine. However, changing the kernel to C++17 the interface is stuck at "Connecting to kernel":

image

Can I somehow debug why xeus-cling seems to be unhappy?

@dokempf
Copy link
Contributor

dokempf commented Sep 8, 2021

Actually, this is not Binder-related. I observe the same behaviour locally for a freshly created Conda environment (but also only for the C++17 kernel). Here is my package list:

# Name Version Build Channel _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 1_gnu conda-forge argon2-cffi 20.1.0 py38h497a2fe_2 conda-forge async_generator 1.10 py_0 conda-forge attrs 21.2.0 pyhd8ed1ab_0 conda-forge backcall 0.2.0 pyh9f0ad1d_0 conda-forge backports 1.0 py_2 conda-forge backports.functools_lru_cache 1.6.4 pyhd8ed1ab_0 conda-forge binutils_impl_linux-64 2.35.1 h27ae35d_9 binutils_linux-64 2.35.1 h454624a_30 bleach 4.1.0 pyhd8ed1ab_0 conda-forge ca-certificates 2021.5.30 ha878542_0 conda-forge cffi 1.14.6 py38ha65f79e_0 conda-forge clang_variant 1.0 cling_v0.8 conda-forge clangdev 5.0.0 h43905f9_1012 conda-forge cling 0.8 hf817b99_0 conda-forge cppzmq 4.7.1 hf7cf922_2 conda-forge debugpy 1.4.1 py38h709712a_0 conda-forge decorator 5.0.9 pyhd8ed1ab_0 conda-forge defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge entrypoints 0.3 pyhd8ed1ab_1003 conda-forge gcc_impl_linux-64 9.3.0 h6df7d76_17 gcc_linux-64 9.3.0 h1ee779e_30 gxx_impl_linux-64 9.3.0 hbdd7822_17 gxx_linux-64 9.3.0 h7e70986_30 importlib-metadata 4.8.1 py38h578d9bd_0 conda-forge ipykernel 6.3.1 py38he5a9106_0 conda-forge ipython 7.27.0 py38he5a9106_0 conda-forge ipython_genutils 0.2.0 py_1 conda-forge jedi 0.18.0 py38h578d9bd_2 conda-forge jinja2 3.0.1 pyhd8ed1ab_0 conda-forge jsonschema 3.2.0 pyhd8ed1ab_3 conda-forge jupyter_client 7.0.2 pyhd8ed1ab_0 conda-forge jupyter_core 4.7.1 py38h578d9bd_0 conda-forge jupyterlab_pygments 0.1.2 pyh9f0ad1d_0 conda-forge kernel-headers_linux-64 2.6.32 he073ed8_14 conda-forge ld_impl_linux-64 2.35.1 h7274673_9 libffi 3.3 h58526e2_2 conda-forge libgcc-devel_linux-64 9.3.0 hb95220a_17 libgcc-ng 11.1.0 hc902ee8_8 conda-forge libgomp 11.1.0 hc902ee8_8 conda-forge libsodium 1.0.18 h36c2ea0_1 conda-forge libstdcxx-devel_linux-64 9.3.0 hf0c5c8d_17 libstdcxx-ng 11.1.0 h56837e0_8 conda-forge libuuid 2.32.1 h7f98852_1000 conda-forge markupsafe 2.0.1 py38h497a2fe_0 conda-forge matplotlib-inline 0.1.3 pyhd8ed1ab_0 conda-forge mistune 0.8.4 py38h497a2fe_1004 conda-forge nbclient 0.5.4 pyhd8ed1ab_0 conda-forge nbconvert 6.1.0 py38h578d9bd_0 conda-forge nbformat 5.1.3 pyhd8ed1ab_0 conda-forge ncurses 6.2 h58526e2_4 conda-forge nest-asyncio 1.5.1 pyhd8ed1ab_0 conda-forge nlohmann_json 3.9.1 h9c3ff4c_1 conda-forge notebook 6.4.3 pyha770c72_0 conda-forge openssl 1.1.1l h7f98852_0 conda-forge packaging 21.0 pyhd8ed1ab_0 conda-forge pandoc 2.14.2 h7f98852_0 conda-forge pandocfilters 1.4.2 py_1 conda-forge parso 0.8.2 pyhd8ed1ab_0 conda-forge pexpect 4.8.0 pyh9f0ad1d_2 conda-forge pickleshare 0.7.5 py_1003 conda-forge pip 21.2.4 pyhd8ed1ab_0 conda-forge prometheus_client 0.11.0 pyhd8ed1ab_0 conda-forge prompt-toolkit 3.0.20 pyha770c72_0 conda-forge ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge pugixml 1.11.4 h9c3ff4c_0 conda-forge pycparser 2.20 pyh9f0ad1d_2 conda-forge pygments 2.10.0 pyhd8ed1ab_0 conda-forge pyparsing 2.4.7 pyh9f0ad1d_0 conda-forge pyrsistent 0.17.3 py38h497a2fe_2 conda-forge python 3.8.10 h49503c6_1_cpython conda-forge python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python_abi 3.8 2_cp38 conda-forge pyzmq 22.2.1 py38h2035c66_0 conda-forge readline 8.1 h46c0cb4_0 conda-forge send2trash 1.8.0 pyhd8ed1ab_0 conda-forge setuptools 58.0.3 py38h578d9bd_0 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge sqlite 3.36.0 h9cd32fc_0 conda-forge sysroot_linux-64 2.12 he073ed8_14 conda-forge terminado 0.12.0 py38h578d9bd_0 conda-forge testpath 0.5.0 pyhd8ed1ab_0 conda-forge tk 8.6.11 h27826a3_1 conda-forge tornado 6.1 py38h497a2fe_1 conda-forge traitlets 5.1.0 pyhd8ed1ab_0 conda-forge wcwidth 0.2.5 pyh9f0ad1d_2 conda-forge webencodings 0.5.1 py_1 conda-forge wheel 0.37.0 pyhd8ed1ab_1 conda-forge xeus 1.0.4 h7d0c39e_0 conda-forge xeus-cling 0.12.1 h560cc44_0 conda-forge xtl 0.7.2 h4bd325d_1 conda-forge xz 5.2.5 h516909a_1 conda-forge zeromq 4.3.4 h9c3ff4c_1 conda-forge zipp 3.5.0 pyhd8ed1ab_0 conda-forge zlib 1.2.11 h516909a_1010 conda-forge

@nthiery
Copy link
Contributor

nthiery commented Sep 14, 2021

I encountered the same problem, though with some variations. Whether the kernel crashes
seems to depend not only on the conda environment but on the underlying OS/hardware???.
We have some computers in our computer lab where this happens, others not. All under
Linux Mint; can't recall from the top of my head whether it's the same version though.
I also get glibc incompatibilities issues.

I can try to dig and record more detailed information; all this happened in lab sessions, so
with little time to take notes :-)

@SylvainCorlay
Copy link
Member

I am working on release a new stack based on cling 0.9 which may improve the situation.

(Unfortunately, that involves providing new variants of llvm and clang on conda-forge, hence the delay).

@EmmanuelDgz
Copy link

Facing same issue on a clean installation.

@srpgilles
Copy link

srpgilles commented Sep 19, 2022

In fact, this seems to be not limited to the C++ 17 kernel. I tried using notebooks I did years ago on Binder and none of the C++ kernels seems so start properly; I have then tried the Binder link provided here in the README here... and got exactly the same result.

It might be related to the underlying hardware as @nthiery pointed out, but in this case I was really unlucky because I had the issue both with GESIS and OVH.

@nthiery
Copy link
Contributor

nthiery commented Sep 19, 2022

For the record: I managed to get C++17 to work (but not C++11 or C++14) consistently
by forcing gcc=9.4.0. Presumably it was not OS related after all, but just some other
discrepancy in the student setup.

Looking forward the new release! Thanks @SylvainCorlay

@srpgilles
Copy link

Thanks @nthiery, you're right by forcing the gcc version it seems to work just fine.

@YarelisAcevedo
Copy link

@nthiery How do I force the gcc version?

@srpgilles
Copy link

@YarelisAcevedo In your environment.yml file.

@YarelisAcevedo
Copy link

Thanks! @srpgilles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants