Conan: system_requirements files not shared between host/docker

Created on 20 Oct 2018  路  8Comments  路  Source: conan-io/conan

I have an application depends on a library libA. libA's recipe has a system_requirements() method which installs a system library. libA's artifact is stored remotely. When I built the applications, it failed to find the system library installed by the libA's recipe.

Is system_requirements() transitive? If so, how to specify in the conanfile.txt or conanfile.py of application?
By the way, I don't want to build libA from source.

low medium feature

Most helpful comment

Could a conan remove --system_reqs help? #2262 @bilke @yangcha

That will be great.

All 8 comments

In fact, this is caused by the same reason in https://github.com/conan-io/conan/issues/2262

Everytime libA is installed the system requirements method will be called if it hasn't installed before so I don't understand exactly what is the issue. What do you mean with When I built the application? The app is built in a different computer, right? Is it not called when doing the conan install?

Actually I run the build inside Docker container and the local cache is stored on a persistent volume. So rerun the build of the application will not install system package anymore.
It is a same problem as issue #2262. When I created this issue, I misunderstood the way how system_requirements() works.

I think it is better to store system_reqs.txt alongside with systems, so local cache can be freely shared among different nodes.

If system_reqs.txt are stored in the user鈥檚 home directory instead of CONAN_USER_HOME, then problem will be perfectly resolved.

I wouldn't recommend sharing the cache with the containers, to be honest. It can be problematic with the permissions of the storage and for example with the system requirements. I would say it more solid to communicate with a conan server (or better Artifactory community edition)

I wouldn't recommend sharing the cache with the containers, to be honest. It can be problematic with the permissions of the storage and for example with the system requirements. I would say it more solid to communicate with a conan server (or better Artifactory community edition)

I don't think permission is a big issue, because Docker can use -u to set the user/group.
The problem with conan server (or Artifactory) is that they can be slow to access. If the local cache can be shared locally, that would be a big plus.
By the way, all these system_reqs.txt are important for deploy the applications to target system. It would be nice to export all the system_reqs.txt in deploy() method.

Could a conan remove --system_reqs help? #2262 @bilke @yangcha

Could a conan remove --system_reqs help? #2262 @bilke @yangcha

That will be great.

Was this page helpful?
0 / 5 - 0 ratings