Closed ludekvodicka closed 3 years ago
We build every commit on macOS:
https://github.com/uNetworking/uWebSockets/runs/1602572214
How are you building it?
The mentioned test seems to compile only uSockets, not the project with included uWebsockets.
The issue is in uWebsockets/src/Loop.h not in uSockets/src/loop.c
It does compile everything. I added a new step that lists the compiled binaries.
Thanks. Maybe the difference is in the compiler? I'm trying it on the 10.15 Catalina OSX with clang++ shipped with the Xcode 12.1:
clang++ --version
Apple clang version 12.0.0 (clang-1200.0.32.21)
Target: x86_64-apple-darwin19.6.0
I just followed the exact steps from the GitHub Actions and this compilation works for me too. So it's probably caused by some switch in our application configuration. I will inspect it more and let you know.
One side-note, I am using a Mac with gcc 10 compiled and installed with home-brew, and everything has been compiling fine. I tried using clang, but it didn't seem up-to-date with c++20.
We do compile on macOS with default compiler (clang) without issues. You can look in the Makefile for inspiration.
Hi there, should uWebSockets work also under OSX? I'm building multi-platform app including OSX and it seems there is an issue with thread_local in Clang compiler.
When compiling my app, in file Loop.h (https://github.com/uNetworking/uWebSockets/blob/master/src/Loop.h#L74) there is following LoopCleaner struct and thread_local usage:
It seems that in OSX there can't be a complex destructor for thread_local types: