question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[bug] Dependencies are now forced to be built from source

See original GitHub issue

Hello,

Thank you for taking the time to read my issue.

Context

We have been using Conan to build packages for our CPP projects (with GitHub Actions), and since today, we had no problem.

We have implemented a CI with Conan and GitHub Actions, in order to trigger a build every time a commit is pushed on our main branches.

Yesterday, we merged a pull request that triggered a build for one of our project, and the build lasted for around 1 minute. We have added a cache for dependencies, so 1 minute is a normal time for this project.

Problem

Today, we decided to re-run the build on GitHub Actions manually for the same commit, and this time it took around 4 minutes. By reading the logs, we found out that our dependencies were forced to be built from source.

After running other projects that use the Conan and GitHub Actions integration, all of our builds are taking way too much time, because they are forced to build our dependencies from source (from 3 minutes to 25 minutes).

Additional test to confirm the problem

We decided to run a new docker container with an Ubuntu 18.04 image, and tried to build one of our projects.

Here is a part of the log we got:

protobuf/3.9.1@bincrafters/stable: Forced build from source
srp/0.19@uavia/stable: Forced build from source
boost/1.69.0@conan/stable: Forced build from source

Dependencies are also forced to be built from source, even if they are in the ./conan/data.

Environment Details

  • Operating System+version: Ubuntu 18.04 (under GitHub Actions)
  • Compiler+version: GCC 7
  • Conan version: 1.26
  • Python version: 3.7.7

Logs

(1) The build from yesterday on GitHub Actions printed this:

srp/0.19@uavia/stable: Forced build from source
Installing package: srp/0.19@uavia/stable
Requirements
    protobuf/3.9.1@bincrafters/stable from 'bincrafters' - Cache
    srp/0.19@uavia/stable from local cache - Cache
Packages
    protobuf/3.9.1@bincrafters/stable:d351525cc53ebe68279edf1978846402420066e7 - Cache
    srp/0.19@uavia/stable:ef98836af63d5f06c8561fdb9e7f89b1f6472869 - Build
Build requirements
    protobuf/3.9.1@bincrafters/stable from 'bincrafters' - Cache
    protoc_installer/3.9.1@bincrafters/stable from 'bincrafters' - Cache
Build requirements packages
    protobuf/3.9.1@bincrafters/stable:d351525cc53ebe68279edf1978846402420066e7 - Skip
    protoc_installer/3.9.1@bincrafters/stable:c0c1ef10e3d0ded44179e28b669d6aed0277ca6a - Cache

Installing (downloading, building) binaries...
protobuf/3.9.1@bincrafters/stable: Already installed!
protoc_installer/3.9.1@bincrafters/stable: Already installed!

(2) And the build today:

protobuf/3.9.1@bincrafters/stable: Forced build from source
srp/0.19@uavia/stable: Forced build from source
protoc_installer/3.9.1@bincrafters/stable: Forced build from source
Installing package: srp/0.19@uavia/stable
Requirements
    protobuf/3.9.1@bincrafters/stable from 'bincrafters' - Cache
    srp/0.19@uavia/stable from local cache - Cache
Packages
    protobuf/3.9.1@bincrafters/stable:d351525cc53ebe68279edf1978846402420066e7 - Build
    srp/0.19@uavia/stable:ef98836af63d5f06c8561fdb9e7f89b1f6472869 - Build
Build requirements
    protobuf/3.9.1@bincrafters/stable from 'bincrafters' - Cache
    protoc_installer/3.9.1@bincrafters/stable from 'bincrafters' - Cache
Build requirements packages
    protobuf/3.9.1@bincrafters/stable:d351525cc53ebe68279edf1978846402420066e7 - Build
    protoc_installer/3.9.1@bincrafters/stable:c0c1ef10e3d0ded44179e28b669d6aed0277ca6a - Build

Installing (downloading, building) binaries...
Downloading conan_sources.tgz
protobuf/3.9.1@bincrafters/stable: Configuring sources in /home/runner/.conan/data/protobuf/3.9.1/bincrafters/stable/source

protobuf/3.9.1@bincrafters/stable: Copying sources to build folder
protobuf/3.9.1@bincrafters/stable: Building your package in /home/runner/.conan/data/protobuf/3.9.1/bincrafters/stable/build/d351525cc53ebe68279edf1978846402420066e7
protobuf/3.9.1@bincrafters/stable: Generator cmake created conanbuildinfo.cmake
protobuf/3.9.1@bincrafters/stable: Calling build()

Question

Why our dependencies are now forced to be built from source, instead of using the already installed versions ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
maxime-uaviacommented, Jun 22, 2020

I updated the CPT package to 0.33.2 and it works like a charm, thank you !

1reaction
patpircommented, Jun 19, 2020

Hi, @maxime-uavia are you using Conan Package Tools in your build?

Because we are seeing the same problem, but only with the latest version of Conan Package Tools (0.33.1), and it doesn’t happen after switching back to Conan Package Tools 0.33.0.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Xcode 13.3 cycle in dependencies between targets
So using latest Xcode 13.3 on an Apple Silicon MacBook I get a compile error the 2nd time and every time there after...
Read more >
Package built with dependency on another package that uses ...
Checking out api-core and building now works fine and the relevant source code is generated and included in the Core target.
Read more >
Missing Maven dependencies in Eclipse project - Stack Overflow
The last solution if all fails, is to manually import the .jar files needed by your project. Right click the project Properties ->...
Read more >
Authoring Tasks - Gradle User Manual
Task has actions and Gradle has determined they should be executed as part of a build. Task has no actions and some dependencies,...
Read more >
Maven Error: Failed to collect dependencies - When trying to ...
It's possible your dependencies are corrupted in your local maven cache, you could try forcing an update of the maven dependency cache -...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found