multipass
multipass copied to clipboard
Issues with 3rd party compilation order
Describe the bug Manually compiling Multipass the build process stops at some point.
To Reproduce Inside one Ubuntu 20.04 container, the build process compiling with CLang stops with this error:
-- Looking for openssl/des.h - not found
CMake Error at 3rd-party/libssh/libssh/ConfigureChecks.cmake:80 (message):
Could not detect openssl/des.h
Call Stack (most recent call first):
3rd-party/libssh/CMakeLists.txt:51 (include)
Expected behavior The problem seems to be related to the order of the 3rd party components: https://github.com/canonical/multipass/blob/6c4b8b4f23462a58c81b708808782e682627bf9b/CMakeLists.txt#L125-L138
If you check the pre-builded vcpkg-ports 3rd party package, it includes custom grpc and poco packages as well. However, the configuration is not using these libs to compile other 3rd party packages. And the same is true for the libssh.
The idea is then: compile first custom libssh, grpc and poco; and after use only these versions to compile all the other dependencies.
I hope you want to improve the compilation process to reduce dependencies and use only the custom build 3rd party libraries. This could facilitate compilation in other environments and reduce compilation time.
Hi @lars18th , thanks for bringing this to our attention, it's definitely worth exploring further to simplify and improve the build process and, possibly, the build instructions. Since you seem to have investigated the problem and possible solutions, feel free to open a PR and suggest a fix, we're always happy to review and incorporate contributions from the community.
Hello! Is there any way I could contribute to this issue?
Hi @ljonathan0719. Yes, we welcome community contributions, so you can submit a pull request! I suggest starting by finding a simple recipe to reproduce the issue and take it from there (if you haven't yet). Thank you for your interest and let us know if you need further guidance.
Hi @ricab , is this issue still up for grabs? Or is someone working on it?
@ljonathan0719 do you mean to pursue #3939 any further? If not, I guess this would be free @SuhasHareesh.
I think you need to use add_dependencies(...) to build in a specific order
add_dependencies
I don't see movement here for a while. I'm working on this.
Why this issue is relevant? I don't have this problem compiling in the latest ubuntu LTS. And this is a no longer supported version.
Why this issue is relevant?
Because we want to compile in any Linux (compatible) environment, not only in supported versions.
Please, try to think on this:
- Why do we need 3party libraries if we compile for a specific Linux distribution? In this case, the correct strategy would be to install the 3party library on the system and compile with it.
I understand now. Thanks @lars18th
I have the following error, trying to generate the build system in Ubuntu 20.04:
CMake Error at 3rd-party/vcpkg/scripts/buildsystems/vcpkg.cmake:893 (_find_package):
By not providing "FindQt6.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt6", but
CMake did not find one.
Could not find a package configuration file provided by "Qt6" with any of
the following names:
Qt6Config.cmake
qt6-config.cmake
Add the installation prefix of "Qt6" to CMAKE_PREFIX_PATH or set "Qt6_DIR"
to a directory containing one of the above files. If "Qt6" provides a
separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
CMakeLists.txt:182 (find_package)
I'm not sure if it's related to this issue.
No, this is related to cmake not being able to find your qt6 installation. How did you install qt and where is that installation? It is possible to tell cmake about the Qt6 installation with a flag.
Edit: it is -DCMAKE_PREFIX_PATH=