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

Calling 'make install' sometimes triggers cmake build stage #1

Open
knoepfel opened this issue Oct 28, 2021 · 3 comments
Open

Calling 'make install' sometimes triggers cmake build stage #1

knoepfel opened this issue Oct 28, 2021 · 3 comments
Assignees
Labels
support Support requested on code usage or environment

Comments

@knoepfel
Copy link
Contributor

This issue has been migrated from https://cdcvs.fnal.gov/redmine/issues/26369 (FNAL account required)
Originally created by @calcuttj on 2021-10-22 00:01:28


Normally when developing code, I just use make install to recompile code rather than starting from mrb i. Seemingly with the change to mrb 5, calling make install sometimes invokes cmake. This was not the case before the update to mrb, and slows down development time. Is this intended?

See below for examples of cmake output resulting from calling make

build_slf7.x86_64$ make install -j32
-- GLOB mismatch!
-- GLOB mismatch!
-- GLOB mismatch!
-- GLOB mismatch!
-- GLOB mismatch!
...
-- GLOB mismatch!
-- Global CMAKE__FLAGS* variables in the current scope () for CMAKE_BUILD_TYPE = RelWithDebInfo:
--   CMAKE_CXX_FLAGS = 
--   CMAKE_CXX_FLAGS_DEBUG = -g
--   CMAKE_CXX_FLAGS_INIT =   
--   CMAKE_CXX_FLAGS_MINSIZEREL = -Os -DNDEBUG
--   CMAKE_CXX_FLAGS_RELEASE = -O3 -DNDEBUG

@knoepfel knoepfel added the support Support requested on code usage or environment label Oct 28, 2021
@knoepfel
Copy link
Contributor Author

Comment by @PetrilloAtWork on 2021-10-22 02:18:24


I have seen this behaviour as well, not really clear what triggers it. Even the sequence make ; make install can.

@knoepfel
Copy link
Contributor Author

Comment by @chissg on 2021-10-26 21:25:45


This is intended. Since cetbuildtools 8 / cetmodules 2, CMake can be told to check at build or install time whether particular GLOB expressions have changed since they were last generated, and re-run CMake if so. Previously, one was vulnerable to a hysteresis: if doing a build/install from scratch an (e.g.) install_source() might miss a generated source file because it hadn't been generated at the time the list was made. One usually didn't see this if using buildtool (or mrb b) because it always runs CMake first unless specifically told not to.

We will be gradually reducing the frequency of these CMake re-runs by swapping cetmodules' install_X functions over to using mechanisms other than GLOB where feasible. In the meantime, please avoid using GLOB explicitly if you can. CMake recommends against this practice for exactly this reason.

@knoepfel knoepfel added this to Issues Oct 29, 2021
@PetrilloAtWork
Copy link

This is interesting. So are you saying that in our CMake there is at least one generated source? (meaning, a source that is not in the repository but it's rather created on the spot when running CMake) I don't remember our ICARUS code having any generated code — I may be forgetting something though. There is such a thing in sbndcode (RepositoryTag).
It would be useful if the warning about changed glob could say at least which glob has a changed match.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Support requested on code usage or environment
Projects
Status: No status
Development

No branches or pull requests

3 participants