[R-sig-Debian] Problem with R package while building KDEStateMachineEditor

Ivan Krylov |kry|ov @end|ng |rom d|@root@org
Mon Jan 13 21:29:03 CET 2025


В Mon, 13 Jan 2025 19:27:53 +0100
Sylvain Sécherre via R-SIG-Debian <r-sig-debian using r-project.org> пишет:

> I try to build KDEStateMachineEditor with cmake. This soft includes 
> GraphViz, which includes himself SWIG which needs R.

Judging by the CMakeLists.txt belonging to GraphViz [*], it should be
possible to disable its SWIG support by setting -DENABLE_SWIG=OFF.

The exact check for R is done using pkg-config:

>> if(NOT ENABLE_R STREQUAL "OFF")
>>   if(PkgConfig_FOUND)
>>     pkg_check_modules(R R)

The check might be not exactly correct - on my Debian Bookworm
installation, pkg-config libR succeeds, but pkg-config R doesn't - but
neither of that should be required to compile GraphViz for the purpose
of rendering state machine graphs for KDStateMachineEditor. And it
isn't, CMakeLists.txt just shrugs and moves on:

>>   else()
>>     message(STATUS "setting -DENABLE_R=OFF")
>>     set(ENABLE_R OFF)
>>   endif()

We can see this code working in your CMake log:

>      Package 'R', required by 'virtual:world', not found
> setting -DENABLE_R=OFF

Does it really fail after that? If not, feel free to ignore this
message. If yes, the problem must be somewhere below.

I've installed libgraphviz-dev and configured the project with

cmake -S . -DKDSME_INTERNAL_GRAPHVIZ=false -B build

...and it seems to have successfully compiled. 'make test' succeeds
too, and I can launch build/bin/kdstatemachineeditor and try things in
the user interface.

-- 
Best regards,
Ivan

[*]
https://gitlab.com/graphviz/graphviz/-/blob/main/CMakeLists.txt?ref_type=heads



More information about the R-SIG-Debian mailing list