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

Old Catch2 bug blocking Mac M1 install #250

Closed
nicksamps opened this issue Nov 18, 2021 · 1 comment
Closed

Old Catch2 bug blocking Mac M1 install #250

nicksamps opened this issue Nov 18, 2021 · 1 comment

Comments

@nicksamps
Copy link
Collaborator

Issue Description

The project won't build for me because of an old version of Catch2 that is being used.

Steps to Reproduce (Bugs only)

  1. Follow steps to build ktools (either from ktools readme or just do pip install oasislmf) on a Mac with the M1 chip.

Similar issue here CoatiSoftware/Sourcetrail#1185

Fix

I got make install to work by replacing catch.hpp with the updated version here https://github.com/catchorg/Catch2/releases/tag/v2.13.7.

The commit that fixed Catch2 can be found here catchorg/Catch2@a25c1a2

Version / Environment information

Mac OSX using M1, latest version of ktools

Example data / logs

Error:

  ./../include/catch.hpp:5485:75: note: expanded from macro 'CATCH_BREAK_INTO_DEBUGGER'
      #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { CATCH_TRAP(); }
                                                                            ^
  ./../include/catch.hpp:5464:34: 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
          ^
  1 error generated.
  make[3]: *** [main.o] Error 1
  make[2]: *** [all-recursive] Error 1
  make[1]: *** [all-recursive] Error 1
  make: *** [all] Error 2
  Ktools build failed.
@hchagani-oasislmf
Copy link
Contributor

Fixed by PR #253. The header file catch.hpp was only being used by the kunit testing stub. The removal of this stub and the header file has solved 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

Successfully merging a pull request may close this issue.

2 participants