Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Filter by
Sorted by
Tagged with
1 vote
0 answers
69 views

Problem to set up conan project so that library can be found in search path

I have this project structure: MaterialStack/ ├─ CMakeLists.txt ├─ libraries/ │ └─ material_data_lib/ │ ├─ CMakeLists.txt │ ├─ conanfile.py │ └─ src/...
Suslik's user avatar
  • 1,121
0 votes
0 answers
54 views

Why does conan info require a lockfile?

I am using conan 1.66.0 and when I try to run conan info conanfile.py -pr:h $host_profile -pr:b $build_profile I get this error: ERROR: Missing lockfile in: /path/to/conanfile.py Doing first conan ...
evolved's user avatar
  • 2,290
0 votes
1 answer
170 views

How to set exact MSVC toolset version in Conan2 + cmake . Build using ninja

I need to set up conan 2 + cmake C++ project build so it will always use VCToolsVersion "14.40.33807" when several toolsets are installed on the desktop.
SparcU's user avatar
  • 764
0 votes
0 answers
92 views

'There is a cycle/loop in the graph' — what causes it?

I am building a package that depends on two tools: toola and toolb. These tools may depend on different CMake packages. In my package recipe, the tool dependencies are declared as: tool_requires = ( ...
Pavlo Rudenko's user avatar
5 votes
0 answers
341 views

Generate Python wheels with conan

I want to generate Python wheels for my project (the last step before to put them on PyPI). I use conan for that. CMake found system dependencies but not conan dependencies for Ceres, Eigen and ...
P'tit Ju's user avatar
  • 143
0 votes
1 answer
52 views

undefined reference to namespace::function?

I am trying to explore how to work with Conan through CLion, CMake and everything and so far I have a main project which depends on fmt/10.1.1 and from a personal library. What am I doing wrong here, ...
Gianmario Signori's user avatar
0 votes
1 answer
106 views

Try to use `tools.build:skip_test` for a conan project

I have a conan project which provides CMake features. In this project I want to test these features through C++ programs. When I do a conan create ., I want the tests to be done only with an option ...
arapelle's user avatar
0 votes
0 answers
96 views

Using Conan v-2.x built packages of one build type in a cmake project building using another build type

When using a single configuration environment of UnixMakeFiles, and Conan 1.x, it was easy to specify a build type in the Conan profile, and use the packages in cmake using cmake generator and the ...
Gil's user avatar
  • 11
0 votes
0 answers
111 views

Conan Header Not Found: Header Exists in Package but Fails to Compile in CMake Project

I'm working with a C++ project using Conan for dependency management and CMake as the build system. I created a new Conan package for a static library called mylib. The header files are located under ...
Rachel's user avatar
  • 45
1 vote
2 answers
150 views

Unable to build conan package dependencies [GTest] with tool_requires(cmake)

I have such simple package in conanfile.py in root of my project that looks like this: from conan import ConanFile from conan.tools.cmake import CMakeToolchain, CMakeDeps, CMake, cmake_layout class ...
DoktorovAV's user avatar
0 votes
0 answers
391 views

conan create throws compiler.cppstd 14 vs 17 compatibility error

Task is to generate static libraries out of the SDKs we currently have for various OSs. I have generated the artifacts for my project, use it to run a conan install and cmake in the build_release ...
rr sruji's user avatar
0 votes
1 answer
60 views

Cmake with Conan Multiple Includes Retain Path

I am trying to create a library or possibly better to make two libraries. The file structure is below (with generic names). I am trying to get the ExampleProject to be able to include messageA.h, ...
DannyG's user avatar
  • 177
1 vote
1 answer
121 views

Build Conan 2 packages with LTO

I want to build from source Conan 2 packages with LTO using GCC and Unix Makefiles generator. I'm building packages with conan install . --build=missing. LTO (Link Time Optimization) can be enabled in ...
Igor Mikushkin's user avatar
1 vote
1 answer
231 views

Unable to use Boost 1.87.0 with Conan + CMake + CLion

I'm trying to add the Boost library to my project. I'm using CLion for C++, and CMake, while also having a requirement of using Conan. I've tried both Conan with CLI and the Conan Plugin, but both ...
Anton Vasserman's user avatar
0 votes
1 answer
232 views

Conan profile: different compiler flags per build type

I have the following Conan default profile: [settings] build_type=Debug arch=x86_64 compiler=gcc compiler.cppstd=gnu23 compiler.libcxx=libstdc++11 compiler.version=14 os=Linux [conf] tools.build:...
Igor Mikushkin's user avatar
2 votes
1 answer
112 views

Make conan install print underlying compiler commands like g++ when building from source

I'd like conan install . --build=missing to print the underlying compiler commands when building from source. Increasing the verbosity level (e.g. -vvv) doesn't help. I suspect I need to pass ...
Igor Mikushkin's user avatar
0 votes
0 answers
140 views

How to distributed C++ shared libraries with Conan?

To give a brief overview of my situation. I have a monorepo consisting of 4 libraries and N executables using these libraries. I am using Conan 2.x with the incubating workspaces feature to manage to ...
IvanYanakiev's user avatar
0 votes
0 answers
60 views

Is there any advanced use of the autogenerated .bat/.sh generator conan files(e.g.: conanbuild.bat, conanbuildenv-release-x86_64.bat)?

I am using conan version 2.12 and this command: conan install -r --output-folder= --build=missing [requires] zlib/1.2.13 [tool_requires] cmake/3.22.6 make/4.4.1 ninja/1.12.1 [generators] CMakeDeps ...
Arkajyoti Bhattacharyay's user avatar
0 votes
1 answer
81 views

How to set a non-persistent git config?

i got a question mainly about git config. I hope you can help me. Abstract problem: I want to set a non-persistent git config that is applied to all git commands until I reboot/leave terminal session (...
kuga's user avatar
  • 1,867
0 votes
0 answers
253 views

Conan Fails to Build Boost

I am new to conan, I am trying to integrate it to my project through a conanfile.py My conanFile.py is this from conan import ConanFile from conan.tools.cmake import cmake_layout class ProjectName(...
chrisake's user avatar
0 votes
0 answers
188 views

In conan, how do I set the target version of Windows to build for

I need to build a package, with conan (with which I have limited experience), and I need to set the target OS version to Windows 10 1809. I've been unable to find a straightforward way to express this....
acm's user avatar
  • 12.8k
0 votes
1 answer
194 views

How to use Conan-managed tools from `tool_requires` in CMake?

C++ project on Linux using Conan (v2) for dependencies. When using the Conan package libavrocpp/1.11.3 in conanfile.py: def requirements(self): self.requires("libavrocpp/1.11.3") def ...
David Razzetti's user avatar
0 votes
0 answers
44 views

Control pipeline execution order in gitlab CI using conan to determine order

I have a private gitlab instance with a lot of repositories for conan packages (70+). Developers will often change multiple repositories in a single CR. I'm trying to figure out how to control the CI ...
Trevor's user avatar
  • 1,445
1 vote
1 answer
120 views

How do I consume a dependent C library from a Conan package registry using Conan and Cmake in a CI/CD pipeline?

I have two C libraries, where Lib_a.a has a dependency on lib_b.a I am developing a GitLab CI/CD pipeline that will download from the package registry and link to lib_b.a when building lib_a.a So far, ...
Dawn555's user avatar
  • 113
1 vote
0 answers
137 views

Building a program with OpenCV using Conan fails on Linux

I am trying to build my project using Conan. My project use OpenCV. I am using Conan version 2.12.2. I ran the following command : sudo conan install .. --build=missing -of . -s:h compiler.cppstd=...
Karim Dhrif's user avatar
0 votes
1 answer
81 views

conan new template project build fails with header file not found

Following their template, I have: conan new cmake_lib -d name=mlpackmsvc -d requires=mlpack/4.4.0 followed by conan build . This ends up with error: C:\test\src\mlpackmsvc.cpp(3,10): error C1083: ...
One_Cable5781's user avatar
0 votes
0 answers
149 views

cross compiling ffmpeg with conan fails: x86_64-w64-mingw32-ld: unrecognised emulation mode: 64

I'm trying to install ffmpeg (and some other libraries, but ffmpeg alone fails too) with conan to cross compile from linux (ubuntu) to windows. Conan throws an error on Running configure, inside build(...
ovni jeroqui's user avatar
1 vote
0 answers
64 views

How is case sensitivity handled when using cmake-conan Linux

I have a C++ project which I built and run successfully on Windows using CMake, conan, and cmake-conan integration. When I try to build the same project on Linux (OracleLinux 9), I get the following ...
Yaw Sparrow's user avatar
0 votes
1 answer
242 views

Access files in the directory running the conan create command

Trying to create a conan (v2.11) package from a zip archive to store in a gitlab conan registry. However in my conanfile.py I can't seem to copy or access files from the directory where I'm running ...
simgineer's user avatar
  • 1,926
0 votes
0 answers
112 views

Create python packages with C++ bindings with CMake and Conan

I have a C++ project with some Python bindings created using pybind11. The C++ code has some external dependencies which I fetch using Conan, and I use the conan generated CMake presets to build the ...
jjcasmar's user avatar
  • 1,757
0 votes
0 answers
177 views

How can I get my Conan recipe to require a certain version of CMake?

I'm updating a Conan recipe of a library of mine. This library now requires a relatively new version of CMake to run. How do I "tell" Conan - or at least, the PR action checkers on github....
einpoklum's user avatar
  • 137k
0 votes
1 answer
200 views

CMake Error: "Generator MinGW Makefiles does not support platform specification, but platform x64 was specified."

build.bat: @echo off setlocal if not exist build ( mkdir build ) pushd build conan install .. --output-folder=. --build=missing cmake .. -G "MinGW Makefiles" -DCMAKE_TOOLCHAIN_FILE=...
itsjames212's user avatar
0 votes
0 answers
147 views

How can I stop the Conan 2.0 CMakeDeps generator setting INTERFACE_LINK_DIRECTORIES?

I'm installing dependencies with Conan 2.0, specified in my conanfile.py. I don't want the cmake config files set INTERFACE_LINK_DIRECTORIES on any of the targets. As a first step I tried to disable ...
tamas.kenez's user avatar
  • 7,879
0 votes
0 answers
105 views

Comping `gcc` for different host/target CPU

I am on a system where I need to compile gcc-14 and clang-19 from scratch. The host CPU has the characteristics [1] and the target has [2]. So far my strategy to compile gcc was as follows: # git ...
Sito's user avatar
  • 554
0 votes
0 answers
116 views

Packaging Proto files in a Conan package for CMake use

My team is attempting to package a collection of .proto files into a shared library for use in multiple other repositories. Currently, this is done by compiling them into a C++ static library that the ...
Matt Soucy's user avatar
0 votes
0 answers
49 views

Why no profiler.h in the conan gperftools latest versions?

Starting from version 2.11, the file gperftools/profiler.h disappears. https://conan.io/center/recipes/gperftools?version=2.16 How to profile the application of recent versions if I want to install a ...
Leonid's user avatar
  • 115
1 vote
0 answers
166 views

Fail to use boost 1.83 installed by Conan2 on C++ based executable, due to missing header 'cstddef'

I've got a project that uses boost library compiled and installed on my macOS build machine using conan2 under CMake. I've managed to reproduce the problem using the following minimal code. my project ...
Zohar81's user avatar
  • 5,214
0 votes
0 answers
304 views

Setting boost compilation options in conanfile.py

I've got the following structure of conanfile.py for the purpose of installing boost in my macOS build machine. Apparently some boost components are not supported in this platform and should be ...
Zohar81's user avatar
  • 5,214
2 votes
0 answers
392 views

How to run conan install to build one package with a different compiler.cppstd

I'm building a number of packages with conan install, the packages are defined in a conanfile.py. One of the packages needs to be built with a different compiler.cppstd setting than the rest. How can ...
tamas.kenez's user avatar
  • 7,879
0 votes
1 answer
191 views

Conan2 : Loading environment variables from bash script in Cmake

In Conan2, there are new autogenerated files that contains useful variables like the package location. In macOS, the file is called conanbuild.sh which calls a more specific file named conanbuildenv-...
Zohar81's user avatar
  • 5,214
1 vote
2 answers
128 views

"'.../src/onnx/gen_proto.py' is not a Conan command" when building onnx

I have the following conanfile.py in my project on which I run the command conan install . --output-folder=build --build=missing -v. import os from conan import ConanFile class ProjectRecipe(...
Yaw Sparrow's user avatar
0 votes
1 answer
49 views

Does a Conan installation from a system installer still require an installation from pip to be able to work with a conanfile.py?

I have installed conan using a system installer (.exe) on Windows and it works perfectly when I install packages using a conanfile.txt. However I get the following error when I try to install packages ...
Yaw Sparrow's user avatar
0 votes
1 answer
93 views

How to limit CMake components' propagated dependencies

I would like to optimize my CMake project, which uses Conan as dependency management tool. It is an executable, which depends on few Conan libraries. However, the need for sharing some headers and ...
archetypiarz's user avatar
4 votes
0 answers
1k views

Artifactory-cpp-ce - "Unsupported operation: federated" after upgrade to latest version

After I upgraded my artifactory-cpp-ce (conan version) from 7.10.6 to 7.98.8, I started seen a new error in the logs that looks like: 2024-11-15T12:27:58.199Z [jfrt ] [ERROR] [1c6a13511b3b7426] [c.e.m....
Forbinn's user avatar
  • 85
0 votes
0 answers
90 views

Linker Error and wrong target architecture while building OpenSSL for Android

I want to build OpenSSL for Android, as a dependency of my C++-application which is built via Conan. The conan build (conan install /.../my_project -pr:h android34-armv8-clang-17-c++_shared -pr:b ...
simonsays's user avatar
  • 101
1 vote
0 answers
63 views

I'm getting a conan "FileNotFoundError"

I'm using conan 1.55.0 to package my project and upload it to the Artifactory. I'm running this command: 'conan export-pkg -f <conan_file_path.py> <artifactory recipe>' My conan.py ...
R.K's user avatar
  • 11
1 vote
1 answer
441 views

Tell conan to use my installation of cmake instead of compiling one from scratch

For my project I'm using conan version 2.5.0, I'm also working on NixOS. After setting up everything and trying to install the depedencies of my project, I found out that conan compiles and tries to ...
shackra's user avatar
  • 405
0 votes
0 answers
174 views

Visual Studio Code + Conan 1: includePath not resolving third party libraries

I have jumped into an existing project where conan 1 and cmake are used and I am trying to get visual studio code setup in a way that code navigation works as best as it could. conan 1 is deprecated ...
ftb's user avatar
  • 69
0 votes
1 answer
417 views

How does conan determine binary compatibility between different compiler versions?

I am trying to install expat/2.5.0 using the command python -m conans.conan install expat/2.5.0@ -pr <profile> where my profile is identical in both cases but only using, compiler.version=193 ...
user12388651's user avatar
0 votes
1 answer
624 views

How to link gtest with cmake and conan?

I'm trying to use gtest in my project. I'm installing gtest with conan 2.x. There is my conanfile.txt: [requires] gtest/1.15.0 [generators] CMakeDeps CMakeToolchain then I'm doing "conan ...
Ivan Petrov's user avatar

1
2 3 4 5
16