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

NJOY21 installation error #175

Open
tiepngh opened this issue Jan 16, 2023 · 4 comments
Open

NJOY21 installation error #175

tiepngh opened this issue Jan 16, 2023 · 4 comments

Comments

@tiepngh
Copy link

tiepngh commented Jan 16, 2023

Hello, forum,

I am trying to install NJOY21, which was followed by this link: "https://docs.njoy21.io/install.html"
I used Windows Subsystem for Linux (WSL) for this installation, and I underwent the error messages as follows:
"
...
make[2]: *** [CMakeFiles/njoy21.dir/build.make:76: CMakeFiles/njoy21.dir/src/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1282: CMakeFiles/njoy21.dir/all] Error 2
(make: *** [Makefile:146: all] Error 2)
"

Could anyone give me any suggestions?

Thank you very much in advance!
With kind regards,
HuuTiep

@whaeck
Copy link
Member

whaeck commented Jan 17, 2023

In order to diagnose this problem, I would actually need to know the actual error message and the compilers you are using.

You can also try to use NJOY2016 directly (NJOY21 uses NJOY2016 under the hood): https://github.com/njoy/NJOY2016
The installation procedure for this version of NJOY is essentially the same as what you done for NJOY21 but it will go a lot faster (it only requires a Fortran compiler).

@awill271
Copy link

I am having a similar issue. This is the error code I am receiving:
In file included from /home/awill271/NJOY21/NJOY21/bin/_deps/hana-adapter-src/src/include/boost/hana.hpp:191,
from /home/awill271/NJOY21/NJOY21/bin/_deps/endftk-src/src/ENDFtk/section/6.hpp:8,
from /home/awill271/NJOY21/NJOY21/bin/_deps/endftk-src/src/ENDFtk.hpp:19,
from /home/awill271/NJOY21/NJOY21/src/njoy21.hpp:14,
from /home/awill271/NJOY21/NJOY21/src/main.cpp:1:
/home/awill271/NJOY21/NJOY21/bin/_deps/hana-adapter-src/src/include/boost/hana/traits.hpp:71:62: error: ‘template struct std::is_literal_type’ is deprecated [-Werror=deprecated-declarations]
71 | constexpr auto is_literal_type = detail::hana_traitstd::is_literal_type{};
| ^~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/variant:36,
from /home/awill271/NJOY21/NJOY21/src/njoy21.hpp:4,
from /home/awill271/NJOY21/NJOY21/src/main.cpp:1:
/usr/include/c++/11/type_traits:746:5: note: declared here
746 | is_literal_type
| ^~~~~~~~~~~~~~~
cc1plus: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/njoy21.dir/build.make:76: CMakeFiles/njoy21.dir/src/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1516: CMakeFiles/njoy21.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

@tiepngh
Copy link
Author

tiepngh commented Jan 18, 2023

In order to diagnose this problem, I would actually need to know the actual error message and the compilers you are using.

You can also try to use NJOY2016 directly (NJOY21 uses NJOY2016 under the hood): https://github.com/njoy/NJOY2016 The installation procedure for this version of NJOY is essentially the same as what you done for NJOY21 but it will go a lot faster (it only requires a Fortran compiler).

Hi Whaeck,

I appreciate your suggestion.

My NJOY21 and NJOY2016 installations were based on GCC-11.3 (the default-current version of GCC). I realized that GCC-11.3 is not recommended for these installations. Therefore, after downgrading GCC, I successfully installed NJOY2016 which displayed "100% tests passed, 0 test failed out of 76". However, during the installation process, there were a lot of error messages that I am not sure can affect the final executable NJOY code or not.

Thank you very much for your time.
With best regards,
HuuTiep

@whaeck
Copy link
Member

whaeck commented Jan 18, 2023

@tiepngh The messages you are seeing are simply warning messages. As long as the compilation process does not end in a clear error (and thus no executable has been produced), you should be fine - which should be the case for you since you have run the test suite successfully.

@awill271 We are aware of this deprecation error/warning message. Normally this should not be an issue but NJOY21 does use compiler flags to treat warnings as errors. You can work around the issue by removing the compilation flags on line 26 and 27 in the main CMakeLists.txt file (you should do a clean CMake after making these changes though).

If that does not work, you can also use NJOY2016 instead. This version of NJOY is used under the hood in NJOY21 anyway and the installation is a lot simpler and faster since it is only a Fortran program.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants