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

Building TimeParse.cpp break on iOS target #542

Closed
vyskocil opened this issue Dec 23, 2017 · 4 comments
Closed

Building TimeParse.cpp break on iOS target #542

vyskocil opened this issue Dec 23, 2017 · 4 comments
Assignees
Labels
bug For issues that describe a bug build For issues in the context of building the software help wanted Signal that help of other is appreciated

Comments

@vyskocil
Copy link
Collaborator

I tried to build for iOS target using CMake but the compilation stop with the following errors :

...
Scanning dependencies of target TimeParse
[ 79%] Building CXX object Tests/CMakeFiles/TimeParse.dir/src/TimeParse.cpp.o
In file included from /Users/vyskocil/Dev/libosmscout/Tests/src/TimeParse.cpp:4:
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:4167:13: error: invalid token in expression
            CATCH_BREAK_INTO_DEBUGGER();
            ^
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:1392:75: note: expanded from macro 'CATCH_BREAK_INTO_DEBUGGER'
    #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { CATCH_TRAP(); }
                                                                          ^
/Users/vyskocil/Dev/libosmscout/Tests/include/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/vyskocil/Dev/libosmscout/Tests/src/TimeParse.cpp:4:
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:4167:13: error: invalid operand
            CATCH_BREAK_INTO_DEBUGGER();
            ^
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:1392:75: note: expanded from macro 'CATCH_BREAK_INTO_DEBUGGER'
    #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { CATCH_TRAP(); }
                                                                          ^
/Users/vyskocil/Dev/libosmscout/Tests/include/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
            ^
/Users/vyskocil/Dev/libosmscout/Tests/src/TimeParse.cpp:9:3: error: invalid token in expression
  REQUIRE(osmscout::ParseISO8601TimeString(testString, ts));
  ^
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:11809:24: note: expanded from macro 'REQUIRE'
#define REQUIRE( ... ) INTERNAL_CATCH_TEST( "REQUIRE", Catch::ResultDisposition::Normal, __VA_ARGS__  )
                       ^
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:1447:9: note: expanded from macro 'INTERNAL_CATCH_TEST'
        INTERNAL_CATCH_REACT( catchAssertionHandler ) \
        ^
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:1430:38: note: expanded from macro 'INTERNAL_CATCH_REACT'
    if( handler.shouldDebugBreak() ) CATCH_BREAK_INTO_DEBUGGER(); \
                                     ^
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:1392:75: note: expanded from macro 'CATCH_BREAK_INTO_DEBUGGER'
    #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { CATCH_TRAP(); }
                                                                          ^
/Users/vyskocil/Dev/libosmscout/Tests/include/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
            ^
/Users/vyskocil/Dev/libosmscout/Tests/src/TimeParse.cpp:9:3: error: invalid operand
  REQUIRE(osmscout::ParseISO8601TimeString(testString, ts));
  ^
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:11809:24: note: expanded from macro 'REQUIRE'
#define REQUIRE( ... ) INTERNAL_CATCH_TEST( "REQUIRE", Catch::ResultDisposition::Normal, __VA_ARGS__  )
                       ^
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:1447:9: note: expanded from macro 'INTERNAL_CATCH_TEST'
        INTERNAL_CATCH_REACT( catchAssertionHandler ) \
        ^
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:1430:38: note: expanded from macro 'INTERNAL_CATCH_REACT'
    if( handler.shouldDebugBreak() ) CATCH_BREAK_INTO_DEBUGGER(); \
                                     ^
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:1392:75: note: expanded from macro 'CATCH_BREAK_INTO_DEBUGGER'
    #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { CATCH_TRAP(); }
                                                                          ^
/Users/vyskocil/Dev/libosmscout/Tests/include/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
            ^
/Users/vyskocil/Dev/libosmscout/Tests/src/TimeParse.cpp:10:3: error: invalid token in expression
  REQUIRE(ts.time_since_epoch().count()==1489329116123);
  ^
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:11809:24: note: expanded from macro 'REQUIRE'
#define REQUIRE( ... ) INTERNAL_CATCH_TEST( "REQUIRE", Catch::ResultDisposition::Normal, __VA_ARGS__  )
                       ^
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:1447:9: note: expanded from macro 'INTERNAL_CATCH_TEST'
        INTERNAL_CATCH_REACT( catchAssertionHandler ) \
        ^
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:1430:38: note: expanded from macro 'INTERNAL_CATCH_REACT'
    if( handler.shouldDebugBreak() ) CATCH_BREAK_INTO_DEBUGGER(); \
                                     ^
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:1392:75: note: expanded from macro 'CATCH_BREAK_INTO_DEBUGGER'
    #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { CATCH_TRAP(); }
                                                                          ^
/Users/vyskocil/Dev/libosmscout/Tests/include/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
            ^
