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

catch-adapter issue? #184

Open
brownjm1968 opened this issue Dec 13, 2023 · 1 comment
Open

catch-adapter issue? #184

brownjm1968 opened this issue Dec 13, 2023 · 1 comment

Comments

@brownjm1968
Copy link

brownjm1968 commented Dec 13, 2023

I'm getting an error that is seemingly related to "catch-adapter" when trying to compile NJOY21. I can compile NJOY2016 fine.

It looks similar to the issue defined here: CoatiSoftware/Sourcetrail#1185

I tried switching the FetchContent to go get Catch2, but it resulted in more errors b/c it's looking for a catch.hpp in the wrong place.

  • Hardware: Apple M2
  • OS: Ventura 13.6.2
  • GCC: Apple clang version 15.0.0 (clang-1500.0.40.1)
  • gfortran: GNU Fortran (Homebrew GCC 13.2.0) 13.2.0
  • cmake: 3.27.7
  • python: 3.11.6

The error looks like this:

/Users/<>/NJOY21/src/njoy21/Version/test/Version.test.cpp:14:3: error: unrecognized instruction mnemonic, did you mean: bit, cnt, hint, ins, not?
  CHECK( "1.2.3" == njoy21::Version::version() );
  ^
/Users/<>/NJOY21/build/_deps/catch-adapter-src/src/single_include/catch.hpp:11603:23: note: expanded from macro 'CHECK'
#define CHECK( expr ) INTERNAL_CATCH_TEST( "CHECK", Catch::ResultDisposition::ContinueOnFailure, expr )
                      ^
/Users/<>/NJOY21/build/_deps/catch-adapter-src/src/single_include/catch.hpp:2235:9: note: expanded from macro 'INTERNAL_CATCH_TEST'
        INTERNAL_CATCH_REACT( __catchResult ) \
        ^
/Users/<>/NJOY21/build/_deps/catch-adapter-src/src/single_include/catch.hpp:2219:44: note: expanded from macro 'INTERNAL_CATCH_REACT'
    if( resultBuilder.shouldDebugBreak() ) CATCH_BREAK_INTO_DEBUGGER(); \
                                           ^
/Users/<>/NJOY21/build/_deps/catch-adapter-src/src/single_include/catch.hpp:2155:75: note: expanded from macro 'CATCH_BREAK_INTO_DEBUGGER'
    #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { CATCH_TRAP(); }
                                                                          ^
/Users/<>/NJOY21/build/_deps/catch-adapter-src/src/single_include/catch.hpp:2133:38: note: expanded from macro 'CATCH_TRAP'
        #define CATCH_TRAP() __asm__("int $3\n" : : /* NOLINT */ )
                                     ^
<inline asm>:1:2: note: instantiated into assembly here
        int $3
@whaeck
Copy link
Member

whaeck commented Dec 14, 2023

I have this issue myself (not only on NJOY21 but also other njoy libraries like ENDFtk). I can get around it by adding -DCMAKE_OSX_ARCHITECTURES="x86_64" to my cmake command when I configure. However, as Nathan mentioned, I would suggest using NJOY2016 instead. I try to update NJOY21 with the latest version of NJOY2016 but I haven;t done so with the latest version (2016.72).

I'm hoping that upgrading to a newer version of Catch will solve the issue.

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

2 participants