Skip to content

valgur/conan-buildenv-issue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repo is a minimal setup to reproduce a potential pitfall (or even a bug) when using package_type = "application" packages in a host context.

The setup is:

  1. mock-gcc defines self.buildenv_info.define("CC", "mock-gcc") etc. in its package_info method and exports some runtime libraries.
  2. package-a uses mock-gcc in both the build context (for the compiler) and host context (to create a dependency on the runtime libs) to build a library.
  3. package-b uses package-a as a library dependency to build an executable.

The expected result is for the runtime libraries in mock-gcc to become a transitive dependency for package-b and nothing more.

However, when mock-gcc is used without run=False in self.requires() in package-a, the buildenv environment variables get propagated into package-b's buildenv as well, which is not at all expected.

To reproduce this run:

./test.sh

Expected result in package-b:

CC=
CXX=
FC=

Actual result:

CC=mock-gcc
CXX=mock-gcc
FC=mock-gcc

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published