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

Issue while building on Apple M1 with AppleClang 12 #527

Closed
pramodk opened this issue Feb 27, 2021 · 0 comments · Fixed by #528
Closed

Issue while building on Apple M1 with AppleClang 12 #527

pramodk opened this issue Feb 27, 2021 · 0 comments · Fixed by #528
Labels
bug Something isn't working build-system Improving build system

Comments

@pramodk
Copy link
Contributor

pramodk commented Feb 27, 2021

Building todays master on vanila Apple M1 with apple clang:

bb-fvff266jq05n:build kumbhar$ cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/nmodl
-- The CXX compiler identification is AppleClang 12.0.0.12000032
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CHECKING FOR FLEX/BISON
-- Found FLEX: /opt/homebrew/opt/flex/bin/flex (found suitable version "2.6.4", minimum required is "2.6") 
-- Found BISON: /opt/homebrew/opt/bison/bin/bison (found suitable version "3.7.5", minimum required is "3.0") 
--  Adding Flex include path as : /opt/homebrew/opt/flex/include/
-- Found Git: /usr/bin/git (found version "2.24.3 (Apple Git-128)") 
-- Sub-project : using fmt from "/Users/kumbhar/nmodl/ext/fmt"
-- Sub-project : using spdlog from "/Users/kumbhar/nmodl/ext/spdlog"
-- Sub-project : using pybind11 from "/Users/kumbhar/nmodl/ext/pybind11"
-- pybind11 v2.6.1 
-- Found PythonInterp: /opt/homebrew/bin/python3.9 (found version "3.9.2") 
-- Found PythonLibs: /opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib/libpython3.9.dylib
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Performing Test HAS_FLTO_THIN
-- Performing Test HAS_FLTO_THIN - Success
-- Sub-project : using cli11 from "/Users/kumbhar/nmodl/ext/cli11"
-- Sub-project : using eigen from "/Users/kumbhar/nmodl/ext/eigen"
-- Version: 6.2.0
-- Build type: 
-- CXX_STANDARD: 11
-- Performing Test has_std_11_flag
-- Performing Test has_std_11_flag - Success
-- Performing Test has_std_0x_flag
-- Performing Test has_std_0x_flag - Success
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS - Success
-- Performing Test FMT_HAS_VARIANT
-- Performing Test FMT_HAS_VARIANT - Success
-- Required features: cxx_variadic_templates
-- Performing Test HAS_NULLPTR_WARNING
-- Performing Test HAS_NULLPTR_WARNING - Success
-- Looking for strtod_l
-- Looking for strtod_l - found
-- Sub-project : using hpc-coding-conventions from "/Users/kumbhar/nmodl/cmake/hpc-coding-conventions"
-- NMODL_FORMATTING: OFF
-- NMODL_FORMATTING_ON: all
-- NMODL_FORMATTING_CPP_CHANGES_ONLY: OFF
-- NMODL_TEST_FORMATTING: OFF
-- NMODL_FORMATTING_NO_SUBMODULES: ON
-- NMODL_CLANG_FORMAT: OFF
-- NMODL_CMAKE_FORMAT: OFF
-- NMODL_GIT_HOOKS: OFF
-- NMODL_GIT_COMMIT_HOOKS: 
-- NMODL_GIT_PUSH_HOOKS: courtesy-msg
-- NMODL_STATIC_ANALYSIS: OFF
-- NMODL_TEST_STATIC_ANALYSIS: OFF
-- Could NOT find ClangFormat (missing: ClangFormat_EXECUTABLE) 
-- CHECKING FOR PYTHON
-- Found PythonInterp: /opt/homebrew/bin/python3.9 (found suitable version "3.9.2", minimum required is "3.5") 
-- 
-- Configured NMODL 0.2 (791b8a1 2021-02-25 08:23:25 +0100)
-- 
-- Some things you can do now:
-- --------------------+--------------------------------------------------------
-- Command             |   Description
-- --------------------+--------------------------------------------------------
-- make                | Build the project
-- make test           | Run unit tests
-- make install        | Will install NMODL to: /Users/kumbhar/nmodl
-- --------------------+--------------------------------------------------------
--  Build option       | Status
-- --------------------+--------------------------------------------------------
-- CXX COMPILER        | /Library/Developer/CommandLineTools/usr/bin/c++
-- COMPILE FLAGS       | 
-- Build Type          | 
-- Legacy Units        | OFF
-- Python Bindings     | ON
-- Flex                | /opt/homebrew/opt/flex/bin/flex
-- Bison               | /opt/homebrew/opt/bison/bin/bison
-- Python              | /opt/homebrew/bin/python3.9
-- --------------+--------------------------------------------------------------
--  See documentation : https://github.com/BlueBrain/nmodl/
-- --------------+--------------------------------------------------------------
-- 
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/kumbhar/nmodl/build

But while building I see:

bb-fvff266jq05n:build kumbhar$ make
Scanning dependencies of target util_obj
[  1%] Building CXX object src/utils/CMakeFiles/util_obj.dir/common_utils.cpp.o
[  1%] Building CXX object src/utils/CMakeFiles/util_obj.dir/file_library.cpp.o
[  2%] Building CXX object src/utils/CMakeFiles/util_obj.dir/logger.cpp.o
[  2%] Building CXX object src/utils/CMakeFiles/util_obj.dir/perf_stat.cpp.o
[  3%] Building CXX object src/utils/CMakeFiles/util_obj.dir/table_data.cpp.o
[  3%] Building CXX object src/utils/CMakeFiles/util_obj.dir/__/config/config.cpp.o
[  3%] Built target util_obj
....
Scanning dependencies of target testlexer
[ 26%] Building CXX object test/unit/CMakeFiles/testlexer.dir/lexer/tokens.cpp.o
In file included from /Users/kumbhar/nmodl/test/unit/lexer/tokens.cpp:12:
/Users/kumbhar/nmodl/ext/catch/catch.hpp:4167:13: error: invalid token in expression
            CATCH_BREAK_INTO_DEBUGGER();
            ^
/Users/kumbhar/nmodl/ext/catch/catch.hpp:1392:75: note: expanded from macro 'CATCH_BREAK_INTO_DEBUGGER'
    #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { CATCH_TRAP(); }
                                                                          ^
/Users/kumbhar/nmodl/ext/catch/catch.hpp:1371:34: note: expanded from macro 'CATCH_TRAP'
    #define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */
                                 ^
<inline asm>:1:6: note: instantiated into assembly here
        int $3
            ^
In file included from /Users/kumbhar/nmodl/test/unit/lexer/tokens.cpp:12:
/Users/kumbhar/nmodl/ext/catch/catch.hpp:4167:13: error: invalid operand
            CATCH_BREAK_INTO_DEBUGGER();
            ^
/Users/kumbhar/nmodl/ext/catch/catch.hpp:1392:75: note: expanded from macro 'CATCH_BREAK_INTO_DEBUGGER'
    #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { CATCH_TRAP(); }
                                                                          ^
/Users/kumbhar/nmodl/ext/catch/catch.hpp:1371:34: note: expanded from macro 'CATCH_TRAP'
    #define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */
                                 ^
<inline asm>:1:6: note: instantiated into assembly here
        int $3
            ^
...
@pramodk pramodk added bug Something isn't working build-system Improving build system labels Feb 27, 2021
pramodk added a commit that referenced this issue Feb 27, 2021
 - Currently catch2 is header directly added in the project
 - Before switching to submodule (in separate PR), copying
   minimal fix from the upstream: catchorg/Catch2#1971

Fixes #527
pramodk added a commit that referenced this issue Feb 27, 2021
 - Currently catch2 is header directly added in the project
 - Before switching to submodule (in separate PR), copying
   minimal fix from the upstream: catchorg/Catch2#1971
 - Update INSTALL.md for Apple M1

Fixes #527
pramodk added a commit that referenced this issue Mar 5, 2021
 - Currently catch2 is header directly added in the project
 - Before switching to submodule (in separate PR), copying
   minimal fix from the upstream: catchorg/Catch2#1971
 - Update INSTALL.md for Apple M1

Fixes #527
pramodk added a commit that referenced this issue Mar 7, 2021
* Currently catch2 is header directly added in the project
 - Before switching to submodule (in separate PR), copying
   minimal fix from the upstream: catchorg/Catch2#1971
* Update INSTALL.md for Apple M1

fixes #527
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build-system Improving build system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant