Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When will folly support VS ? #529

Closed
pengweichu opened this issue Dec 10, 2016 · 25 comments
Closed

When will folly support VS ? #529

pengweichu opened this issue Dec 10, 2016 · 25 comments

Comments

@pengweichu
Copy link

Hello, I really would like to use folly in my project, when will it support Windows ?

Thanks

@Orvid
Copy link
Contributor

Orvid commented Dec 12, 2016

The most definitive answer I can give currently is: soon. I've been working on getting Folly building and functional on Windows for quite a while now, and have things working, it's just the build process that's currently blocking. I have it building locally, I just have to make it so that everyone else can build it.

@pengweichu
Copy link
Author

@Orvid thanks for update and thanks for your works!

@gogowishfly
Copy link

Great!

@sunwangme
Copy link

great

@KindDragon
Copy link
Contributor

KindDragon commented May 9, 2017

You can now try folly from vcpkg, just run command vcpkg install folly:x64-windows
Related #405, #54

@spartucus
Copy link

Great!
It will be better if we can build folly from source on Windows.

@KindDragon
Copy link
Contributor

You can do this too, but you need to install before: zlib, openssl, boost, libevent, double-conversion, glog, gflags, lz4, liblzma, snappy

@PhoebeHui
Copy link

any updates for this?

@KindDragon
Copy link
Contributor

You can build it for Windows

@PhoebeHui
Copy link

Thank you KindDragon!

Could you share the steps for building it with MSVC on Windows? or some instructions?

I only get the source of the zlib, openssl, boost, libevent, double-conversion, glog, gflags, lz4, liblzma, snappy, it's hard to get all of them build & install successfully for me. Is there some setup scripts like OSQuery: https://github.com/facebook/osquery/blob/master/tools/make-win64-dev-env.bat, I have install some packages on C:\ProgramData\chocolatey\lib by execute the scripts, but I don't how to make that works with Folly.

@KindDragon
Copy link
Contributor

I don't have instruction for 3rd party libraries. I just use them from vcpkg
To build folly you need CMake and Python

@lazylazypig
Copy link

@KindDragon
Hi,
I tested a very simple example about folly::Promise/Future on vs2015. but when i include the header "folly/futures/Future.h", i got errors as bellow:
Error C2589 '(': illegal token on right side of '::'
Error C2059 syntax error: '::
....

the errors locate at file folly/detail/CacheLocality.h, line 267:
static_assert(kMaxCpus - 1 <= std::numeric_limits::max(),
"stripeByCpu element type isn't wide enough");

what's the ploblem and how to fix it? thanks

@KindDragon
Copy link
Contributor

@lazylazypig I compiled folly with VS2017

@lazylazypig
Copy link

lazylazypig commented Jun 28, 2017

@KindDragon thanks for your reply. when you build folly with VS2017, did you just use the command 'vcpkg install folly:x64-windows' or you build it from the latest source code from github?

@KindDragon
Copy link
Contributor

KindDragon commented Jun 29, 2017

@lazylazypig Yes, 'vcpkg install folly:x64-windows'.
`'vcpkg install folly:x64-windows --head' (latest master) failing for me with error:

folly-master\folly\experimental\logging\LogStreamProcessor.cpp(98): error C2039: 'category': is not a member of 'folly::XlogFileScopeInfo'

They often break MSVC build.

@Orvid
Copy link
Contributor

Orvid commented Jun 29, 2017

Which version of MSVC 2015 are you trying to build with. We do partially support VS 2015, but only with Update 3 installed. The builds do tend to break on master fairly often unfortunately :(

@KindDragon
Copy link
Contributor

KindDragon commented Jun 29, 2017

@lazylazypig I can compile tag v2017.05.08.00 with MSVC2015U3 and MSVC2017

@Maktm
Copy link

Maktm commented Jul 7, 2017

@KindDragon Why is folly only supported on x64? Was this a design decision from the beginning and if so, why?

microsoft/vcpkg#1395 (comment)

@vslavik
Copy link

vslavik commented Jul 7, 2017

Why is folly only supported on x64?

Ah, that's a shame especially on Windows. Confusing too, because there seem to be relatively recent commits that fix 32bit compilation... I too would love to know which parts this comes from, because I hoped to use folly's much-better futures instead of Boost.Thread's mess.

@KindDragon
Copy link
Contributor

IDK, ask @Orvid

@Orvid
Copy link
Contributor

Orvid commented Jul 11, 2017

The Windows port is 64-bit only by design. The socket's portability API relies on the fact that a HANDLE and an int are separately overloadable. That's not possible in 32-bit :( In theory there are parts of Folly that probably work on 32-bit Windows, but it's not tested at all.

There is part of Folly that is tested on 32-bit, but only on IOS and Android toolchains. The rest of Folly is tested exclusively on 64-bit platforms.

@JunielKatarn
Copy link
Contributor

Hi. I'm trying to use folly futures on windows.
Is this possible at all?

The simplest CPP source:

#include <folly/futures/Future.h>

spits this compiler error due to ptrhead.h:

folly/MicroSpinLock.h(45): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory

@yfeldblum
Copy link
Contributor

@JunielKatarn - It looks like you have an old version of Folly - this particular #include was addressed in 37af039.

@JunielKatarn
Copy link
Contributor

Got it. Thanks!

@Orvid
Copy link
Contributor

Orvid commented Sep 20, 2018

Windows support is largely complete, with a few minor issues remaining, so I'm going to close this out :)

@Orvid Orvid closed this as completed Sep 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests