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

Embedded assembly code not working for Apple M1 #266

Closed
joemsong opened this issue Mar 7, 2021 · 3 comments · Fixed by #268
Closed

Embedded assembly code not working for Apple M1 #266

joemsong opened this issue Mar 7, 2021 · 3 comments · Fixed by #268

Comments

@joemsong
Copy link

joemsong commented Mar 7, 2021

Could the embedded assembly code be replaced for Apple M1 processor?

Thank you.


% brew install --build-from-source ensmallen
==> Downloading https://github.com/mlpack/ensmallen/archive/2.16.1.tar.gz
Already downloaded: /Users/joesong/Library/Caches/Homebrew/downloads/7fe6be0479b5520276f672eddcec999809758c01481a2cd7f6d0441b415fc045--ensmallen-2.16.1.tar.gz
==> cmake ..
==> make install
Last 15 lines from /Users/joesong/Library/Logs/Homebrew/ensmallen/02.make:
#define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { CATCH_TRAP(); }
^
/tmp/ensmallen-20210306-15863-bv9x46/ensmallen-2.16.1/tests/catch.hpp:5269:34: note: expanded from macro 'CATCH_TRAP'
#define CATCH_TRAP() asm("int $3\n" : : ) /* NOLINT */
^
:1:6: note: instantiated into assembly here
int $3
^
[ 40%] Building CXX object tests/CMakeFiles/ensmallen_tests.dir/iqn_test.cpp.o
cd /tmp/ensmallen-20210306-15863-bv9x46/ensmallen-2.16.1/build/tests && /opt/homebrew/Library/Homebrew/shims/mac/super/clang++ -I/tmp/ensmallen-20210306-15863-bv9x46/ensmallen-2.16.1/include -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -Wall -Wpedantic -Wunused-parameter -std=gnu++11 -o CMakeFiles/ensmallen_tests.dir/iqn_test.cpp.o -c /tmp/ensmallen-20210306-15863-bv9x46/ensmallen-2.16.1/tests/iqn_test.cpp
2 errors generated.
make[2]: *** [tests/CMakeFiles/ensmallen_tests.dir/main.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [tests/CMakeFiles/ensmallen_tests.dir/all] Error 2
make: *** [all] Error 2

@zoq
Copy link
Member

zoq commented Mar 7, 2021

Hello @joemsong do you mind to download the latest version of catch2 (catch.hpp) - https://github.com/catchorg/Catch2/releases and replace with the catch.hpp file in ensmallen/tests/ (https://github.com/mlpack/ensmallen/blob/master/tests/catch.hpp) and see if that works?

Instructions:

git clone https://github.com/mlpack/ensmallen.git
cd ensmallen/tests
rm catch2.hpp
wget https://github.com/catchorg/Catch2/releases/download/v2.13.4/catch.hpp
cd ..
mkdir build
cd build
cmake ..
make

You might have to install armadillo before that:

brew install armadillo

@conradsnicta
Copy link
Contributor

@joemsong it's a bug in Catch2; see catchorg/Catch2@a25c1a2

@joemsong
Copy link
Author

joemsong commented Mar 7, 2021

@zoq and @conradsnicta: Thank you for the prompt response.

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

Successfully merging a pull request may close this issue.

3 participants