You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
When developing a large library, there were problems porting to another computer.
Assembly and packaging in whl takes place on 1 computer. Also, all dependencies (.so files and headers) are packaged in a separate whl file.
In total, there are 2 sets of whl files: cppyy and its dependencies, its own library and its set of dependencies.
When ported to 2 computers, cppyy is installed without problems and works successfully. The native library is also being installed successfully.
However, when trying to use the library, the errors presented below occur.
Error log
Error in cling::AutoLoadingVisitor::InsertIntoAutoloadingState: Missing FileEntry for [path to headers to 1 computer] requested to autoload type [name class]
So cppyy finds the files exactly (I set it via LD_LIBRARY_PATH). I tried to set the path to the headers through the ROOT_INCLUDE_PATH variable. Unfortunately, it didn't help. Instead, it tries to find by absolute paths from 1 computer.
Can you tell me if you have any thoughts on how this can be fixed?
The text was updated successfully, but these errors were encountered:
Решил проблему следующим образом.
В своих CMakeLists.txt собирал свои заголовки с относительными путями. file(GLOB_RECURSE HEADERS RELATIVE ...)
Перед ROOT_GENERATE_DICTIONARY добавлял переменную INCLUDE_DIRRECTORIES. В качестве значения задавал с помощью ${CMAKE_CURRENT_SOURCE_DIR}.
После этого пришлось лезть в RootMacros.cmake, FindCppyy.cmake. Для каждого файла были следующие изменения:
RootMacros.cmake
После 243 строки добавил в дист incdirs INCLUDE_DIRRECTORIES: list(APPEND incdirs ${INCLUDE_DIRRECTORIES}).
FindCppyy.cmake
Если подавать на вход относительную пути без правок этого cmakelists, то на выходе все равно будут абсолютные пути. Поэтому создал переменную, которая хранит значение относительных путей. Эту переменную я передавал вместо ARG_H_FILES в блоке run rootcling
При переносе собранных пакетов на другую машину у so файлов возникнет ошибка, вызванная невозможностью найти зависимости (в моем случае, одной из таких зависимостью был gdal). Эта проблема решается путем создания переменной LD_LIBRARY_PATH. Также потребуется задать переменную ROOT_INCLUDE_PATH, указав пути до заголовков.
Может есть и другое решение, но я его не нашел на данный момент :)
Hello!
When developing a large library, there were problems porting to another computer.
Assembly and packaging in whl takes place on 1 computer. Also, all dependencies (.so files and headers) are packaged in a separate whl file.
In total, there are 2 sets of whl files: cppyy and its dependencies, its own library and its set of dependencies.
When ported to 2 computers, cppyy is installed without problems and works successfully. The native library is also being installed successfully.
However, when trying to use the library, the errors presented below occur.
Error log
Error in cling::AutoLoadingVisitor::InsertIntoAutoloadingState: Missing FileEntry for [path to headers to 1 computer] requested to autoload type [name class]So cppyy finds the files exactly (I set it via LD_LIBRARY_PATH). I tried to set the path to the headers through the ROOT_INCLUDE_PATH variable. Unfortunately, it didn't help. Instead, it tries to find by absolute paths from 1 computer.
Can you tell me if you have any thoughts on how this can be fixed?
The text was updated successfully, but these errors were encountered: