conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
963 stars 1.77k forks source link

[package] flann/1.9.2: static runtime is being overriden in package_info #22620

Open Jimbopython opened 9 months ago

Jimbopython commented 9 months ago

Description

When building the flann library via conan, it does not respect setting a static runtime, when building it as a static library.

In the generated cmake finder module, the libc++ is mentioned as a dependency:

cat FindFlann.cmake | grep c++
set(Flann_SYSTEM_LIBS m c++)
set(Flann_flann_cpp_s_SYSTEM_LIBS c++)

This might come from the conanfile of flann:

if not self.options.shared:
    libcxx = stdcpp_library(self)
    if libcxx:
        self.cpp_info.components["flann_cpp"].system_libs.append(libcxx)

It may be changed to something like:

if not self.options.shared and self.options.compiler.get_safe("runtime") == "shared":
    libcxx = stdcpp_library(self)
    if libcxx:
        self.cpp_info.components["flann_cpp"].system_libs.append(libcxx)

Package and Environment Details

Conan profile

[settings] os=Linux arch=x86_64 compiler=clang compiler.version=16 compiler.libcxx=libc++ compiler.runtime=static compiler.cppstd=20

[env] CC=/usr/bin/clang CXX=/usr/bin/clang++

Steps to reproduce

conan install flann/1.9.2@ --install-folder build --build -pr:b clang_test -pr:h clang_test -s:h build_type=Release -g cmake_find_package -o shared=False

Logs

