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

Build w/o sudo & Use cmake --install #11

Merged
merged 1 commit into from
Mar 4, 2022
Merged

Conversation

ax3l
Copy link
Owner

@ax3l ax3l commented Mar 4, 2022

Use the CMake 3.15 --install switch.

Using --build . --target install under sudo permissions in combination with compiler launchers such as ccache seems to mess with the artifacts permissions in ~/.ccache. This is problematic for the next build (not the current one), receiving errors of the kind:

ccache: error: Failed to create temporary file for /home/runner/.ccache/d/9/53tapk54tlnvm542rfclg37rcd02bjkM.tmp.pM2AVF: Permission denied

Update: Ah, most likely, this is because we did not split build & install step before. Nonetheless, let's also use the new API and install independent of the build system :)

Refs.:

The cmake(1) command gained a new --install option. This may be used after building a project to run installation without using the generated build system or the native build tool.

@ax3l ax3l added the bug Something isn't working label Mar 4, 2022
@ax3l ax3l force-pushed the cmake-install-switch branch 2 times, most recently from 2853b1e to 824c369 Compare March 4, 2022 02:18
@ax3l ax3l changed the title Use cmake --install Build w/o sudo & Use cmake --install Mar 4, 2022
@ax3l ax3l enabled auto-merge March 4, 2022 02:26
Use the CMake 3.15 `--install` switch.

Using `--build . --target install` under `sudo` permissions in
combination with compiler launchers such as `ccache` seems to mess
with the artifacts permissions in `~/.ccache`.

Refs.:
- https://cmake.org/cmake/help/v3.15/release/3.15.html#command-line

```
The cmake(1) command gained a new --install option. This may be used
after building a project to run installation without using the
generated build system or the native build tool.
```
@ax3l ax3l merged commit 15160c4 into master Mar 4, 2022
@ax3l ax3l deleted the cmake-install-switch branch March 4, 2022 03:03
@ax3l
Copy link
Owner Author

ax3l commented Mar 4, 2022

First seen in ECP-WarpX/WarpX#2927

@ax3l ax3l mentioned this pull request Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant