lpereira / lwan

Experimental, scalable, high performance HTTP server
https://lwan.ws
GNU General Public License v2.0
5.94k stars 548 forks source link

Error when building on Mac #354

Closed Zabrane closed 1 year ago

Zabrane commented 1 year ago

The build is failing on MacOS:

$ sw_vers                                                                                                                                                                                                                                                           
ProductName:        macOS
ProductVersion:     13.1
BuildVersion:       22C65

$ clang -v
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: x86_64-apple-darwin22.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

$ cmake .. -DCMAKE_BUILD_TYPE=Release
[...]
3 warnings generated.
[ 14%] Building C object src/lib/CMakeFiles/lwan-static.dir/lwan-template.c.o
clang: warning: argument unused during compilation: '-fno-semantic-interposition' [-Wunused-command-line-argument]
[ 15%] Building C object src/lib/CMakeFiles/lwan-static.dir/lwan-thread.c.o
clang: warning: argument unused during compilation: '-fno-semantic-interposition' [-Wunused-command-line-argument]
/Users/zab/lwan/src/lib/lwan-thread.c:1365:13: error: implicit declaration of function 'adjust_thread_affinity' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
            adjust_thread_affinity(thread);

Help appreciated.

lpereira commented 1 year ago

I don't have a Mac anymore, so it's kinda hard to maintain the Mac port without breaking anything. Sorry for that

In the meantime, you can probably comment out the function call. Lwan should work without this.

On Thu, Jan 26, 2023, at 10:49 AM, Zabrane wrote:

The build is failing on MacOS:

$ sw_vers
ProductName: macOS ProductVersion: 13.1 BuildVersion: 22C65

$ clang -v Apple clang version 14.0.0 (clang-1400.0.29.202) Target: x86_64-apple-darwin22.2.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

$ cmake .. -DCMAKE_BUILD_TYPE=Release [...] 3 warnings generated. [ 14%] Building C object src/lib/CMakeFiles/lwan-static.dir/lwan-template.c.o clang: warning: argument unused during compilation: '-fno-semantic-interposition' [-Wunused-command-line-argument] [ 15%] Building C object src/lib/CMakeFiles/lwan-static.dir/lwan-thread.c.o clang: warning: argument unused during compilation: '-fno-semantic-interposition' [-Wunused-command-line-argument] /Users/zab/lwan/src/lib/lwan-thread.c:1365:13: error: implicit declaration of function 'adjust_thread_affinity' is invalid in C99 [-Werror,-Wimplicit-function-declaration] adjust_thread_affinity(thread); Help appreciated.

— Reply to this email directly, view it on GitHub https://github.com/lpereira/lwan/issues/354, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAADVGOUT74OU2G6IZKQJMTWULBMHANCNFSM6AAAAAAUH244MQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>

lpereira commented 1 year ago

I pushed a commit that might fix this. Please report if it's fixed for you!