Skip to content

fcarouge-kalman: add recipe #27358

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

FrancoisCarouge
Copy link

@FrancoisCarouge FrancoisCarouge commented May 4, 2025

Summary

Adds recipe: fcarouge-kalman/0.5.1
fixes #27357

Motivation

New recipe in support of the Kalman package, for issue #27357 [request] fcarouge-kalman.

Details

Initial recipe support for the C++23 and CMake project.
Tested on Ubuntu 22.04 and MacOS 15.4.1 with GCC14 and Clang 19.


@AbrilRBS AbrilRBS self-assigned this May 5, 2025
@AbrilRBS
Copy link
Member

AbrilRBS commented May 5, 2025

@FrancoisCarouge I've cleaned up the recipe a bit and removed the creation of samples and tests, it would be great if new releases had a cmake option to disable them so that no patching is needed on our side.

Also, I've seen that eigen, gsl and mp::units are downloaded as part of the samples/examples, so my question is if they are ever needed to run the library, or if they are only used as supporting libraries in the examples, thanks!

@AbrilRBS
Copy link
Member

AbrilRBS commented May 5, 2025

Successful compilation/usage logs, as the CI does not compile C++23 packages yet:

$ conan create . --version=0.5.1 -b=missing -s="compiler.cppstd=23"

======== Exporting recipe to the cache ========
fcarouge-kalman/0.5.1: Exporting package recipe: /Users/abril/coding/external/francois/recipes/fcarouge-kalman/all/conanfile.py
fcarouge-kalman/0.5.1: exports: File 'conandata.yml' found. Exporting it...
fcarouge-kalman/0.5.1: Calling export_sources()
fcarouge-kalman/0.5.1: Copied 1 '.py' file: conanfile.py
fcarouge-kalman/0.5.1: Copied 1 '.yml' file: conandata.yml
fcarouge-kalman/0.5.1: Copied 1 '.patch' file: 0001-0.5.1-disable-testing.patch
fcarouge-kalman/0.5.1: Exported to cache folder: /Users/abril/.conan2/p/fcaroafbb842eab7aa/e
fcarouge-kalman/0.5.1: Exported: fcarouge-kalman/0.5.1#8fd898c57df78981b9b80f31b1551b89 (2025-05-05 20:06:11 UTC)

