facebook / wdt

Warp speed Data Transfer (WDT) is an embeddedable library (and command line tool) aiming to transfer data between 2 systems as fast as possible over multiple TCP paths.
https://www.facebook.com/WdtOpenSource
Other
2.86k stars 391 forks source link

Build failure on macOs 10.12 #156

Closed tckb closed 7 years ago

tckb commented 7 years ago

Hey, I am trying to build wdt on osx 10.12, I followed the instructions for osx. I tried building with both Xcode & Unix Make Files I see the same error:

[ 51%] Performing configure step for 'gtest'
In file included from /Users/tckb/Documents/Work/wdt/SenderThread.cpp:9:
/Users/tckb/Documents/Work/wdt/../wdt/SenderThread.h:86:31: error: no member named 'to' in namespace 'folly'
    threadStats_.setId(folly::to<std::string>(threadIndex_));
                       ~~~~~~~^
/Users/tckb/Documents/Work/wdt/../wdt/SenderThread.h:86:45: error: expected '(' for function-style cast or type construction
    threadStats_.setId(folly::to<std::string>(threadIndex_));
                                 ~~~~~~~~~~~^
In file included from /Users/tckb/Documents/Work/wdt/Sender.cpp:11:
/Users/tckb/Documents/Work/wdt/../wdt/SenderThread.h:86:31: error: no member named 'to' in namespace 'folly'
    threadStats_.setId(folly::to<std::string>(threadIndex_));
                       ~~~~~~~^
/Users/tckb/Documents/Work/wdt/../wdt/SenderThread.h:86:45: error: expected '(' for function-style cast or type construction
    threadStats_.setId(folly::to<std::string>(threadIndex_));
                                 ~~~~~~~~~~~^

Am I missing something here?

ldemailly commented 7 years ago

that's strange. folly::to is defined in folly/Conv.h that cmake looks for when configuring

can you paste all of your cmake invocation and output ?

also you can see a working build on travis : https://travis-ci.org/facebook/wdt/jobs/228147813

compare what that does with your env ?

ldemailly commented 7 years ago

Also I just checked on my personal Mac running 10.12.4 and Xcode 8.3 and everything worked fine

Make sure you have folly checked out and up to date too ?

tckb commented 7 years ago

@ldemailly very strange indeed. folly was checkout by the travis-osx.sh script. initially it complaint for folly but -DFOLLY_SOURCE_DIR started the build. here's the complete log

ldemailly commented 7 years ago

the script is sourced when doing from scratch builds on travis and sets some env vars etc - it's more to be used as an example than actually to be used on a dev machine where the setup only needs to be done once

folly should be a sister directory not inside wdt

layout is typically something like

~/github ~/github/wdt - where you git pull/clone wdt (source tree isn't where you build) ~/github/folly - for folly source tree ~/github/wdt-build/ - where you build; different from source tree i.e. where you cmake ../wdt

I think the folly conf file we generate in the build directory collides with your checkout as in your log both are same directory

from your make output it seems also you didn't get a proper install of boost?

tckb commented 7 years ago

@ldemailly I've installed boost via homebrew, I followed the instructions exactly as specified here Also, I tried placing the folly in same directory level as wdt I get the same error 😞

Same thing with xcode image

ldemailly commented 7 years ago

@tckb Apologies for the delay, somehow I didn't get a notification you updated this issue

Can you follow https://github.com/facebook/wdt/blob/master/build/BUILD.md#or-manualstep-by-step-using-brew instead

the travis script is broken at the moment because glog dropped their configure script

tckb commented 7 years ago

@ldemailly thank goodness! finally I managed to install and the install went smoothly. I think as you mentioned the culprit is the travis build script.