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 error on macOS #90

Closed
harterj opened this issue Jun 27, 2019 · 14 comments
Closed

Build error on macOS #90

harterj opened this issue Jun 27, 2019 · 14 comments
Labels

Comments

@harterj
Copy link

harterj commented Jun 27, 2019

Hello,

I'm trying to build NJOY21 on MacOS Mojave. I successfully built and ran tests with NJOY2016, but I'm interested in this version. My compilers:

$CC -> /opt/moose/mpich-3.3/clang-8.0.0/bin/mpicc
$CXX -> /opt/moose/mpich-3.3/clang-8.0.0/bin/mpicxx
$FC-> /opt/moose/mpich-3.3/clang-8.0.0/bin/mpif90

Python version is 2.7.16. I realize this isn't up to the standard, but I assumed since I got NJOY2016 to compile with it, it might work for NJOY21. Here are the error messages I'm seeing:

[ 84%] Building CXX object CMakeFiles/njoy21.dir/src/main.cpp.o
In file included from /Users/hartjr/projects/NJOY21/src/main.cpp:1:
In file included from /Users/hartjr/projects/NJOY21/src/njoy21.hpp:11:
/opt/moose/llvm-8.0.0/bin/../include/c++/v1/experimental/optional:18:3: error: "<experimental/optional> has been removed. Use optional instead." [-Werror,-W#warnings] # warning "<experimental/optional> has been removed. Use optional instead."
In file included from /Users/hartjr/projects/NJOY21/src/main.cpp:1:
In file included from /Users/hartjr/projects/NJOY21/src/njoy21.hpp:25:
In file included from /Users/hartjr/projects/NJOY21/subprojects/ENDFtk/src/ENDFtk.hpp:82:
In file included from /Users/hartjr/projects/NJOY21/subprojects/ENDFtk/src/ENDFtk/resonanceParameters.hpp:5:
/Users/hartjr/projects/NJOY21/subprojects/ENDFtk/src/ENDFtk/resonanceParameters/src/readAPE.hpp:7:5: error: no template named 'optional' in namespace 'std'; did you mean 'ranges::optional'?
std::optional< TAB1 >{ TAB1( it, end, lineNumber, MAT, MF, MT ) } :
^~~~~~~~~~~~~
ranges::optional

And so on, it stops after 20 errors. Do you have any advice on this, please? I'm not extremely knowledgeable about compiler issues, so my apologies in advance.

Thanks!

Jackson

@jlconlin
Copy link
Member

@harterj Right now, we only support building with clang version 3.8. That is the problem. If you have gcc 6.4 or higher it should work (although we find the clang compiler to produce a better compiled binary.) There are many options for installing compilers including homebrew and spack, which we have used here at LANL.

Try a different compiler an let us know how well it works.

@harterj
Copy link
Author

harterj commented Jun 28, 2019

@jlconlin I'll do that, thank you!

@jlconlin
Copy link
Member

jlconlin commented Jul 2, 2019

@harterj Have you had any success with a different compiler?

@harterj
Copy link
Author

harterj commented Jul 2, 2019

@jlconlin I was just trying this out again this morning, but still having trouble. I switch to GCC 8.3, removed extraneous pathing I had for MOOSE in an effort to single this out. This screenshot should help a bit, I hope:
Screen Shot 2019-07-02 at 9 56 51 AM

I've followed the directions up to the "make" command so far, from the github. The procedure was similar for the 2016 version. Here's the start of make, though:
Screen Shot 2019-07-02 at 9 59 27 AM

Any potential advice for me?

Thanks,
Jackson

@jlconlin
Copy link
Member

jlconlin commented Jul 3, 2019

@harterj I noticed this as well when I tried to build NJOY21 recently. This is definitely an issue that we are going to have to figure out.

In the meantime, are you able to build by using one of our signature files?

@jlconlin jlconlin added the bug label Jul 3, 2019
@harterj
Copy link
Author

harterj commented Jul 3, 2019

@jlconlin I'll play around with it a little today. Do you mean to just use a previous signature file, located at https://github.com/njoy/signatures ? And do I only need the NJOY21 signature?

If I can't get NJOY21 to build, I can definitely use NJOY2016, I just wanted to use and read the C++ version 🦑

@jlconlin
Copy link
Member

We just made a change to NJOY21 that may help with this. It was addressed in Pull Request #93. Please try it out and let me know if it helps.

@harterj
Copy link
Author

harterj commented Sep 3, 2019

@jlconlin I will give this a shot this week, thank you! I was on travel.

@jlconlin
Copy link
Member

Any news on this?

@harterj
Copy link
Author

harterj commented Sep 19, 2019

Sorry on the delay with this @jlconlin -- I've been busy prepping for some things..still getting an error
Screen Shot 2019-09-19 at 1 47 07 PM

This is using the recent signature 1.0.5-NJOY21.json

@harterj
Copy link
Author

harterj commented Sep 19, 2019

Screen Shot 2019-09-19 at 1 49 30 PM
Here's from cmake

@jlconlin
Copy link
Member

@harterj can you start over from scratch (i.e., with a freshly cloned repository)? It's likely that some underlying component is still broken. We've made a number of changes to the underlying components.

The instructions we provide online are for those who really care about the specific version of NJOY21 they are using. If you don't care and just want the latest and greatest the instructions are easier:

mkdir bin
cd bin
make  -D CMAKE_BUILD+TYPE=Release ../
make
ctest

Going this route, there is no need to run fetch_subprojects.py before doing cmake.

@harterj
Copy link
Author

harterj commented Sep 20, 2019

That worked! Compiled just fine followed by successful tests. Thanks so much for the help @jlconlin

@jlconlin
Copy link
Member

Glad everything is working.

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

No branches or pull requests

2 participants