You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERROR: A/1.0: Error ingenerate() method, line 49
cd.generate()
ConanException: error generating context for'gtest/1.13.0': include is not absolute
Expected results : Package B should compile without any issue.
From my understanding, this happens whenever a shared library links with a static one. Compiling gtest as a shared library fixes the issue. However, gtest is usually compiled as a static library.
The issue also happens:
While using Boost as a dependency and compiled as a shared library. I get the same error with libbacktrace, even though it is not a direct dependency of my project (but used by Boost).
With any non direct dependency that I didn't specify to be built as shared ones.
Might be another bug : self.options does not affect packages added with test_requirements. (e.g: gtest)
The text was updated successfully, but these errors were encountered:
Todiq
changed the title
[bug] Packages linking with static libraries cannot be used in editable mode
[bug] Packages linked with static libraries cannot be used in editable mode
Mar 27, 2023
Thanks very much for your detailed report. I am having a look.
Quick side feedback:
Package names in Conan 2.0 must be all lowercase and contain more than 1 letter. This doesn't launch an error at the moment for editables, but it might launch it at anytime. You can see the error if you try to conan create
The required_conan_version = ">=1.50.0" is not a class attribute, in order to work you need to put it outside the class, at the file level.
Your reproducible case really helped to reproduce, thanks very much again for such a reduced and clean repro case.
Indeed a bug, the deps of "editable" packages could be skipped, I am proposing a fix for next 2.0.3 in #13544
Environment details
Steps to reproduce
Create a package A in a folder
Copy the following conanfile.py
Copy the following CMakeLists.txt
Copy the following source file a.cpp
Run the following command :
A libtest.so is successfully created in build/Debug. It is linked with a static version of gtest.
Mark the reciped as editable with
conan editable add .
The command returns
Create a package B in another folder
Copy the following conanfile.py
Copy the following CMakeLists.txt
Copy the following source file b.cpp
Run the command
The following error shows up:
Expected results : Package B should compile without any issue.
From my understanding, this happens whenever a shared library links with a static one. Compiling gtest as a shared library fixes the issue. However, gtest is usually compiled as a static library.
The issue also happens:
Might be another bug : self.options does not affect packages added with test_requirements. (e.g: gtest)
The text was updated successfully, but these errors were encountered: