Skip to content

Commit 1514e89

Browse files
fab4100Fabian Wermelinger
andauthored
Use real path for <build_dir>/spack/bin paths (#262)
If build dir is a symbolic link in a directory that is not mounted when `bwrap` is executed the `make` call will fail with: ``` bwrap: execvp spack: No such file or directory make: *** [Makefile:9: spack-version] Error 1 ``` Adding the `-P` option to the `pwd` command fixes this issue. Co-authored-by: Fabian Wermelinger <[email protected]>
1 parent a915ec6 commit 1514e89

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

docs/build-caches.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,5 +97,5 @@ When debugging a recipe, where failing builds have to be run multiple times, the
9797
To force push all packages that have been built, use the `cache-force` makefile target:
9898

9999
```bash
100-
env --ignore-environment PATH=/usr/bin:/bin:`pwd`/spack/bin make cache-force
100+
env --ignore-environment PATH=/usr/bin:/bin:`pwd -P`/spack/bin make cache-force
101101
```

docs/building.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ stack-config --build $BUILD_PATH ...
1212
1313
# perform the build
1414
cd $BUILD_PATH
15-
env --ignore-environment PATH=/usr/bin:/bin:`pwd`/spack/bin make modules store.squashfs -j32
15+
env --ignore-environment PATH=/usr/bin:/bin:`pwd -P`/spack/bin make modules store.squashfs -j32
1616
```
1717

1818
The call to `make` is wrapped with with `env --ignore-env` to unset all environment variables, to improve reproducability of builds.

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Once configured, the build stack is built in the build path using make:
5555
```bash
5656
# build the spack stack
5757
cd $BUILD_PATH
58-
env --ignore-environment PATH=/usr/bin:/bin:`pwd`/spack/bin make modules store.squashfs -j64
58+
env --ignore-environment PATH=/usr/bin:/bin:`pwd -P`/spack/bin make modules store.squashfs -j64
5959
```
6060

6161
See the documentation on [building Spack stacks](building.md) for more information.

stackinator/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def main():
9090
root_logger.info("\nConfiguration finished, run the following to build the environment:\n")
9191
root_logger.info(f"cd {builder.path}")
9292
root_logger.info(
93-
"env --ignore-environment PATH=/usr/bin:/bin:`pwd`/spack/bin HOME=$HOME make store.squashfs -j32"
93+
"env --ignore-environment PATH=/usr/bin:/bin:`pwd -P`/spack/bin HOME=$HOME make store.squashfs -j32"
9494
)
9595
root_logger.info(f"see logfile for more information {logfile}")
9696
return 0

0 commit comments

Comments
 (0)