Problem with tab completion

I use an interface to Jupyter notebooks in my IDE (the Hydrogen [2.6.0] package in Atom [1.30.0]). When working inside this notebook, after importing ROOT, I get an error if I type more than two adjacent characters. That is, tg is fine.

tg yu er bg io
fg aw
df

is also fine. But tgi produces an error:

IncrementalExecutor::executeFunction: symbol '_ZN7TTabComC1Ev' unresolved while linking symbol ' **cf_16'! You are probably missing the definition of TTabCom::TTabCom() Maybe you need to load the corresponding shared library? IncrementalExecutor::executeFunction: symbol '_ZN7TTabCom4HookEPcPiRNSt3** 113basic_ostreamIcNS2_11char_traitsIcEEEE' unresolved while linking symbol ' **cf_16'! You are probably missing the definition of TTabCom::Hook(char *, int* , std::** 1::basic_ostream<char, std::__1::char_traits >&) Maybe you need to load the corresponding shared library? Error in TClingCallFunc::make_wrapper: Failed to compile ==== SOURCE BEGIN ====

#pragma clang diagnostic push

#pragma clang diagnostic ignored "-Wformat-security" **attribute** ((used)) extern "C" void __cf_16(void  *obj, int nargs, void** args, void*  ret) { if (ret) { new (ret) (vector) (((vector (&)(const char *))_TTabComHook)(* (const char **)args[0])); return; } else { ((vector (&)(const char *))_TTabComHook)(* (const char** )args[0]); return; } }

#pragma clang diagnostic pop ==== SOURCE END ====

(See attached screenshots.)

This error does not occur in an iPython session nor in a Jupyter notebook, nor does it occur with any other python package inside my IDE (that I’ve noticed). It also doesn’t occur if I’ve written out a script in advance (that is, I do not see the error unless I am actively typing.)

It seems there is some sort of issue with ROOT’s tab completion. Any advice? I would really like to be able to use ROOT properly with my IDE.


ROOT Version: 6.15/01
Platform: macOS
Compiler: Not Provided


Hi,

it seems that libRint is not available. The way in which you may solve it is finding the difference between your IDE and IPython or notebooks…

Cheers,
D

Hi,

The issue is larger than I realized. The only difference between my IDE and Jupyter is that my IDE calls auto-complete after typing 3 characters whereas Jupyter uses tab-completion, and Jupyter does indeed throw the same error when I use tab-complete. (IPython doesn’t though.)

This is thus actually a problem with ROOT integration into Jupyter, or at least my build, and not an issue with my IDE. Can you help?

Hi,

what is the name of the IDE?
Let’s focus on the auto completion in jupyter, which is reproducible. Does autocompletion work for a notebook with a pythonX kernel where X is the python version against which your ROOT installation links?

Cheers,
D

As above, my IDE is Atom, specifically the Hydrogen package (which essentially ports Jupyter kernels).

The autocompletion does not work with a python kernel (this is the only way I’ve tried it; I haven’t tried a ROOT C++ notebook). Looking at the attached screen shot,


hitting tab with the cursor at that point gives the following total output in my terminal (apparently the same error my IDE gave [see above]):

