Description
The program crashes on macOS if it is compiled with gcc-8. The message is:
dyld: Symbol not found: ___emutls_get_address
Referenced from: /Users/runner/work/workflow_test/workflow_test/./workflow_test
Expected in: /usr/lib/libSystem.B.dylib
I found it yesterday when catch2 tests in my repo failed with this message. On October 10 the same code worked fine (you can compare the branch "test" with the "master" branch: the difference is only in spaces).
Area for Triage:
'Apple'
'C/C++'
Question, Bug, or Feature?:
"Bug"
Virtual environments affected
Expected behavior
The program works correctly.
Actual behavior
The program crashes with the message
Run ./workflow_test
dyld: lazy symbol binding failed: Symbol not found: ___emutls_get_address
Referenced from: /Users/runner/work/workflow_test/workflow_test/./workflow_test
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: ___emutls_get_address
Referenced from: /Users/runner/work/workflow_test/workflow_test/./workflow_test
Expected in: /usr/lib/libSystem.B.dylib
/Users/runner/work/_temp/7727eef4-6f62-44e9-8eb5-f9e80a1aa0d0.sh: line 1: 1288 Abort trap: 6 ./workflow_test
Error: Process completed with exit code 134.
Repro steps
Please, use the following repo for a minimal working example. The code works fine with gcc-9 and clang but crashes with gcc-8.
https://github.com/sgshulman/workflow_test
Hi @sgshulman!
Could you please provide links to the successful and failed runs? Are they on the same commit?
I wonder if this is related to the default Xcode version
Hello! Thank you for your response. Yes, sure.
The successful commit is here. It was made on October 10. The test run link.
The failed commit example.
Removing 4 spaces in .hpp should not affect the compilation. The test run result. Of cause, It is possible to revert spaces with the same result.
The Xcode version wasn't specified. So, it should be a default one.
@sgshulman,
Could you please check with the previous Xcode version?
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 11.7
I'm not sure, I do it correctly. The 11.7 Xcode version does not help.
Commit
Test result
@sgshulman , Thank you.
Looks like the gcc-8 is broken on the image. The temporary workaround should help:
- if: matrix.compiler_name == 'build_gcc8'
run: |
brew reinstall gcc@8
Indeed it looks like gcc8 is broken on the image. Additionally I had a chat with Homebrew:
https://github.com/Homebrew/discussions/discussions/183#discussioncomment-142248
It seems like (possibly) XCode is installed without CLT
@johnny-bit , CLT is installed on Hosted images. Homebrew rebuilds broken dependencies from source code always by design.
Let's wait for next deployment and fix
Hello! Thank you very much for your help!!!
After latest macOS releases tests on the same commits, which were mentioned above, work fine both on macOS 10.15 and 11.
Test repo tests results for macOS 10.15 and macOS 11.
In my main repo, everything also works well now.
@sgshulman I'm going to close the issue.
Please feel free to contact us if you have any concerns.
Thank you!