uNetworking / uSockets

Miniscule cross-platform eventing, networking & crypto for async applications
Apache License 2.0
1.29k stars 268 forks source link

Add to homebrew #75

Closed ghost closed 2 years ago

ghost commented 5 years ago

Compiling on macOS is not a great experience as it just errors on sys/epoll.h. This should be improved somehow.

ghost commented 5 years ago

You need libuv for macos anyways and you get it via homebrew so it makes sense to add uws to homebrew so that you can install the entire thing from one de facto place

DJDan commented 5 years ago

@alexhultman I am trying to compile on OSX the following server (which uses uWebSockets) https://github.com/nagalun/multiplayerpiano-server/issues/19

I have tried uwebsocket 0.15 / uwebsocket 0.15.7 and 0.16a4 but none of the above seem to compile properly on OSX Mojave (10.14.5)

How do I actually get the latest uwebsocket (0.16a4) working properly without errors?

NOTE: See newerror.txt at the end of the other page for detailed errors.

ghost commented 5 years ago

Wrong login..

It is much improved now, hit "make" and it works on macOS

DJDan commented 5 years ago

@alexhultman Can you please try compiling on macOS Mojave 10.14.5 with the multiplayer piano server program. I have tried copying the new uWebSockets into that but it still has errors. https://github.com/nagalun/multiplayerpiano-server

Always getting the following errors

./lib/uWebSockets/src/Libuv.h:4:10: fatal error: uv.h: No such file or directory
    4 | #include <uv.h>
      |          ^~~~~~
compilation terminated.
make: *** [build/database.o] Error 1

==== Also

./lib/uWebSockets/src/libusockets.h:62:10: fatal error: interfaces/timer.h: No such file or directory
   62 | #include "interfaces/timer.h"
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [build/database.o] Error 1
ghost commented 5 years ago

You have to ask the one working on that project or leave the task for someone else.

snej commented 5 years ago

Thanks for removing the libuv dependency on Apple platforms! You can now remove these lines from the Makefile:

# If we are on macOS we need libuv
ifeq ($(shell uname -s),Darwin)
    override LDFLAGS += -luv
endif
xiandong79 commented 4 years ago

do we have "brew install" now ??

ghost commented 4 years ago

No but it could be added