llnl / llnl/PnMPI

No error on missing python

Open
#13 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22
Forks
12
PR merge metrics
No merged PRs in 30d

Description

When running CMake in a build environment without a python interpreter installed, it prints a warning, but doesn't exit with an error code. However, building PnMPI requires python and CMake clearly should inform the user about this, as the build will break otherwise.

```
~:$ cmake -DCMAKE_INSTALL_PREFIX=../install ..
...
-- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.6")
...
-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/PnMPI/build
~:$ make
Scanning dependencies of target pnmpi_wrapper_pic
[ 1%] Building C object src/pnmpi/wrapper/CMakeFiles/pnmpi_wrapper_pic.dir/mpi_interface.c.o
[ 2%] Building C object src/pnmpi/wrapper/CMakeFiles/pnmpi_wrapper_pic.dir/mpi_reentry.c.o
[ 2%] Building C object src/pnmpi/wrapper/CMakeFiles/pnmpi_wrapper_pic.dir/return_address.c.o
[ 3%] Building C object src/pnmpi/wrapper/CMakeFiles/pnmpi_wrapper_pic.dir/function_address.c.o
[ 3%] Built target pnmpi_wrapper_pic
Scanning dependencies of target generate
[ 3%] Generating header/pnmpi/private/pmpi.h from pmpi.h.w
/usr/bin/env: 'python': No such file or directory
make[2]: *** [src/pnmpi/CMakeFiles/generate.dir/build.make:66: src/pnmpi/header/pnmpi/private/pmpi.h] Error 127
make[1]: *** [CMakeFiles/Makefile2:1578: src/pnmpi/CMakeFiles/generate.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the CMake Python-interpreter check and the generate target that produces header/pnmpi/private/pmpi.h from pmpi.h.w. Confirm the current behavior when Python is absent, then verify that configuration reports the missing required dependency with a nonzero result instead of allowing make to fail later.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, python
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.