Details
-
User Story
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
None
-
None
Description
I followed instructions from qtbase/cmake/README.md to build developer build:
cmake -GNinja -DFEATURE_developer_build=ON {path to source directory} cmake --build .
Once build has finished, If I retype "cmake --build ." It again does something with 2000+ files. When that finished, if I type "ninja", it again does something with 3000+ files.
Moving source and build dir to paths that do not contain symlinks, solved the issue.
I observed this on Ubuntu 20.04 (freshly installed system, with cmake version 3.19.1) and Ubuntu 18.04, which has seen a better days.
I suggest to bail out with an error message if symlinks are detected in the paths. To support paths with symlinks would require adding an extra setup in CI, otherwise this would always regress. In other cmake projects I have noticed that we need to be careful how we access paths in cmake commands - get_filename_component(.. REALPATH) seem to be important.
Also moc has some issues with handling symlinked paths. The issue could be reproduced reliably at some point in my project, but at some point it "resolved" itself, probably as random side-effect.
Attachments
For Gerrit Dashboard: QTBUG-89559 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
327393,2 | CMake: Bail out if the build dir is symlinked | dev | qt/qtbase | Status: MERGED | +2 | 0 |