Last login: Wed Oct  3 13:37:34 on ttys002
michael:~$ /Users/michael/anaconda2/bin/jupyter_mac.command ; exit;
[I 16:02:34.830 NotebookApp] Serving notebooks from local directory: /Users/michael
[I 16:02:34.830 NotebookApp] 0 active kernels 
[I 16:02:34.830 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/?token=9f6c91adc4d3b70b7ea360fa703e7cb4e0a4a061b02c0e58
[I 16:02:34.830 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 16:02:34.831 NotebookApp] 
    
    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://localhost:8888/?token=9f6c91adc4d3b70b7ea360fa703e7cb4e0a4a061b02c0e58
[I 16:02:35.690 NotebookApp] Accepting one-time-token-authenticated connection from ::1
[I 16:03:26.344 NotebookApp] Creating new notebook in 
[I 16:03:27.001 NotebookApp] Kernel started: 36965046-86bc-4d0a-bd2f-4641a5b72f8f
[W 16:03:27.041 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20181003160233 (::1) 26.54ms referer=http://localhost:8888/notebooks/Untitled4.ipynb?kernel_name=python2
[I 16:03:28.683 NotebookApp] Adapting to protocol v5.1 for kernel 36965046-86bc-4d0a-bd2f-4641a5b72f8f
input_line_24:1:10: fatal error: 'dlfcn.h' file not found
#include "dlfcn.h"
         ^~~~~~~~~
input_line_27:2:24: error: use of undeclared identifier 'RTLD_NOW'
 (dlopen("libRint.so", RTLD_NOW))
                       ^
Error in <HandleInterpreterException>: Error evaluating expression (dlopen("libRint.so", RTLD_NOW)).
Execution of your code was aborted.
IncrementalExecutor::executeFunction: symbol '_ZN7TTabComC1Ev' unresolved while linking symbol '__cf_16'!
You are probably missing the definition of TTabCom::TTabCom()
Maybe you need to load the corresponding shared library?
IncrementalExecutor::executeFunction: symbol '_ZN7TTabCom4HookEPcPiRNSt3__113basic_ostreamIcNS2_11char_traitsIcEEEE' unresolved while linking symbol '__cf_16'!
You are probably missing the definition of TTabCom::Hook(char*, int*, std::__1::basic_ostream<char, std::__1::char_traits<char> >&)
Maybe you need to load the corresponding shared library?
Error in <TClingCallFunc::make_wrapper>: Failed to compile
  ==== SOURCE BEGIN ====
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wformat-security"
__attribute__((used)) extern "C" void __cf_16(void* obj, int nargs, void** args, void* ret)
{
   if (ret) {
      new (ret) (vector<string>) (((vector<string> (&)(const char*))_TTabComHook)(*(const char**)args[0]));
      return;
   }
   else {
      ((vector<string> (&)(const char*))_TTabComHook)(*(const char**)args[0]);
      return;
   }
}
#pragma clang diagnostic pop
  ==== SOURCE END ====

 *** Break *** segmentation violation
[/usr/lib/system/libsystem_platform.dylib] _sigtramp (no debug info)
[/usr/lib/system/libsystem_c.dylib] _swrite (no debug info)
[/Applications/root_build/lib/libPyROOT.so] Cppyy::CallO(long, void*, void*, long) /Applications/root/bindings/pyroot/src/Cppyy.cxx:504
[/Applications/root_build/lib/libPyROOT.so] PyROOT::TCppObjectByValueExecutor::Execute(long, void*, PyROOT::TCallContext*) /Applications/root/bindings/pyroot/src/Executors.cxx:79
[/Applications/root_build/lib/libPyROOT.so] PyROOT::TMethodHolder::CallFast(void*, long, PyROOT::TCallContext*) /Applications/root/bindings/pyroot/src/TMethodHolder.cxx:110
[/Applications/root_build/lib/libPyROOT.so] PyROOT::TMethodHolder::CallSafe(void*, long, PyROOT::TCallContext*) /Applications/root/bindings/pyroot/src/TMethodHolder.cxx:122
[/Applications/root_build/lib/libPyROOT.so] PyROOT::TMethodHolder::Execute(void*, long, PyROOT::TCallContext*) /Applications/root/bindings/pyroot/src/TMethodHolder.cxx:0
[/Applications/root_build/lib/libPyROOT.so] PyROOT::(anonymous namespace)::mp_call(PyROOT::MethodProxy*, _object*, _object*) /Applications/root/bindings/pyroot/src/MethodProxy.cxx:598
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyObject_Call (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] function_call (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyObject_Call (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] instancemethod_call (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyObject_Call (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] function_call (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyObject_Call (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] function_call (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyObject_Call (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] function_call (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyObject_Call (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] function_call (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyObject_Call (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] RunModule (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] Py_Main (no debug info)
[/usr/lib/system/libdyld.dylib] start (no debug info)
[<unknown binary>] (no debug info)
[IPKernelApp] ERROR | Exception in message handler:
Traceback (most recent call last):
  File "/Users/michael/anaconda2/lib/python2.7/site-packages/ipykernel/kernelbase.py", line 235, in dispatch_shell
    handler(stream, idents, msg)
  File "/Users/michael/anaconda2/lib/python2.7/site-packages/ipykernel/kernelbase.py", line 434, in complete_request
    matches = self.do_complete(code, cursor_pos)
  File "/Users/michael/anaconda2/lib/python2.7/site-packages/ipykernel/ipkernel.py", line 257, in do_complete
    txt, matches = self.shell.complete('', line, line_cursor)
  File "/Users/michael/anaconda2/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 1988, in complete
    return self.Completer.complete(text, line, cursor_pos)
  File "/Users/michael/anaconda2/lib/python2.7/site-packages/IPython/core/completer.py", line 1160, in complete
    custom_res = self.dispatch_custom_completer(text)
  File "/Users/michael/anaconda2/lib/python2.7/site-packages/IPython/core/completer.py", line 1082, in dispatch_custom_completer
    res = c(event)
  File "/Applications/root_build/lib/JupyROOT/cppcompleter.py", line 169, in complete
    return self._completeImpl(event.line)
  File "/Applications/root_build/lib/JupyROOT/cppcompleter.py", line 136, in _completeImpl
    suggestions = self._getSuggestions(line)
  File "/Applications/root_build/lib/JupyROOT/cppcompleter.py", line 123, in _getSuggestions
    return self.hook(line)
SystemError: vector<string> ::_TTabComHook(const char* pattern) =>
    problem in C++; program state has been reset
[I 16:05:26.977 NotebookApp] Saving file at /Untitled4.ipynb

(The difficulty including dlfcn.h is a new problem, apparently unrelated, which I’ve yet to take the time to debug.)

For completeness, I tried it in a ROOT C++ notebook, with similar results:

Last login: Mon Oct  8 11:17:07 on ttys002
michael:~$ /Users/michael/anaconda2/bin/jupyter_mac.command ; exit;
[I 11:20:07.368 NotebookApp] Serving notebooks from local directory: /Users/michael
[I 11:20:07.368 NotebookApp] 0 active kernels 
[I 11:20:07.368 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/?token=6828b0c3b5f07dc19e094acab2938a615b8ce0575d7e0894
[I 11:20:07.368 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 11:20:07.369 NotebookApp] 
    
    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://localhost:8888/?token=6828b0c3b5f07dc19e094acab2938a615b8ce0575d7e0894
[I 11:20:08.108 NotebookApp] Accepting one-time-token-authenticated connection from ::1
[I 11:20:13.644 NotebookApp] Creating new notebook in 
[W 11:20:14.165 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20181008112006 (::1) 19.94ms referer=http://localhost:8888/notebooks/Untitled7.ipynb?kernel_name=root
[I 11:20:14.313 NotebookApp] Kernel started: 0fb6878e-7ba9-4055-9cb6-0843742eb725
input_line_26:1:10: fatal error: 'dlfcn.h' file not found
#include "dlfcn.h"
         ^~~~~~~~~
input_line_29:2:24: error: use of undeclared identifier 'RTLD_NOW'
 (dlopen("libRint.so", RTLD_NOW))
                       ^
Error in <HandleInterpreterException>: Error evaluating expression (dlopen("libRint.so", RTLD_NOW)).
Execution of your code was aborted.
[I 11:20:16.639 NotebookApp] Adapting to protocol v5.1 for kernel 0fb6878e-7ba9-4055-9cb6-0843742eb725
IncrementalExecutor::executeFunction: symbol '_ZN7TTabComC1Ev' unresolved while linking symbol '__cf_15'!
You are probably missing the definition of TTabCom::TTabCom()
Maybe you need to load the corresponding shared library?
IncrementalExecutor::executeFunction: symbol '_ZN7TTabCom4HookEPcPiRNSt3__113basic_ostreamIcNS2_11char_traitsIcEEEE' unresolved while linking symbol '__cf_15'!
You are probably missing the definition of TTabCom::Hook(char*, int*, std::__1::basic_ostream<char, std::__1::char_traits<char> >&)
Maybe you need to load the corresponding shared library?
Error in <TClingCallFunc::make_wrapper>: Failed to compile
  ==== SOURCE BEGIN ====
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wformat-security"
__attribute__((used)) extern "C" void __cf_15(void* obj, int nargs, void** args, void* ret)
{
   if (ret) {
      new (ret) (vector<string>) (((vector<string> (&)(const char*))_TTabComHook)(*(const char**)args[0]));
      return;
   }
   else {
      ((vector<string> (&)(const char*))_TTabComHook)(*(const char**)args[0]);
      return;
   }
}
#pragma clang diagnostic pop
  ==== SOURCE END ====

 *** Break *** segmentation violation
[/usr/lib/system/libsystem_platform.dylib] _sigtramp (no debug info)
[/usr/lib/system/libsystem_c.dylib] _swrite (no debug info)
[/Applications/root_build/lib/libPyROOT.so] Cppyy::CallO(long, void*, void*, long) /Applications/root/bindings/pyroot/src/Cppyy.cxx:504
[/Applications/root_build/lib/libPyROOT.so] PyROOT::TCppObjectByValueExecutor::Execute(long, void*, PyROOT::TCallContext*) /Applications/root/bindings/pyroot/src/Executors.cxx:79
[/Applications/root_build/lib/libPyROOT.so] PyROOT::TMethodHolder::CallFast(void*, long, PyROOT::TCallContext*) /Applications/root/bindings/pyroot/src/TMethodHolder.cxx:110
[/Applications/root_build/lib/libPyROOT.so] PyROOT::TMethodHolder::CallSafe(void*, long, PyROOT::TCallContext*) /Applications/root/bindings/pyroot/src/TMethodHolder.cxx:122
[/Applications/root_build/lib/libPyROOT.so] PyROOT::TMethodHolder::Execute(void*, long, PyROOT::TCallContext*) /Applications/root/bindings/pyroot/src/TMethodHolder.cxx:0
[/Applications/root_build/lib/libPyROOT.so] PyROOT::(anonymous namespace)::mp_call(PyROOT::MethodProxy*, _object*, _object*) /Applications/root/bindings/pyroot/src/MethodProxy.cxx:598
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyObject_Call (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] function_call (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyObject_Call (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] function_call (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyObject_Call (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] function_call (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyObject_Call (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] fast_function (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalFrameEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyEval_EvalCodeEx (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] function_call (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] PyObject_Call (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] RunModule (no debug info)
[/Users/michael/anaconda2/lib/libpython2.7.dylib] Py_Main (no debug info)
[/usr/lib/system/libdyld.dylib] start (no debug info)
[IPKernelApp] ERROR | Exception in message handler:
Traceback (most recent call last):
  File "/Users/michael/anaconda2/lib/python2.7/site-packages/ipykernel/kernelbase.py", line 235, in dispatch_shell
    handler(stream, idents, msg)
  File "/Users/michael/anaconda2/lib/python2.7/site-packages/ipykernel/kernelbase.py", line 434, in complete_request
    matches = self.do_complete(code, cursor_pos)
  File "/Users/michael/anaconda2/lib/python2.7/site-packages/metakernel/_metakernel.py", line 508, in do_complete
    matches.extend(self.get_completions(info))
  File "/Applications/root_build/lib/JupyROOT/kernel/rootkernel.py", line 68, in get_completions
    return self.completer._completeImpl(info['code'])
  File "/Applications/root_build/lib/JupyROOT/cppcompleter.py", line 136, in _completeImpl
    suggestions = self._getSuggestions(line)
  File "/Applications/root_build/lib/JupyROOT/cppcompleter.py", line 123, in _getSuggestions
    return self.hook(line)
SystemError: vector<string> ::_TTabComHook(const char* pattern) =>
    problem in C++; program state has been reset

Hi,

Does autocompletion work for a notebook with a pythonX kernel where X is the python version against which your ROOT installation links?

Cheers,
D

Unless I have mis-understood, I posted the answer to this question above.

Oh, right sorry.
Is the conda python the one against which ROOT was built?

Cheers,
D

Yes:

cmake -Dall=On -DPYTHON_EXECUTABLE=/Users/michael/anaconda2/bin/python -DPYTHON_INCLUDE_DIR=/Users/michael/anaconda2/include/python2.7/ -DPYTHON_LIBRARY=/Users/michael/anaconda2/lib/libpython2.7.dylib ../root/ && make

Are you using the same compiler that was used to compile anaconda’s Python? That is a requirement to build ROOT against anaconda software.

Also, please set only PYTHON_EXECUTABLE and nothing else. Otherwise the cmake scripts may find incompatible things.

I’m not sure how to specify the compiler in the way you mention. In any case, ROOT is available in my anaconda python–I just can’t use tab-completion.

Unless things have changed, this is not correct. See my previous attempt to install ROOT–all three arguments were necessary.

To use a specific compiler, use cmake -DCMAKE_C_COMPILER=$(which gcc) -DCMAKE_CXX_COMPILER=$(which g++) and change $(which gcc), etc, to the compiler you want to use.

The problem shown as unknown identifier for RTLD_NOW could mean that the header is coming from a different place than expected (i.e. from the wrong compiler). The libraries may have linked because you may have similar enough versions, but to guarantee things work, the best thing is to use the same compiler as shown by the python you want to use (in my case, GCC 7.3):

$ python
Python 3.6.6 (default, Jul  5 2018, 17:33:32) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

As for your other build and using PYTHON_EXECUTABLE. You’d probably have better luck with cmake -DCMAKE_PREFIX_PATH=/usr/local to find most things from Homebrew if you’re using that, or a similar trick for anaconda. Mixing Homebrew and anaconda is probably asking for trouble.

I would like to try your suggestion, but I’m not sure how to find the full path to my compiler. (Forgive me, I know next to nothing about compilers.) Python says it’s using:
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]
but I’m not sure how to tell whether that’s the same thing $(which gcc) points to (/usr/bin/gcc).

If you are on OS X, you should probably try using clang and clang++ instead of GCC. Do you want to compile with software from Homebrew/Anaconda? Or just plain OS X with XCode? I think that unless you need, it’s best to just use system software. If you use the system compiler to compile against software installed with Anaconda, it will not work.

I compile against anaconda for a few reasons. The main one being that I use anaconda’s IPython and Jupyter. The secondary one is that there is an issue with compiling ROOT against OS X system python due to some file permissions issues (see, again, my previous installation attempt).

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.