I’m currently trying to port my “cura-slicer”-snap package to core22 and Cura 5.0. Currently i’m stuck at compiling the “CuraEngine”-program. There is some problem with cmake i can’t get around:
+ cmake /root/parts/CuraEngine/src -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/ -DCMAKE_PREFIX_PATH=/root/stage/usr -DUSE_SYSTEM_LIBS=ON -Wno-dev
2022-07-03 16:42:21.417 :: -- The C compiler identification is GNU 11.2.0
2022-07-03 16:42:21.467 :: -- The CXX compiler identification is GNU 11.2.0
2022-07-03 16:42:21.474 :: -- Detecting C compiler ABI info
2022-07-03 16:42:21.530 :: -- Detecting C compiler ABI info - done
2022-07-03 16:42:21.539 :: -- Check for working C compiler: /usr/bin/cc - skipped
2022-07-03 16:42:21.540 :: -- Detecting C compile features
2022-07-03 16:42:21.540 :: -- Detecting C compile features - done
2022-07-03 16:42:21.544 :: -- Detecting CXX compiler ABI info
2022-07-03 16:42:21.610 :: -- Detecting CXX compiler ABI info - done
2022-07-03 16:42:21.620 :: -- Check for working CXX compiler: /usr/bin/c++ - skipped
2022-07-03 16:42:21.620 :: -- Detecting CXX compile features
2022-07-03 16:42:21.621 :: -- Detecting CXX compile features - done
2022-07-03 16:42:21.624 :: -- Generating compile commands to /root/parts/CuraEngine/build/compile_commands.json
2022-07-03 16:42:21.624 :: -- Setting C++17 support with extensions off and standard required
2022-07-03 16:42:21.624 :: -- Building with Arcus
2022-07-03 16:42:21.754 :: -- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so (found suitable version "3.12.4", minimum required is "3.0.0")
2022-07-03 16:42:21.765 :: -- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so (found suitable version "3.12.4", minimum required is "3.12.4")
2022-07-03 16:42:21.765 :: -- Enabling threading support for _CuraEngine
2022-07-03 16:42:21.767 :: -- Found Threads: TRUE
2022-07-03 16:42:21.767 :: -- Setting SKIP_BUILD_RPATH for target _CuraEngine to FALSE
2022-07-03 16:42:21.767 :: -- Setting BUILD_WITH_INSTALL_RPATH for target _CuraEngine to FALSE
2022-07-03 16:42:21.767 :: -- Setting INSTALL_RPATH_USE_LINK_PATH for target _CuraEngine to TRUE
2022-07-03 16:42:21.767 :: -- Setting install RPATH for target _CuraEngine to $ORIGIN/;$ORIGIN/$<$<PLATFORM_ID:Linux>:usr/bin>;$ORIGIN/$<$<PLATFORM_ID:Linux>:usr/bin/lib>;$ORIGIN/$<$<PLATFORM_ID:Darwin>:../lib>
2022-07-03 16:42:21.955 :: -- Found OpenMP_C: -fopenmp (found version "4.5")
2022-07-03 16:42:22.015 :: -- Found OpenMP_CXX: -fopenmp (found version "4.5")
2022-07-03 16:42:22.015 :: -- Found OpenMP: TRUE (found version "4.5")
2022-07-03 16:42:22.017 :: CMake Error at CMakeLists.txt:262 (add_library):
2022-07-03 16:42:22.017 :: The target name "clipper::clipper" is reserved or not valid for certain
2022-07-03 16:42:22.017 :: CMake features, such as generator expressions, and may result in undefined
2022-07-03 16:42:22.017 :: behavior.
2022-07-03 16:42:22.017 ::
2022-07-03 16:42:22.017 ::
2022-07-03 16:42:22.017 :: CMake Error at CMakeLists.txt:263 (target_include_directories):
2022-07-03 16:42:22.017 :: Cannot specify include directories for target "clipper::clipper" which is
2022-07-03 16:42:22.018 :: not built by this project.
2022-07-03 16:42:22.018 ::
2022-07-03 16:42:22.018 ::
2022-07-03 16:42:22.019 :: CMake Error at CMakeLists.txt:272 (add_library):
2022-07-03 16:42:22.019 :: The target name "rapidjson::rapidjson" is reserved or not valid for certain
2022-07-03 16:42:22.019 :: CMake features, such as generator expressions, and may result in undefined
2022-07-03 16:42:22.019 :: behavior.
2022-07-03 16:42:22.019 ::
2022-07-03 16:42:22.019 ::
2022-07-03 16:42:22.019 :: CMake Error at CMakeLists.txt:273 (target_include_directories):
2022-07-03 16:42:22.019 :: Cannot specify include directories for target "rapidjson::rapidjson" which
2022-07-03 16:42:22.020 :: is not built by this project.
2022-07-03 16:42:22.020 ::
2022-07-03 16:42:22.020 ::
2022-07-03 16:42:22.021 :: CMake Error at CMakeLists.txt:280 (find_package):
2022-07-03 16:42:22.021 :: By not providing "Findstb.cmake" in CMAKE_MODULE_PATH this project has
2022-07-03 16:42:22.021 :: asked CMake to find a package configuration file provided by "stb", but
2022-07-03 16:42:22.021 :: CMake did not find one.
2022-07-03 16:42:22.021 ::
2022-07-03 16:42:22.021 :: Could not find a package configuration file provided by "stb" with any of
2022-07-03 16:42:22.021 :: the following names:
2022-07-03 16:42:22.021 ::
2022-07-03 16:42:22.021 :: stbConfig.cmake
2022-07-03 16:42:22.021 :: stb-config.cmake
2022-07-03 16:42:22.021 ::
2022-07-03 16:42:22.021 :: Add the installation prefix of "stb" to CMAKE_PREFIX_PATH or set "stb_DIR"
2022-07-03 16:42:22.021 :: to a directory containing one of the above files. If "stb" provides a
2022-07-03 16:42:22.021 :: separate development package or SDK, be sure it has been installed.
2022-07-03 16:42:22.021 ::
2022-07-03 16:42:22.021 ::
2022-07-03 16:42:22.021 :: -- Configuring incomplete, errors occurred!
and
CuraEngine:
plugin: cmake
cmake-parameters:
- -DCMAKE_BUILD_TYPE=RELEASE
- -DCMAKE_INSTALL_PREFIX=/usr/
- -DCMAKE_PREFIX_PATH="${CRAFT_STAGE}/usr"
- -DUSE_SYSTEM_LIBS=ON
- -Wno-dev
source: https://github.com/Ultimaker/CuraEngine/archive/refs/tags/5.0.0.tar.gz
source-type: tar
build-packages:
- cmake
- libboost-dev
- libcppunit-dev
- libnlopt-cxx-dev
- libnlopt-dev
- libpolyclipping-dev
- libprotobuf-dev
- libprotoc-dev
- libstb-dev
- pkg-config
- protobuf-compiler
- rapidjson-dev
stage-packages:
- libgomp1
override-pull: |
craftctl default
for commit in `ls ${CRAFT_PROJECT_DIR}/local/patches/CuraEngine`; do patch -p1 < ${CRAFT_PROJECT_DIR}/local/patches/CuraEngine/${commit}; done
after:
- libSavitar