R1tschY/harbour-sailfishconnect

Problems during conan dependency compilation

Mazhoon opened this issue · 2 comments

I've been trying to compile a build of harbour-sailfishconnect locally with Sailfish IDE, but I've encountered some problems. (OpenSuSE Tumbleweed)

First problem was compilation error during "Collecting PyYAML<=6.0,>=3.11 (from conan===1.60.1)"
This could be esaily fixed with bumping conan version in harbour-sailfishconnect.spec to 1.60.2

However, I'm having problems with paths during dependency installations
KF5Config/5.36.0@r1tschy/stable` from 'sailfishos' KF5CoreAddons/5.36.0@r1tschy/stable from 'sailfishos KF5I18n/5.36.0@r1tschy/stable from 'sailfishos' Qca-qt5/2.2.1@r1tschy/stable from 'sailfishos' extra-cmake-modules/5.68.0@r1tschy/stable from 'sailfishos' libssh/0.9.5@r1tschy/stable from 'sailfishos'

e.g.

libssh/0.9.5@r1tschy/stable: Copying sources to build folder
libssh/0.9.5@r1tschy/stable: Building your package in /home/user/harbour-sailfishconnect/.conan/data/libssh/0.9.5/r1tschy/stable/build/ab7ea57f49b7c07a7394772fef5a7758f78bb4c4
libssh/0.9.5@r1tschy/stable: Generator cmake created conanbuildinfo.cmake
libssh/0.9.5@r1tschy/stable: Aggregating env generators
libssh/0.9.5@r1tschy/stable: Calling build()
/home/mersdk/.mb2/wrappers/build-harbour-sailfishconnect-SailfishOS_4_5_0_18_i486_in_Sailfish_SDK_Build_Engine-Release/cmake: Executing real cmake:
+ /usr/bin/cmake --version -GNinja -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_C_COMPILER_TARGET:STRING=i486-meego-linux-gnu -DCMAKE_CXX_COMPILER_TARGET:STRING=i486-meego-linux-gnu /home/user/harbour-sailfishconnect//home/user/harbour-sailfishconnect/.conan/data/libssh/0.9.5/r1tschy/stable/build/ab7ea57f49b7c07a7394772fef5a7758f78bb4c4
/home/mersdk/.mb2/wrappers/build-harbour-sailfishconnect-SailfishOS_4_5_0_18_i486_in_Sailfish_SDK_Build_Engine-Release/cmake: Executing real cmake:
+ /usr/bin/cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=Release -DCONAN_IN_LOCAL_CACHE=ON -DCONAN_COMPILER=gcc -DCONAN_COMPILER_VERSION=8.3 -DCONAN_CXX_FLAGS=-m32 -DCONAN_SHARED_LINKER_FLAGS=-m32 -DCONAN_C_FLAGS=-m32 -DCONAN_LIBCXX=libstdc++11 -DCMAKE_INSTALL_PREFIX=/home/user/harbour-sailfishconnect/.conan/data/libssh/0.9.5/r1tschy/stable/build/ab7ea57f49b7c07a7394772fef5a7758f78bb4c4/install -DCMAKE_INSTALL_BINDIR=bin -DCMAKE_INSTALL_SBINDIR=bin -DCMAKE_INSTALL_LIBEXECDIR=bin -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_INCLUDEDIR=include -DCMAKE_INSTALL_OLDINCLUDEDIR=include -DCMAKE_INSTALL_DATAROOTDIR=share -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCONAN_EXPORTED=1 -DWITH_ZLIB=True -DWITH_SFTP=True -DWITH_SERVER=True -DWITH_STATIC_LIB=True -DBUILD_EXAMPLES=False -DBUILD_TESTING=False -DBUILD_SHARED_LIBS=False -Wno-dev /home/user/harbour-sailfishconnect/.conan/data/libssh/0.9.5/r1tschy/stable/build/ab7ea57f49b7c07a7394772fef5a7758f78bb4c4/libssh-0.9.5 -GNinja -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_C_COMPILER_TARGET:STRING=i486-meego-linux-gnu -DCMAKE_CXX_COMPILER_TARGET:STRING=i486-meego-linux-gnu /home/user/harbour-sailfishconnect//home/user/harbour-sailfishconnect/.conan/data/libssh/0.9.5/r1tschy/stable/build/ab7ea57f49b7c07a7394772fef5a7758f78bb4c4
CMake Error: The source directory "/home/user/harbour-sailfishconnect/home/user/harbour-sailfishconnect/.conan/data/libssh/0.9.5/r1tschy/stable/build/ab7ea57f49b7c07a7394772fef5a7758f78bb4c4" does not exist.

I can work around these in compilation by manually creating a directory /home/user/harbour-sailfishconnect/home/user/harbour-sailfishconnect/.conan/data/libssh/0.9.5/r1tschy/stable/build and copying /home/user/harbour-sailfishconnect/.conan/data/libssh/0.9.5/r1tschy/stable/build/ab7ea57f49b7c07a7394772fef5a7758f78bb4c4 there (for each of the dependencies), however this doesn't yet allow the actual harbour-sailfishconnect compilation to find them.

It seems that a white space is missing somewhere, or duplicate contents are added to path for some reason. I've tried poking around the conanfiles, rpm spec and CMakeLists.txt, but I'm not fluent with conan and haven't managed to find out how to fix this correctly.

When building from Sailfish IDE, I first build from a terminal with sfdk build. So the dependencies are build with a real cmake. After that I build from IDE and the dependencies are used from the conan cache.

When building from Sailfish IDE, I first build from a terminal with sfdk build. So the dependencies are build with a real cmake. After that I build from IDE and the dependencies are used from the conan cache.

Ah, yes, very good. Running sfdk build first helped, thank you very much!