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.

How to separate the build and install steps

See original GitHub issue

Right now:

catkin config --install-space /opt/ros/indigo
catkin build
...
catkin --install
sudo catkin build

Gets you this:

Error: Attempting to build a catkin workspace using build space: "..." but that build space's 
most recent configuration differs from the commanded one in ways which will cause problems.
Fix the following options or use `catkin clean -b` to remove the build space: 
 - install: False (stored) is not True (commanded)

In ros-install-osx, the desire not to run the entire build as root is dealt with by simply having /opt/ros/foo owned by the user rather than root, so everything is as the user (following the Homebrew model). But there are packaging and other use cases where separating the build and install steps is desirable. Is there truly something dangerous being blocked here, or does is it getting caught in a dragnet of potentially dangerous behaviours?

If the latter, can we put in an exemption that allows running just the install step on an already-built workspace?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
wjwwoodcommented, Dec 1, 2015

Well it correctly warns you that building it without --install and then re-building it with --install may fail in unexpected ways. The first time goes like this:

  • build pkg A without installing it
  • source devel space of A
  • build pkg B (which depends on A) without installing it
  • etc…

The second time (if it let you) you’d get:

  • build pkg A, installing this time
  • source install space of A
  • build pkg B (which depends on A), installing this time
  • etc…

The problem with that is pkg B may not rebuild it’s binaries and libraries since no build configs or source files changed (even if you force a re-run of CMake), but the libraries it should link against have changed (which would break usage of RPATH for example), and ever generated code might reference the wrong thing (devel space of previous packages rather than their install spaces). So it’s best, when changing that option, to rebuild everything after cleaning.

The root issue, as I see it, is that you want to introduce the --install after building so you can do that as root, but that’s just not a good idea in my opinion because any other files created by the tool will then be owned by root. make does a pretty good job of avoiding this, but it’s still problematic with tools like pip and others.

0reactions
foodtoothcommented, Dec 27, 2018

Hi, is there anything new about this issue, or do I have to implement that “–sudo-install” option?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Build Stairs (with Pictures) - wikiHow
1. Measure the height of the area where you will install the stairs. This is also called the total rise. If you don’t...
Read more >
How to Build Deck Stairs - The Family Handyman
1. Picture a stair slope in your mind to estimate about a 40-degree slope and guess at a landing point. Rest a straight board...
Read more >
Build from source - TensorFlow
Build a TensorFlow pip package from source and install it on Ubuntu Linux and macOS. While the instructions might work for other systems,...
Read more >
How To... | TeamCity On-Premises Documentation - JetBrains
The necessary steps to update the Java installation depend on the ... To configure automatic start of a TeamCity build agent, see the ......
Read more >
Installing Gradle - Gradle User Manual
Prerequisites; Installing with a package manager; Installing manually; Verifying installation; Next steps. You can install the Gradle build tool on Linux, ...
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