Open AleyRobotics opened 4 years ago
@AleyRobotics could you try adding a -Xswiftc -lunwind
to the command line? And do you have libunwind installed?
@weissi I'm working through the same issue on a Raspberry Pi 4. I was able to install libunwind8 but get:
/usr/bin/ld.gold: error: cannot find -lunwind
I can build without -Xswiftc -lunwind
by commenting out #define HAVE_GETIPINFO 1
, but then when there's something to report it calls an illegal instruction:
Current stack trace:
Illegal instruction
This is the output of swift test
at 54a65d6 with #define HAVE_GETIPINFO 1
commented out. Should I see a stack trace?
dan@pi4:~/swift-backtrace $ swift test [5/5] Linking swift-backtracePackageTests.xctest Test Suite 'All tests' started at 2021-06-02 13:38:15.549 Test Suite 'debug.xctest' started at 2021-06-02 13:38:15.552 Test Suite 'BacktraceTests' started at 2021-06-02 13:38:15.553 Test Case 'BacktraceTests.testBacktrace' started at 2021-06-02 13:38:15.553 Fatal error: 9053EA13-E81B-44CB-B892-864CD6C72724: file /home/dan/swift-backtrace/Sources/Sample/main.swift, line 19 Current stack trace:
Test Case 'BacktraceTests.testBacktrace' passed (0.509 seconds) Test Suite 'BacktraceTests' passed at 2021-06-02 13:38:16.062 Executed 1 test, with 0 failures (0 unexpected) in 0.509 (0.509) seconds Test Suite 'debug.xctest' passed at 2021-06-02 13:38:16.063 Executed 1 test, with 0 failures (0 unexpected) in 0.509 (0.509) seconds Test Suite 'All tests' passed at 2021-06-02 13:38:16.063 Executed 1 test, with 0 failures (0 unexpected) in 0.509 (0.509) second
Swift version 5.0 (swift-5.0-RELEASE) Target: armv6-unknown-linux-gnueabihf
linker LOG: