-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Support building and running on Windows #39
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Hi devs, any chance of merging this in? |
Indeed having a build script or whatever for Windows, for those rare events where one must do such things, would be very nice. |
Hello, what is needed to merge this pull request? Is there anything I can do to help? I know this is now a version behind. |
I can sync up this branch with latest on master. I would just like a member from the fasttext team to take a look at it and see if this can be merged |
I've merged upstream changes with mine. Here's a new binary build as of 2017-05-13 https://github.com/xiamx/fastText/releases/tag/v0.20170513 |
…enerate" This reverts commit b622c44.
Hello, has this been merged? |
Nope. But if using an earlier version is fine for you, try https://github.com/xiamx/fastText/releases |
Yes I have been using this great contribution (thank you for that!) but want to test the latest versions as well. |
Hello @xiamx , Thank you for your pull request and for being an active member of our community! We recently added support for cmake. This should also work for Windows, but please let me know if this is not the case for you. We also resolved the compilation issue you're mentioning here. I'm going to close this pull request for now, but please feel free to reopen it at any time if your issue isn't resolved. Thanks, |
Have people experienced smooth Windows installations then? or shall I rather consult the mailing list... |
Have the changes for enabling Windows installation been merged then? what is the procedure for building on Windows if so? |
@matanster I have not tried the latest upstream code. But if the project now builds with CMake, it's just about installing CMake on Windows and using the CMake GUI tool to generate a Visual Studio solution file and build using the generated solution file |
Brilliant! will try that soon
…On Sun, Dec 31, 2017 at 6:57 PM, Mengxuan Xia ***@***.***> wrote:
@matanster <https://github.com/matanster> I have not tried the latest
upstream code. But if the project now builds with CMake, it's just about
installing CMake on Windows and using the CMake GUI tool to generate a
Visual Studio solution file and build using the generated solution file
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEw746FkMbj9XHGXRXBFpkVtfebUmt1Mks5tF7zigaJpZM4JnhnI>
.
|
By the way, @xiamx do you think it matters which edition of Visual Studio is used? for example we have now three editions to download https://www.visualstudio.com/vs/cplusplus/ |
@matanster I tried to build the latest code with CMake 3.10.0-rc4 and Visual Studio 2017 (Community), however I had to make few changes to make it work.
After 1, CMake will generate (I used Visual Studio 15 2017 Win64 generator) the fasttext.sln file under build dir, which you can open in VS to build but you will get handful of errors:
After all these changes, build will be successful here's my VS build output and CMake log I did minimal testing with and without With out thread flag: With thread set: Hope it helps! P.S - @cpuhrsch can you comment on the changes and how this will effect the resulting fasttext.exe, thanks! |
@suamin thanks a lot for the precise depiction. This easily reproduces and works (do you get your fasttext.exe executable built under Yet, the generated executable aborts a lot of the time for me, without any helpful error message. It seems that instead of printing an error message to the console it only aborts. E.g. if the input file name specified for This is problematic as in my experimentation oftenly the same fasttext command succeeds and later fails when repeated, and in those cases the error message is really necessary for troubleshooting. Maybe something about stdout or console output that needs to be adapted for Windows (this repeatedly happens in both the plain CMD console of Windows 10 and in the so-called "Visual Studio Developer Command Prompt", as well after restarting the OS). Or it is actually some Windows setting I'm not aware of, and have never tweaked, that relates to how program |
@matanster Yes, you can get the I'm not very sure if this has anything to do with Windows but I can acknowledge The issue is with exceptions that are being thrown and they are not well handled in the code. First the Example Case:
and re-do the whole steps (configure, generate (cmake) and build (VS)) and given an invalid I haven't gone through all the source files but if this is the cause (which apparently definitely looks like) then try catch blocks will be needed or if there is a neat hack to automatically redirect all @xiamx yes that makes sense. I think pthreads can be supported if subsytem is set to Last note, without pthreads flag I was worried if multiple threads are actually utilized or not with resulting executable, but they are: In this use case I set the |
I might be wrong, |
Might be helpful for those who don't want to build fastText locally on windows. My fork now has fastText automatically built with CI, tracking master branch https://github.com/xiamx/fastText/releases |
Hi,
I added support for building on windows using Visual Studio 2015.
Binary builds can be found here