Open Waerden001 opened 3 years ago
Me too! C++17 fails on Mac Catalina after clean install of JupyterLab and Xeus-cling, when opening a notebook that was developed under xeus-cling C++17 and worked perfectly before. The error messages are different from above:
[I 2021-09-02 13:26:09.482 ServerApp] Kernel started: 8860c126-6a11-4d15-a379-8e82353c58ab
In file included from input_line_1:1:
/Users/mark/opt/miniconda3/envs/XEUS/include/c++/v1/new:235:33: error: too many arguments to function call, expected 1, have 2
return __builtin_operator_new(__args...);
~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~
/Users/mark/opt/miniconda3/envs/XEUS/include/c++/v1/new:256:12: note: in instantiation of function template specialization 'std::__1::__libcpp_operator_new<unsigned long, std::align_val_t>' requested
here
return __libcpp_operator_new(__size, __align_val);
^
/Users/mark/opt/miniconda3/envs/XEUS/include/c++/v1/new:245:29: error: too many arguments to function call, expected 1, have 2
__builtin_operator_delete(__args...);
~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~
/Users/mark/opt/miniconda3/envs/XEUS/include/c++/v1/new:297:14: note: in instantiation of function template specialization 'std::__1::__libcpp_operator_delete<void *, std::align_val_t>' requested here
return __libcpp_operator_delete(__ptr, __align_val);
^
[I 2021-09-02 13:26:15.484 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (1/5), keep random ports
In file included from input_line_1:1:
/Users/mark/opt/miniconda3/envs/XEUS/include/c++/v1/new:235:33: error: too many arguments to function call, expected 1, have 2
return __builtin_operator_new(__args...);
~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~
/Users/mark/opt/miniconda3/envs/XEUS/include/c++/v1/new:256:12: note: in instantiation of function template specialization 'std::__1::__libcpp_operator_new<unsigned long, std::align_val_t>' requested
here
return __libcpp_operator_new(__size, __align_val);
^
/Users/mark/opt/miniconda3/envs/XEUS/include/c++/v1/new:245:29: error: too many arguments to function call, expected 1, have 2
__builtin_operator_delete(__args...);
~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~
/Users/mark/opt/miniconda3/envs/XEUS/include/c++/v1/new:297:14: note: in instantiation of function template specialization 'std::__1::__libcpp_operator_delete<void *, std::align_val_t>' requested here
return __libcpp_operator_delete(__ptr, __align_val);
^
[I 2021-09-02 13:26:18.490 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (2/5), keep random ports
In file included from input_line_1:1:
/Users/mark/opt/miniconda3/envs/XEUS/include/c++/v1/new:235:33: error: too many arguments to function call, expected 1, have 2
return __builtin_operator_new(__args...);
~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~
/Users/mark/opt/miniconda3/envs/XEUS/include/c++/v1/new:256:12: note: in instantiation of function template specialization 'std::__1::__libcpp_operator_new<unsigned long, std::align_val_t>' requested
here
return __libcpp_operator_new(__size, __align_val);
^
/Users/mark/opt/miniconda3/envs/XEUS/include/c++/v1/new:245:29: error: too many arguments to function call, expected 1, have 2
__builtin_operator_delete(__args...);
~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~
/Users/mark/opt/miniconda3/envs/XEUS/include/c++/v1/new:297:14: note: in instantiation of function template specialization 'std::__1::__libcpp_operator_delete<void *, std::align_val_t>' requested here
return __libcpp_operator_delete(__ptr, __align_val);
^
/Users/mark/opt/miniconda3/envs/XEUS/lib/python3.9/json/encoder.py:257: UserWarning: date_default is deprecated since jupyter_client 7.0.0. Use jupyter_client.jsonutil.json_default.
return _iterencode(o, 0)
[I 2021-09-02 13:26:21.499 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (3/5), keep random ports
In file included from input_line_1:1:
/Users/mark/opt/miniconda3/envs/XEUS/include/c++/v1/new:235:33: error: too many arguments to function call, expected 1, have 2
return __builtin_operator_new(__args...);
~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~
/Users/mark/opt/miniconda3/envs/XEUS/include/c++/v1/new:256:12: note: in instantiation of function template specialization 'std::__1::__libcpp_operator_new<unsigned long, std::align_val_t>' requested
here
return __libcpp_operator_new(__size, __align_val);
^
/Users/mark/opt/miniconda3/envs/XEUS/include/c++/v1/new:245:29: error: too many arguments to function call, expected 1, have 2
__builtin_operator_delete(__args...);
~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~
/Users/mark/opt/miniconda3/envs/XEUS/include/c++/v1/new:297:14: note: in instantiation of function template specialization 'std::__1::__libcpp_operator_delete<void *, std::align_val_t>' requested here
return __libcpp_operator_delete(__ptr, __align_val);
I installed xeus-cling as described by @Waerden001 above under Ubuntu Linux 20.4. I am facing the same issues except that
jupyter console --kernel xcpp17
just hangs forever. No error messages.
I encountered the same problem on Manjaro Linux. Solved by installing older version of xeus-cling:
conda install xeus-cling==0.9.0 -c conda-forge
This version works with C++17 fine.
In my case the console does start, but fails as follows:
dimitry@laptop:~/tmp$ jupyter console --kernel xcpp17
Jupyter console 6.4.0
__ _____ _ _ ___
\ \/ / _ \ | | / __|
> < __/ |_| \__ \
/_/\_\___|\__,_|___/
xeus-cling: a Jupyter Kernel C++ - based on cling
C++17
In [1]: #include <string>/home/dimitry/.local/lib/python3.9/site-packages/jupyter_console/ptshell.py:852: RuntimeWarning: coroutine 'ZMQSocketChannel.msg_ready' was never awaited
while self.client.iopub_channel.msg_ready():
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Unhandled exception in event loop:
File "/usr/lib/python3.9/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/home/dimitry/.local/lib/python3.9/site-packages/prompt_toolkit/input/vt100.py", line 168, in callback_wrapper
callback()
File "/home/dimitry/.local/lib/python3.9/site-packages/prompt_toolkit/application/application.py", line 691, in read_from_input
self.key_processor.process_keys()
File "/home/dimitry/.local/lib/python3.9/site-packages/prompt_toolkit/key_binding/key_processor.py", line 274, in process_keys
self._process_coroutine.send(key_press)
File "/home/dimitry/.local/lib/python3.9/site-packages/prompt_toolkit/key_binding/key_processor.py", line 186, in _process
self._call_handler(matches[-1], key_sequence=buffer[:])
File "/home/dimitry/.local/lib/python3.9/site-packages/prompt_toolkit/key_binding/key_processor.py", line 329, in _call_handler
handler.call(event)
File "/home/dimitry/.local/lib/python3.9/site-packages/prompt_toolkit/key_binding/key_bindings.py", line 102, in call
result = self.handler(event)
File "/home/dimitry/.local/lib/python3.9/site-packages/jupyter_console/ptshell.py", line 475, in _
self.handle_iopub()
File "/home/dimitry/.local/lib/python3.9/site-packages/jupyter_console/ptshell.py", line 854, in handle_iopub
msg_type = sub_msg['header']['msg_type']
Exception 'coroutine' object is not subscriptable
Press ENTER to continue...
NB: I've built a Debian package for xeus-cling, which is accessible here.
The same type of problem occurs here. First, I installed jupyter before installing xeus in my conda environment. Then, I installed xeus in this environment. It is all fine except for c++ 17 Kernel. It just keeps restarting until the fifth time, then it fails. My OS is pop-os 20.04.
same issue with wsl ubuntu + jupyter notebook (on windows installation its fine)
As mentioned above, installing older version of xeus-cling (to 0.9) seems to solve the problem.
@petyrj that's not really a solution, but rather a workaround.
Anyone coming around where this happened the last ~1 month: pin the stdcxx
library.
conda install xeus-cling \
libstdcxx-devel_linux-64==9.4.0 \
libgcc-devel_linux-64==9.4.0 \
-c conda-forge
Symptom was:
Warning in cling::IncrementalParser::CheckABICompatibility():
Possible C++ standard library mismatch, compiled with __GLIBCXX__ '20210601'
Extraction of runtime standard library version was: '20220527'
and the automatically installed version from conda was 9.5.0. C++11 seemed to work, but C++14 and C++17 were broken.
Whew, glad to see I am not the only person dealing with this issue! Has there been any resolution or update?
@mariop64 it seems to be working for me now:
Although, I am not using Conda, but installed .deb packages from this PPA:
so
Install xeus-cling in a clean conda enviroment xcpp11 and xcpp14 works fine with jupyter console, however xcpp17 doesn't work. To reproduce the issue
Then run jupyter console with xeus-cling kernels
and
work as expected. However
gives error information
I wonder if there's any way to fix this?