cppyy icon indicating copy to clipboard operation
cppyy copied to clipboard

[Question] Package always trying to load original header files

Open markuszinser opened this issue 4 years ago • 1 comments

I am building a python package using the CMake function cppyy_add_bindings. If I install the package and use the package on the machine where I built the python package everything works fine. But if I deploy the package to a different machine where I don't have the original header Files, then I get the following error:

import mypackage Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState: Missing FileEntry for /home/user/myrepo/src/MyClass.hpp requested to autoload type MyClass

Where the path is the path of the original header file. I am rather new to cppyy, so I don't know if I just did something stupid. But my understanding was that the bindings can also be loaded from the mypackage.map file which is distributed with the python package.

markuszinser avatar Dec 16 '21 14:12 markuszinser

Interestingly, the Cling code suggests that this 'Error' is only a warning.

I presume this is coming from the dictionary generation, but although I do know that it stores the original paths (to be used for lookup), it should not look for absolute paths unless directed to do so.

I can see whether I can reproduce it (I'm not fully familiar with the CMake fragments as these were contributed).

wlav avatar Dec 22 '21 04:12 wlav