/Users/vyskocil/Dev/libosmscout/Tests/src/TimeParse.cpp:10:3: error: invalid operand
  REQUIRE(ts.time_since_epoch().count()==1489329116123);
  ^
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:11809:24: note: expanded from macro 'REQUIRE'
#define REQUIRE( ... ) INTERNAL_CATCH_TEST( "REQUIRE", Catch::ResultDisposition::Normal, __VA_ARGS__  )
                       ^
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:1447:9: note: expanded from macro 'INTERNAL_CATCH_TEST'
        INTERNAL_CATCH_REACT( catchAssertionHandler ) \
        ^
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:1430:38: note: expanded from macro 'INTERNAL_CATCH_REACT'
    if( handler.shouldDebugBreak() ) CATCH_BREAK_INTO_DEBUGGER(); \
                                     ^
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:1392:75: note: expanded from macro 'CATCH_BREAK_INTO_DEBUGGER'
    #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { CATCH_TRAP(); }
                                                                          ^
/Users/vyskocil/Dev/libosmscout/Tests/include/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
            ^
/Users/vyskocil/Dev/libosmscout/Tests/src/TimeParse.cpp:11:3: error: invalid token in expression
  REQUIRE(osmscout::TimestampToISO8601TimeString(ts)==testString);
  ^
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:11809:24: note: expanded from macro 'REQUIRE'
#define REQUIRE( ... ) INTERNAL_CATCH_TEST( "REQUIRE", Catch::ResultDisposition::Normal, __VA_ARGS__  )
                       ^
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:1447:9: note: expanded from macro 'INTERNAL_CATCH_TEST'
        INTERNAL_CATCH_REACT( catchAssertionHandler ) \
        ^
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:1430:38: note: expanded from macro 'INTERNAL_CATCH_REACT'
    if( handler.shouldDebugBreak() ) CATCH_BREAK_INTO_DEBUGGER(); \
                                     ^
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:1392:75: note: expanded from macro 'CATCH_BREAK_INTO_DEBUGGER'
    #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { CATCH_TRAP(); }
                                                                          ^
/Users/vyskocil/Dev/libosmscout/Tests/include/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
            ^
/Users/vyskocil/Dev/libosmscout/Tests/src/TimeParse.cpp:11:3: error: invalid operand
  REQUIRE(osmscout::TimestampToISO8601TimeString(ts)==testString);
  ^
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:11809:24: note: expanded from macro 'REQUIRE'
#define REQUIRE( ... ) INTERNAL_CATCH_TEST( "REQUIRE", Catch::ResultDisposition::Normal, __VA_ARGS__  )
                       ^
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:1447:9: note: expanded from macro 'INTERNAL_CATCH_TEST'
        INTERNAL_CATCH_REACT( catchAssertionHandler ) \
        ^
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:1430:38: note: expanded from macro 'INTERNAL_CATCH_REACT'
    if( handler.shouldDebugBreak() ) CATCH_BREAK_INTO_DEBUGGER(); \
                                     ^
/Users/vyskocil/Dev/libosmscout/Tests/include/catch.hpp:1392:75: note: expanded from macro 'CATCH_BREAK_INTO_DEBUGGER'
    #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { CATCH_TRAP(); }
                                                                          ^
/Users/vyskocil/Dev/libosmscout/Tests/include/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
            ^
8 errors generated.
make[2]: *** [Tests/CMakeFiles/TimeParse.dir/src/TimeParse.cpp.o] Error 1
make[1]: *** [Tests/CMakeFiles/TimeParse.dir/all] Error 2
make: *** [all] Error 2

@Framstag
Copy link
Owner

Framstag commented Dec 23, 2017 via email

@Framstag Framstag added bug For issues that describe a bug build For issues in the context of building the software help wanted Signal that help of other is appreciated labels Dec 23, 2017
@Framstag Framstag self-assigned this Jan 2, 2018
@Framstag
Copy link
Owner

Framstag commented Jan 2, 2018

Waiting for upstream bugfix :-(

@berkus
Copy link

berkus commented Jan 15, 2018

An easy fix downstream (which I had to use temporarily) is to use this fallback for both mac and linux regardless of arch. It makes backtraces slighly longer but is more portable.

Framstag pushed a commit that referenced this issue Jan 18, 2018
Catch2. Reactivated tests under iOS. Also activated tests using meson
for travis, too.
Framstag pushed a commit that referenced this issue Jan 18, 2018
@Framstag
Copy link
Owner

Tests work again after update. Closing issue.

Framstag pushed a commit that referenced this issue Jan 20, 2018
Framstag pushed a commit that referenced this issue Jan 22, 2018
not work, since iOS generates binaries for an architecture, which is not
the architecture of the build system ( at least I assume so).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For issues that describe a bug build For issues in the context of building the software help wanted Signal that help of other is appreciated
Projects
None yet
Development

No branches or pull requests

3 participants