facebook / wangle

Wangle is a framework providing a set of common client/server abstractions for building services in a consistent, modular, and composable way.
Apache License 2.0
3.05k stars 537 forks source link

Build error on OSX #6

Closed umanwizard closed 8 years ago

umanwizard commented 8 years ago

[ 30%] Building CXX object CMakeFiles/wangle.dir/channel/FileRegion.cpp.o /Users/btv/wangle/wangle/channel/FileRegion.cpp:54:15: error: use of undeclared identifier 'SPLICE_F_NONBLOCK' int flags = SPLICE_F_NONBLOCK | SPLICE_F_MORE;

bmatheny commented 8 years ago

@jsedgwick SPLICE_F_NONBLOCK is certainly a Linux only thing. Probably need an #ifndef SPLICE_F_NONBLOCK.

umanwizard commented 8 years ago

I think ::splice doesn't exist on OSX

bmatheny commented 8 years ago

It does not. Sorry I wasn't at a computer, I only saw the line of code from the error (not the function call where flags was used).

umanwizard commented 8 years ago

FYI, this is blocking FBThrift from building on OSX (see the issue I referenced above)

ryanrhee commented 8 years ago

ping

umanwizard commented 8 years ago

Ping, is this still the state of the world?

djwatson commented 8 years ago

Send a pull request? We can probably just disable FileRegion entirely for osx

elbamos commented 8 years ago

This problem still exists as of today. Is there any way I can help?

BTW - @umanwizard thank you for your efforts in collating and organizing all the various reasons the FB packages fail to build on OS X.

elbamos commented 8 years ago

Oh - and after simply deleting FileRegion from the cmake files, wangle does compile, and most tests pass, but:

The following tests FAILED:
      5 - BootstrapTest (OTHER_FAULT)
      7 - BroadcastPoolTest (OTHER_FAULT)
     15 - ThreadPoolExecutorTest (OTHER_FAULT)
oh-its-jimjam commented 8 years ago

Playing devil's advocate here... we could create an OS X implementation of FileRegion using sendfile? It's equivalent to splice but limited to writing to sockets.