Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating cobra version requires manual deletion of build artifacts #13

Closed
Ronoman opened this issue Nov 1, 2022 · 2 comments
Closed

Comments

@Ronoman
Copy link

Ronoman commented Nov 1, 2022

When changing the REV field in CMakeLists:14 and running colcon build --packageg-up-to cobra_vendor, if you have previously built a different version of cobra, the following error is returned:

<other packages building>...

Starting >>> cobra_vendor
--- stderr: cobra_vendor                                
fatal: bad object aa397fb86a91cd320def1f6d126c55290222b582
From https://github.com/nimble-code/cobra
   a0990d4..aa397fb  master     -> origin/master
error: Your local changes to the following files would be overwritten by checkout:
        bin_linux/cobra
        bin_linux/cwe
        bin_linux/find_taint
        bin_linux/icobra
        bin_linux/scope_check
Please commit your changes or stash them before you switch branches.
Aborting
CMake Error at /home/spaceros-user/src/spaceros/build/cobra_vendor/cobra-4.1/tmp/cobra-4.1-gitupdate.cmake:144 (message):
  Failed to checkout tag: 'aa397fb86a91cd320def1f6d126c55290222b582'


make[2]: *** [CMakeFiles/cobra-4.1.dir/build.make:96: cobra-4.1/src/cobra-4.1-stamp/cobra-4.1-update] Error 1
make[1]: *** [CMakeFiles/Makefile2:78: CMakeFiles/cobra-4.1.dir/all] Error 2
make: *** [Makefile:129: all] Error 2
---
Failed   <<< cobra_vendor [2.08s, exited with code 2]

I'm unsure how to do a force checkout in ExternalProject_Add, Google is failing me.

@Ronoman
Copy link
Author

Ronoman commented Nov 1, 2022

Possible solution would be to update the VER flag, so that ExternalProject_Add checks out the project into a new directory. Seems like a bit of a hack instead of a true fix. @mjeronimo thoughts?

@mjeronimo
Copy link

@Ronoman After changing the REV field, I would just remove the spaceros/build/cobra_vendor directory to get rid of previous build artifacts. Not the most elegant solution, but there isn't a "colcon clean".

FYI - I found a discussion on the 'clean' topic: colcon/colcon-core#37

@Ronoman Ronoman closed this as completed Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants