multipass icon indicating copy to clipboard operation
multipass copied to clipboard

Compile libssh with symbol versioning

Open andrei-toterman opened this issue 5 months ago • 0 comments

At this moment, when we compile our fork of libssh, we bypass the main CMakeLists.txt file of libssh, in order to avoid some supposedly unnecessary checks. But that CMake file also has some code that is responsible for setting up symbol versioning for the library. Symbol versioning would be useful as an alternative to this fix #3559, since the Qt Network library would be able to use our own libssh. So, in order to compile libssh with symbol versioning, 3 things must be done:

  • Rewrite our own CMake code that is responsible for including libssh into our project, so that it doesn't bypass the main libssh CMake file.
  • Patch the main libssh CMake file so that it does not use CMAKE_SOURCE_DIR. Since we include libssh into our project, CMAKE_SOURCE_DIR will have the value of our own top level project directory, which messes with the logic of the libssh CMake file. We could patch it to use CMAKE_CURRENT_SOURCE_DIR or PROJECT_SOURCE_DIR. Or perhaps there are some other alternatives that do not involve touching the libssh CMake file.
  • Make abimap available. abimap is a python package that is used by the libssh CMake code when setting up symbol versioning. It can be installed using pip install abimap. But this will probably necessitate setting up a virtual environment for python in which to install that package, or some other way of providing that package without having it installed globally on the machine.

andrei-toterman avatar Sep 10 '24 11:09 andrei-toterman