Click to expand log ``` Conan 1 is on a deprecation path, please consider migrating to Conan 2 Configuration (profile_host): [settings] arch=x86_64 build_type=Release compiler=clang compiler.cppstd=20 compiler.libcxx=libc++ compiler.runtime=static compiler.version=16 os=Linux [options] shared=False [build_requires] [env] CC=/usr/bin/clang CXX=/usr/bin/clang++ Configuration (profile_build): [settings] arch=x86_64 compiler=clang compiler.cppstd=20 compiler.libcxx=libc++ compiler.runtime=static compiler.version=16 os=Linux [options] [build_requires] [env] CC=/usr/bin/clang CXX=/usr/bin/clang++ lz4/1.9.4: Forced build from source flann/1.9.2: Forced build from source Installing package: flann/1.9.2 Requirements flann/1.9.2 from 'conancenter' - Cache lz4/1.9.4 from 'conancenter' - Cache Packages flann/1.9.2:545572333fa0aa4a66450c56b85ebf8f17c55f8f - Build lz4/1.9.4:ff2cd1780794ed7c7c274d576049f53de7fefeba - Build Installing (downloading, building) binaries... lz4/1.9.4: Copying sources to build folder lz4/1.9.4: Building your package in /home/lst/.conan/data/lz4/1.9.4/_/_/build/ff2cd1780794ed7c7c274d576049f53de7fefeba lz4/1.9.4: Generator txt created conanbuildinfo.txt lz4/1.9.4: Calling generate() lz4/1.9.4: Preset 'release' added to CMakePresets.json. Invoke it manually using 'cmake --preset release' lz4/1.9.4: If your CMake version is not compatible with CMakePresets (<3.19) call cmake like: 'cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=/home/lst/.conan/data/lz4/1.9.4/_/_/build/ff2cd1780794ed7c7c274d576049f53de7fefeba/build/Release/generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0042=NEW -DCMAKE_POLICY_DEFAULT_CMP0077=NEW -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release' lz4/1.9.4: Aggregating env generators lz4/1.9.4: Calling build() lz4/1.9.4: Apply patch (official): Added namespace/prefix for xxHash functions by altering CMakeLists.txt lz4/1.9.4: CMake command: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/home/lst/.conan/data/lz4/1.9.4/_/_/build/ff2cd1780794ed7c7c274d576049f53de7fefeba/build/Release/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/home/lst/.conan/data/lz4/1.9.4/_/_/package/ff2cd1780794ed7c7c274d576049f53de7fefeba" -DCMAKE_POLICY_DEFAULT_CMP0042="NEW" -DCMAKE_POLICY_DEFAULT_CMP0077="NEW" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/home/lst/.conan/data/lz4/1.9.4/_/_/build/ff2cd1780794ed7c7c274d576049f53de7fefeba/src/build/cmake" CMake Deprecation Warning at CMakeLists.txt:13 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake. Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions. -- Using Conan toolchain: /home/lst/.conan/data/lz4/1.9.4/_/_/build/ff2cd1780794ed7c7c274d576049f53de7fefeba/build/Release/generators/conan_toolchain.cmake -- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC) -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF -- The C compiler identification is Clang 16.0.6 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/clang - skipped -- Detecting C compile features -- Detecting C compile features - done -- Performing Test CFLAG_Wall -- Performing Test CFLAG_Wall - Success -- Performing Test CFLAG_Wextra -- Performing Test CFLAG_Wextra - Success -- Performing Test CFLAG_Wundef -- Performing Test CFLAG_Wundef - Success -- Performing Test CFLAG_Wcast_qual -- Performing Test CFLAG_Wcast_qual - Success -- Performing Test CFLAG_Wcast_align -- Performing Test CFLAG_Wcast_align - Success -- Performing Test CFLAG_Wshadow -- Performing Test CFLAG_Wshadow - Success -- Performing Test CFLAG_Wswitch_enum -- Performing Test CFLAG_Wswitch_enum - Success -- Performing Test CFLAG_Wdeclaration_after_statement -- Performing Test CFLAG_Wdeclaration_after_statement - Success -- Performing Test CFLAG_Wstrict_prototypes -- Performing Test CFLAG_Wstrict_prototypes - Success -- Performing Test CFLAG_Wpointer_arith -- Performing Test CFLAG_Wpointer_arith - Success -- Performing Test CFLAG_W4 -- Performing Test CFLAG_W4 - Failed -- Configuring done (0.9s) -- Generating done (0.0s) -- Build files have been written to: /home/lst/.conan/data/lz4/1.9.4/_/_/build/ff2cd1780794ed7c7c274d576049f53de7fefeba/build/Release lz4/1.9.4: CMake command: cmake --build "/home/lst/.conan/data/lz4/1.9.4/_/_/build/ff2cd1780794ed7c7c274d576049f53de7fefeba/build/Release" '--' '-j24' [ 20%] Building C object CMakeFiles/lz4_static.dir/home/lst/.conan/data/lz4/1.9.4/_/_/build/ff2cd1780794ed7c7c274d576049f53de7fefeba/src/lib/lz4.c.o [ 40%] Building C object CMakeFiles/lz4_static.dir/home/lst/.conan/data/lz4/1.9.4/_/_/build/ff2cd1780794ed7c7c274d576049f53de7fefeba/src/lib/lz4hc.c.o [ 60%] Building C object CMakeFiles/lz4_static.dir/home/lst/.conan/data/lz4/1.9.4/_/_/build/ff2cd1780794ed7c7c274d576049f53de7fefeba/src/lib/lz4frame.c.o [ 80%] Building C object CMakeFiles/lz4_static.dir/home/lst/.conan/data/lz4/1.9.4/_/_/build/ff2cd1780794ed7c7c274d576049f53de7fefeba/src/lib/xxhash.c.o [100%] Linking C static library liblz4.a [100%] Built target lz4_static lz4/1.9.4: Package 'ff2cd1780794ed7c7c274d576049f53de7fefeba' built lz4/1.9.4: Build folder /home/lst/.conan/data/lz4/1.9.4/_/_/build/ff2cd1780794ed7c7c274d576049f53de7fefeba/build/Release lz4/1.9.4: Generated conaninfo.txt lz4/1.9.4: Generated conanbuildinfo.txt lz4/1.9.4: Generating the package lz4/1.9.4: Package folder /home/lst/.conan/data/lz4/1.9.4/_/_/package/ff2cd1780794ed7c7c274d576049f53de7fefeba lz4/1.9.4: Calling package() lz4/1.9.4: Copied 1 file: LICENSE lz4/1.9.4: CMake command: cmake --install "/home/lst/.conan/data/lz4/1.9.4/_/_/build/ff2cd1780794ed7c7c274d576049f53de7fefeba/build/Release" --prefix "/home/lst/.conan/data/lz4/1.9.4/_/_/package/ff2cd1780794ed7c7c274d576049f53de7fefeba" -- Install configuration: "Release" -- Installing: /home/lst/.conan/data/lz4/1.9.4/_/_/package/ff2cd1780794ed7c7c274d576049f53de7fefeba/lib/liblz4.a -- Installing: /home/lst/.conan/data/lz4/1.9.4/_/_/package/ff2cd1780794ed7c7c274d576049f53de7fefeba/include/lz4.h -- Installing: /home/lst/.conan/data/lz4/1.9.4/_/_/package/ff2cd1780794ed7c7c274d576049f53de7fefeba/include/lz4frame.h -- Installing: /home/lst/.conan/data/lz4/1.9.4/_/_/package/ff2cd1780794ed7c7c274d576049f53de7fefeba/include/lz4hc.h -- Installing: /home/lst/.conan/data/lz4/1.9.4/_/_/package/ff2cd1780794ed7c7c274d576049f53de7fefeba/share/man/man1/lz4.1 -- Installing: /home/lst/.conan/data/lz4/1.9.4/_/_/package/ff2cd1780794ed7c7c274d576049f53de7fefeba/lib/pkgconfig/liblz4.pc -- Installing: /home/lst/.conan/data/lz4/1.9.4/_/_/package/ff2cd1780794ed7c7c274d576049f53de7fefeba/lib/cmake/lz4/lz4Targets.cmake -- Installing: /home/lst/.conan/data/lz4/1.9.4/_/_/package/ff2cd1780794ed7c7c274d576049f53de7fefeba/lib/cmake/lz4/lz4Targets-release.cmake -- Installing: /home/lst/.conan/data/lz4/1.9.4/_/_/package/ff2cd1780794ed7c7c274d576049f53de7fefeba/lib/cmake/lz4/lz4Config.cmake -- Installing: /home/lst/.conan/data/lz4/1.9.4/_/_/package/ff2cd1780794ed7c7c274d576049f53de7fefeba/lib/cmake/lz4/lz4ConfigVersion.cmake lz4/1.9.4 package(): Packaged 1 file: LICENSE lz4/1.9.4 package(): Packaged 3 '.h' files: lz4hc.h, lz4frame.h, lz4.h lz4/1.9.4 package(): Packaged 1 '.a' file: liblz4.a lz4/1.9.4 package(): Packaged 1 '.cmake' file: conan-official-lz4-targets.cmake lz4/1.9.4: Package 'ff2cd1780794ed7c7c274d576049f53de7fefeba' created lz4/1.9.4: Created package revision ccdbff2d2d7dbe34a69e377d4ab789a8 flann/1.9.2: Copying sources to build folder flann/1.9.2: Building your package in /home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f flann/1.9.2: Generator txt created conanbuildinfo.txt flann/1.9.2: Calling generate() flann/1.9.2: Preset 'release' added to CMakePresets.json. Invoke it manually using 'cmake --preset release' flann/1.9.2: If your CMake version is not compatible with CMakePresets (<3.19) call cmake like: 'cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=/home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/build/Release/generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0042=NEW -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release' flann/1.9.2: Aggregating env generators flann/1.9.2: Calling build() flann/1.9.2: CMake command: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/build/Release/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f" -DCMAKE_POLICY_DEFAULT_CMP0042="NEW" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/src" CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake. Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions. -- Using Conan toolchain: /home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/build/Release/generators/conan_toolchain.cmake -- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC) -- Conan toolchain: C++ Standard 20 with extensions OFF -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF -- The C compiler identification is Clang 16.0.6 -- The CXX compiler identification is Clang 16.0.6 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/clang - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/clang++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found HDF5: /usr/lib/libhdf5.so;/usr/lib/libsz.so;/usr/lib/libz.so;/usr/lib/libdl.a;/usr/lib/libm.so (found version "1.14.3") -- Conan: Target declared 'LZ4::lz4_static' -- Install prefix: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f -- Build type: Release -- Building C bindings: ON -- Building examples: OFF -- Building tests: OFF -- Building documentation: OFF -- Building python bindings: OFF -- Building matlab bindings: OFF -- Building CUDA library: OFF -- Using OpenMP support: OFF -- Using MPI support: OFF -- Configuring done (0.5s) -- Generating done (0.0s) -- Build files have been written to: /home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/build/Release flann/1.9.2: CMake command: cmake --build "/home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/build/Release" '--' '-j24' [ 12%] Building CXX object src/cpp/CMakeFiles/flann_cpp_s.dir/flann/flann_cpp.cpp.o [ 25%] Building CXX object src/cpp/CMakeFiles/flann_cpp.dir/flann/flann_cpp.cpp.o [ 37%] Building CXX object src/cpp/CMakeFiles/flann_s.dir/flann/flann.cpp.o [ 50%] Building CXX object src/cpp/CMakeFiles/flann.dir/flann/flann.cpp.o In file included from In file included from /home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/src/src/cpp/flann/flann_cpp.cpp/home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/src/src/cpp/flann/flann_cpp.cpp::3030: : In file included from In file included from /home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/src/src/cpp/flann/flann.hpp/home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/src/src/cpp/flann/flann.hpp::4545: : In file included from In file included from /home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/src/src/cpp/flann/algorithms/all_indices.h/home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/src/src/cpp/flann/algorithms/all_indices.h::4343: : In file included from In file included from /home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/src/src/cpp/flann/algorithms/autotuned_index.h/home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/src/src/cpp/flann/algorithms/autotuned_index.h::3636: : /home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/src/src/cpp/flann/nn/index_testing.h/home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/src/src/cpp/flann/nn/index_testing.h::253253::1111:: warning: warning: variable 'p1' set but not used [-Wunused-but-set-variable]variable 'p1' set but not used [-Wunused-but-set-variable] float p1; float p1; ^ ^ In file included from /home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/src/src/cpp/flann/flann.cpp:31: In file included from /home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/src/src/cpp/flann/flann.h:603: In file included from /home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/src/src/cpp/flann/flann.hpp:45: In file included from /home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/src/src/cpp/flann/algorithms/all_indices.h:43: In file included from /home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/src/src/cpp/flann/algorithms/autotuned_index.h:36: /home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/src/src/cpp/flann/nn/index_testing.h:253:11: warning: variable 'p1' set but not used [-Wunused-but-set-variable] float p1; ^ In file included from /home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/src/src/cpp/flann/flann.cpp:31: In file included from /home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/src/src/cpp/flann/flann.h:603: In file included from /home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/src/src/cpp/flann/flann.hpp:45: In file included from /home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/src/src/cpp/flann/algorithms/all_indices.h:43: In file included from /home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/src/src/cpp/flann/algorithms/autotuned_index.h:36: /home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/src/src/cpp/flann/nn/index_testing.h:253:11: warning: variable 'p1' set but not used [-Wunused-but-set-variable] float p1; ^ 1 warning generated. 1 warning generated. [ 62%] Linking CXX shared library ../../lib/libflann_cpp.so [ 75%] Linking CXX static library ../../lib/libflann_cpp_s.a [ 75%] Built target flann_cpp_s [ 75%] Built target flann_cpp 1 warning generated. 1 warning generated. [ 87%] Linking CXX static library ../../lib/libflann_s.a [100%] Linking CXX shared library ../../lib/libflann.so [100%] Built target flann_s [100%] Built target flann flann/1.9.2: Package '545572333fa0aa4a66450c56b85ebf8f17c55f8f' built flann/1.9.2: Build folder /home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/build/Release flann/1.9.2: Generated conaninfo.txt flann/1.9.2: Generated conanbuildinfo.txt flann/1.9.2: Generating the package flann/1.9.2: Package folder /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f flann/1.9.2: Calling package() flann/1.9.2: Copied 1 file: COPYING flann/1.9.2: CMake command: cmake --install "/home/lst/.conan/data/flann/1.9.2/_/_/build/545572333fa0aa4a66450c56b85ebf8f17c55f8f/build/Release" --prefix "/home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f" -- Install configuration: "Release" -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/lib/cmake/flann/flann-config.cmake -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/lib/cmake/flann/flann-config-version.cmake -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/lib/cmake/flann/flann-targets.cmake -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/lib/cmake/flann/flann-targets-release.cmake -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/lib/pkgconfig/flann.pc -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/lib/libflann_cpp.so.1.9.2 -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/lib/libflann_cpp.so.1.9 -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/lib/libflann_cpp.so -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/lib/libflann_cpp_s.a -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/lib/libflann.so.1.9.2 -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/lib/libflann.so.1.9 -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/lib/libflann.so -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/lib/libflann_s.a -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/nn -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/nn/ground_truth.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/nn/index_testing.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/nn/simplex_downhill.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/mpi -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/mpi/queries.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/mpi/server.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/mpi/client.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/mpi/index.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/mpi/matrix.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/util -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/util/dynamic_bitset.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/util/sampling.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/util/cuda -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/util/cuda/result_set.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/util/cuda/heap.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/util/random.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/util/allocator.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/util/serialization.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/util/params.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/util/logger.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/util/any.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/util/cutil_math.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/util/timer.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/util/saving.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/util/lsh_table.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/util/object_factory.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/util/result_set.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/util/heap.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/util/matrix.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/general.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/algorithms -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/algorithms/kdtree_single_index.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/algorithms/all_indices.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/algorithms/autotuned_index.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/algorithms/hierarchical_clustering_index.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/algorithms/composite_index.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/algorithms/kdtree_index.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/algorithms/kdtree_cuda_builder.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/algorithms/nn_index.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/algorithms/lsh_index.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/algorithms/kdtree_cuda_3d_index.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/algorithms/kmeans_index.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/algorithms/center_chooser.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/algorithms/dist.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/algorithms/linear_index.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/flann.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/io -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/io/hdf5.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/flann.hpp -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/config.h -- Installing: /home/lst/.conan/data/flann/1.9.2/_/_/package/545572333fa0aa4a66450c56b85ebf8f17c55f8f/include/flann/defines.h flann/1.9.2 package(): Packaged 1 file: COPYING flann/1.9.2 package(): Packaged 45 '.h' files flann/1.9.2 package(): Packaged 1 '.hpp' file: flann.hpp flann/1.9.2 package(): Packaged 2 '.a' files: libflann_s.a, libflann_cpp_s.a flann/1.9.2: Package '545572333fa0aa4a66450c56b85ebf8f17c55f8f' created flann/1.9.2: Created package revision 689742e5248ff9c875448da27cebec20 Generator cmake_find_package created FindFlann.cmake Generator cmake_find_package created Findlz4.cmake Aggregating env generators ```
SpaceIm commented 9 months ago

compiler.runtime is no-op on Linux, it's just for VC runtime on Windows. So your issue is related to conan in general, not flann recipe specifically.

Jimbopython commented 9 months ago

Well I think flann adds the dependency to the c++ runtime in the package info wrongly. Boost for example does not add the dependency at all? Maybe it is wrong to add the dependency to the runtime in the first place?

SpaceIm commented 9 months ago

It's a workaround for C consumers, since flann is a C++ library with C API, and conan doesn't offer a way to add linker properties to CMake targets in files generated by CMakeDeps. So no it's not wrong fundamentally, flann depends on C++ standard library, what is wrong is that conan doesn't model static libcxx in profile.

Jimbopython commented 8 months ago

Sorry for the late response! I had a look at other libraries with c interface and C++ backend. czmq for example does not link c++ runtime, when building a static library. When doing so, one gets a linker error. I think it may be better for the user to run into this error, than silently linking dynamic c++ runtime.

The other way would be to fix conan itself, not ignoring static runtime on linux. How and where can i address this?

SpaceIm commented 8 months ago

There is an open issue in conan client repo: https://github.com/conan-io/conan/issues/15646