pyne / pyne

PyNE: The Nuclear Engineering Toolkit
http://pyne.io/
Other
261 stars 176 forks source link

Fatal Error: 'pyne_version.h' file not found #1530

Closed sudo-nano closed 1 month ago

sudo-nano commented 1 month ago

Describe the Bug
PyNE build fails during compilation of endftod.f90.o due to utils.cpp not being able to find pyne_version.h

/Users/cwg1231/Downloads/pyne/src/utils.cpp:14:10: fatal error: 'pyne_version.h' file not found
#include "pyne_version.h"
         ^~~~~~~~~~~~~~~~
1 error generated.

To Reproduce

  1. Clone repository
  2. Run python3.11 setup.py install --user -j $(nproc) --slow

Expected Behavior
PyNE builds and installs

Screenshots or Code Snippets

/Users/cwg1231/Downloads/pyne/src/utils.cpp:14:10: fatal error: 'pyne_version.h' file not found
#include "pyne_version.h"
         ^~~~~~~~~~~~~~~~
1 error generated.

Please complete the following information regarding your system:

Additional Context
Building with --slow is required for me because I'm on Apple silicon (ARM).

sturmk commented 1 month ago

I'm having the same issue on Ubuntu 23.10, with x86_64 architecture. Workaround: go to $PYNE_SRC_DIR/build/pyne and execute python3 pyne_version.py; then the build process can be resumed.

gonuke commented 1 month ago

I expect there is an error earlier in the build process that you are missing. This file should be generated by running a python script during the build configuration.

This script is run by invoking python but on some systems this doesn't exist and only python3 exists.

We'll have to find a more robust solution, but in the meantime, in addition to the workaround suggested by @sturmk, one can also ensure that the python command exists with either a symlink or update-alternatives on Ubuntu.