======== Input profiles ========
Profile host:
[settings]
arch=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=23
compiler.libcxx=libc++
compiler.version=16
os=Macos
[tool_requires]
*: ccache/4.10.2
[platform_tool_requires]
cmake/4.0.0
meson/1.7.1
ninja/1.12.1
[replace_tool_requires]
meson/*: meson/[*]
pkgconf/*: pkgconf/[*]
ninja/*: ninja/[*]
cmake/*: cmake/[*]
[conf]
core.download:download_cache=/opt/conan_backups
core.sources:download_cache=/opt/conan_backups
core.sources:download_urls=['https://c3i.jfrog.io/artifactory/conan-center-backup-sources/', 'origin']

Profile build:
[settings]
arch=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=gnu17
compiler.libcxx=libc++
compiler.version=16
os=Macos
[tool_requires]
*: ccache/4.10.2
[platform_tool_requires]
cmake/4.0.0
meson/1.7.1
ninja/1.12.1
[replace_tool_requires]
meson/*: meson/[*]
pkgconf/*: pkgconf/[*]
ninja/*: ninja/[*]
cmake/*: cmake/[*]
[conf]
core.download:download_cache=/opt/conan_backups
core.sources:download_cache=/opt/conan_backups
core.sources:download_urls=['https://c3i.jfrog.io/artifactory/conan-center-backup-sources/', 'origin']


======== Computing dependency graph ========
Graph root
    cli
Requirements
    fcarouge-kalman/0.5.1#8fd898c57df78981b9b80f31b1551b89 - Cache
Build requirements
    ccache/4.10.2#846894d0be2d48c603bcad2753e7980d - Cache

======== Computing necessary packages ========
Connecting to remote 'conancenter' anonymously
Requirements
    fcarouge-kalman/0.5.1#8fd898c57df78981b9b80f31b1551b89:da39a3ee5e6b4b0d3255bfef95601890afd80709 - Build
Build requirements
    ccache/4.10.2#846894d0be2d48c603bcad2753e7980d:9e5323c65b94ae38c3c733fe12637776db0119a5#91a23a70e21cbe629f9b7acb3bb83d42 - Cache

======== Installing packages ========
ccache/4.10.2: Already installed! (1 of 2)
ccache/4.10.2: Finalized folder /Users/abril/.conan2/p/b/ccach1e6bed495b8dd/f
ccache/4.10.2: Finalized folder /Users/abril/.conan2/p/b/ccach1e6bed495b8dd/f
fcarouge-kalman/0.5.1: Calling source() in /Users/abril/.conan2/p/fcaroafbb842eab7aa/s/src
fcarouge-kalman/0.5.1: Source https://github.com/FrancoisCarouge/Kalman/archive/refs/tags/0.5.1.tar.gz retrieved from local download cache
fcarouge-kalman/0.5.1: Unzipping 0.5.1.tar.gz to .
fcarouge-kalman/0.5.1: Apply patch (conan): Disable testing, samples and exampples

-------- Installing package fcarouge-kalman/0.5.1 (2 of 2) --------
fcarouge-kalman/0.5.1: Building from source
fcarouge-kalman/0.5.1: Package fcarouge-kalman/0.5.1:da39a3ee5e6b4b0d3255bfef95601890afd80709
fcarouge-kalman/0.5.1: Copying sources to build folder
fcarouge-kalman/0.5.1: Building your package in /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/b
fcarouge-kalman/0.5.1: Writing generators to /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/b/build/Release/generators
fcarouge-kalman/0.5.1: Generator 'CMakeToolchain' calling 'generate()'
fcarouge-kalman/0.5.1: CMakeToolchain generated: conan_toolchain.cmake
fcarouge-kalman/0.5.1: CMakeToolchain generated: /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/b/build/Release/generators/CMakePresets.json
fcarouge-kalman/0.5.1: CMakeToolchain generated: /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/b/src/CMakeUserPresets.json
fcarouge-kalman/0.5.1: Generating aggregated env files
fcarouge-kalman/0.5.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
fcarouge-kalman/0.5.1: Calling build()
fcarouge-kalman/0.5.1: Running CMake.configure()
fcarouge-kalman/0.5.1: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/b/src"
-- Using Conan toolchain: /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/b/build/Release/generators/conan_toolchain.cmake
-- Conan toolchain: Including user_toolchain: /Users/abril/.conan2/p/b/ccach1e6bed495b8dd/f/ccache-autoinject.cmake
-- /Users/abril/.conan2/p/b/ccach1e6bed495b8dd/f/bin/ccache found and enabled
-- Conan toolchain: Defining libcxx as C++ flags: -stdlib=libc++
-- Conan toolchain: C++ Standard 23 with extensions OFF
-- The CXX compiler identification is AppleClang 17.0.0.17000013
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (0.5s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/b/build/Release

fcarouge-kalman/0.5.1: Running CMake.build()
fcarouge-kalman/0.5.1: RUN: cmake --build "/Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/b/build/Release" -- -j12

fcarouge-kalman/0.5.1: Package 'da39a3ee5e6b4b0d3255bfef95601890afd80709' built
fcarouge-kalman/0.5.1: Build folder /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/b/build/Release
fcarouge-kalman/0.5.1: Generating the package
fcarouge-kalman/0.5.1: Packaging in folder /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/p
fcarouge-kalman/0.5.1: Calling package()
fcarouge-kalman/0.5.1: Running CMake.install()
fcarouge-kalman/0.5.1: RUN: cmake --install "/Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/b/build/Release" --prefix "/Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/p"
-- Install configuration: "Release"
-- Installing: /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/p/share/fcarouge-kalman/cmake/fcarouge-kalman-target.cmake
-- Installing: /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/p/share/fcarouge-kalman/cmake/fcarouge-kalman-config.cmake
-- Installing: /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/p/share/fcarouge-kalman/cmake/fcarouge-kalman-config-version.cmake
-- Installing: /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/p/include/fcarouge/format.hpp
-- Installing: /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/p/include/fcarouge/kalman.hpp
-- Installing: /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/p/include/fcarouge/printer.hpp
-- Installing: /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/p/include/fcarouge/utility.hpp
-- Installing: /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/p/include/fcarouge/internal/factory.hpp
-- Installing: /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/p/include/fcarouge/internal/function.hpp
-- Installing: /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/p/include/fcarouge/internal/kalman.tpp
-- Installing: /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/p/include/fcarouge/internal/type.hpp
-- Installing: /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/p/include/fcarouge/internal/utility.hpp
-- Installing: /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/p/include/fcarouge/internal/x_z_p_q_r_h_f.hpp
-- Installing: /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/p/include/fcarouge/internal/x_z_p_q_r_hh_us_ps.hpp
-- Installing: /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/p/include/fcarouge/internal/x_z_p_q_r.hpp
-- Installing: /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/p/include/fcarouge/internal/x_z_p_qq_rr_f.hpp
-- Installing: /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/p/include/fcarouge/internal/x_z_p_r_f.hpp
-- Installing: /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/p/include/fcarouge/internal/x_z_p_r.hpp
-- Installing: /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/p/include/fcarouge/internal/x_z_u_p_q_r_f_g_ps.hpp
-- Installing: /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/p/include/fcarouge/internal/x_z_u_p_q_r_h_f_g_us_ps.hpp
-- Installing: /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/p/include/fcarouge/internal/x_z_u_p_q_r.hpp

fcarouge-kalman/0.5.1: package(): Packaged 1 '.txt' file: LICENSE.txt
fcarouge-kalman/0.5.1: package(): Packaged 17 '.hpp' files
fcarouge-kalman/0.5.1: package(): Packaged 1 '.tpp' file: kalman.tpp
fcarouge-kalman/0.5.1: Created package revision b25a19057800820b030a56cfa12e1453
fcarouge-kalman/0.5.1: Package 'da39a3ee5e6b4b0d3255bfef95601890afd80709' created
fcarouge-kalman/0.5.1: Full package reference: fcarouge-kalman/0.5.1#8fd898c57df78981b9b80f31b1551b89:da39a3ee5e6b4b0d3255bfef95601890afd80709#b25a19057800820b030a56cfa12e1453
fcarouge-kalman/0.5.1: Package folder /Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/p

======== Launching test_package ========

======== Computing dependency graph ========
Graph root
    fcarouge-kalman/0.5.1 (test package): /Users/abril/coding/external/francois/recipes/fcarouge-kalman/all/test_package/conanfile.py
Requirements
    fcarouge-kalman/0.5.1#8fd898c57df78981b9b80f31b1551b89 - Cache
Build requirements
    ccache/4.10.2#846894d0be2d48c603bcad2753e7980d - Cache

======== Computing necessary packages ========
Requirements
    fcarouge-kalman/0.5.1#8fd898c57df78981b9b80f31b1551b89:da39a3ee5e6b4b0d3255bfef95601890afd80709#b25a19057800820b030a56cfa12e1453 - Cache
Build requirements
    ccache/4.10.2#846894d0be2d48c603bcad2753e7980d:9e5323c65b94ae38c3c733fe12637776db0119a5#91a23a70e21cbe629f9b7acb3bb83d42 - Cache

======== Installing packages ========
ccache/4.10.2: Already installed! (1 of 2)
ccache/4.10.2: Finalized folder /Users/abril/.conan2/p/b/ccach1e6bed495b8dd/f
fcarouge-kalman/0.5.1: Already installed! (2 of 2)

======== Testing the package ========
Removing previously existing 'test_package' build folder: /Users/abril/coding/external/francois/recipes/fcarouge-kalman/all/test_package/build/apple-clang-16-armv8-23-release
fcarouge-kalman/0.5.1 (test package): Test package build: build/apple-clang-16-armv8-23-release
fcarouge-kalman/0.5.1 (test package): Test package build folder: /Users/abril/coding/external/francois/recipes/fcarouge-kalman/all/test_package/build/apple-clang-16-armv8-23-release
fcarouge-kalman/0.5.1 (test package): Writing generators to /Users/abril/coding/external/francois/recipes/fcarouge-kalman/all/test_package/build/apple-clang-16-armv8-23-release/generators
fcarouge-kalman/0.5.1 (test package): Generator 'CMakeDeps' calling 'generate()'
fcarouge-kalman/0.5.1 (test package): CMakeDeps necessary find_package() and targets for your CMakeLists.txt
    find_package(fcarouge-kalman)
    target_link_libraries(... fcarouge-kalman::kalman)
fcarouge-kalman/0.5.1 (test package): Generator 'CMakeToolchain' calling 'generate()'
fcarouge-kalman/0.5.1 (test package): CMakeToolchain generated: conan_toolchain.cmake
fcarouge-kalman/0.5.1 (test package): CMakeToolchain generated: /Users/abril/coding/external/francois/recipes/fcarouge-kalman/all/test_package/build/apple-clang-16-armv8-23-release/generators/CMakePresets.json
fcarouge-kalman/0.5.1 (test package): CMakeToolchain generated: /Users/abril/coding/external/francois/recipes/fcarouge-kalman/all/test_package/CMakeUserPresets.json
fcarouge-kalman/0.5.1 (test package): Generating aggregated env files
fcarouge-kalman/0.5.1 (test package): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']

======== Testing the package: Building ========
fcarouge-kalman/0.5.1 (test package): Calling build()
fcarouge-kalman/0.5.1 (test package): Running CMake.configure()
fcarouge-kalman/0.5.1 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/Users/abril/coding/external/francois/recipes/fcarouge-kalman/all/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/Users/abril/coding/external/francois/recipes/fcarouge-kalman/all/test_package"
-- Using Conan toolchain: /Users/abril/coding/external/francois/recipes/fcarouge-kalman/all/test_package/build/apple-clang-16-armv8-23-release/generators/conan_toolchain.cmake
-- Conan toolchain: Including user_toolchain: /Users/abril/.conan2/p/b/ccach1e6bed495b8dd/f/ccache-autoinject.cmake
-- /Users/abril/.conan2/p/b/ccach1e6bed495b8dd/f/bin/ccache found and enabled
-- Conan toolchain: Defining libcxx as C++ flags: -stdlib=libc++
-- Conan toolchain: C++ Standard 23 with extensions OFF
-- The CXX compiler identification is AppleClang 17.0.0.17000013
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Conan: Target declared 'fcarouge-kalman::kalman'
-- Configuring done (0.5s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/abril/coding/external/francois/recipes/fcarouge-kalman/all/test_package/build/apple-clang-16-armv8-23-release

fcarouge-kalman/0.5.1 (test package): Running CMake.build()
fcarouge-kalman/0.5.1 (test package): RUN: cmake --build "/Users/abril/coding/external/francois/recipes/fcarouge-kalman/all/test_package/build/apple-clang-16-armv8-23-release" -- -j12
[ 50%] Building CXX object CMakeFiles/test_package.dir/test_package.cpp.o
[100%] Linking CXX executable test_package
ld: warning: search path '/Users/abril/.conan2/p/b/fcaro8ff44a5794b5a/p/lib' not found
[100%] Built target test_package


======== Testing the package: Executing test ========
fcarouge-kalman/0.5.1 (test package): Running test()
fcarouge-kalman/0.5.1 (test package): RUN: ./test_package
{"k": 1, "p": 1, "r": 0, "s": 1, "x": 0, "y": 0, "z": 0}

@FrancoisCarouge
Copy link
Author

Thank you for the cleanup @AbrilRBS !

I will be sure to avoid the tests and samples in the next release.

I can confirm the eigen, gsl, and mp-units libraries are not required for the library. They are only used in the samples and tests to showcase advanced use cases. They will no longer be downloaded in the next release. I could also verify in your successful compilation/usage logs they are not downloaded under the patch conditions.

@FrancoisCarouge FrancoisCarouge marked this pull request as draft May 7, 2025 17:19
@FrancoisCarouge
Copy link
Author

I converted this pull request to draft as I upstream the test and sample avoidance. I will update the pull request to remove the patch with the next version.

@@ -0,0 +1,7 @@
cmake_minimum_required(VERSION 3.25)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cmake_minimum_required(VERSION 3.25)
cmake_minimum_required(VERSION 3.15)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[request] fcarouge-kalman/0.5.1
2 participants