Hi, new to cling and trying to get it working with Jupyter in hopes of deploying for educational purposes.
versions:
latest cling/clang/LLVM built yesterday
g++ 4.9.3
Jupyter 4.1.0
Python 3.4.3
In brief, I’ve built cling several times using several different methods (clone.sh, manually, etc.) The cling executable seems to work perfectly. However, when I try code in Jupyter using the cling kernel, I get lots of error messages, and often, the kernel dies. (This is testing with code that works fine in cling.)
For example:
#include <iostream>
std::cout << "Hello, world!" << std::endl;
Gives the following error message:
[code]input_line_3:3:6: error: no type named ‘cout’ in namespace 'std’
std::cout << “Hello, world!” << std::endl;
input_line_3:3:11: error: expected unqualified-id
std::cout << "Hello, world!" << std::endl;
^[/code]
and the kernel dies.
This code:
[code]int x = 0;
x++;
x[/code]
gives correct output, but also an error message:
[code]Exception in thread Thread-4:
Traceback (most recent call last):
File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
self.run()
File "/usr/lib/python3.4/threading.py", line 868, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/cling-kernel/clingkernel.py", line 143, in publish_pipe_output
data = self._recv_dict(self.output_pipe)
File "/usr/local/lib/cling-kernel/clingkernel.py", line 131, in _recv_dict
value = os.read(pipe, len_value).decode('utf8')
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 9-10: invalid continuation byte[/code]
Any help would be appreciated!
-Christopher