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

attempt to support windows #9

Merged
merged 3 commits into from
May 26, 2016
Merged

attempt to support windows #9

merged 3 commits into from
May 26, 2016

Conversation

tamird
Copy link
Contributor

@tamird tamird commented Oct 28, 2015

Review on Reviewable

@bdarnell
Copy link
Contributor

How have you tested this? If we're going to attempt to support windows, appveyor.com is a good windows-based CI platform (and you can set up multiple CI systems with github; I do this for Tornado).

However, this seems like an unnecessary distraction as we're approaching beta and we should wait to explore this until post-beta.

@tamird
Copy link
Contributor Author

tamird commented Oct 28, 2015

Yes, I agree. I was trying to get cross-compilation working using https://github.com/karalabe/xgo, and wanted to document what I had tried. I won't be actively working on this.

@tamird
Copy link
Contributor Author

tamird commented Oct 28, 2015

I should mention that this currently fails in xgo: karalabe/xgo#26

// #cgo CPPFLAGS: -DNDEBUG -DSNAPPY -DLZ4
// #cgo darwin CPPFLAGS: -DOS_MACOSX -DROCKSDB_PLATFORM_POSIX
// #cgo linux CPPFLAGS: -DOS_LINUX -DROCKSDB_PLATFORM_POSIX
// #cgo windows CPPFLAGS: -DOS_WIN
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is someone asking for windows support? Just curious what motivated this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, I was trying to get cross-compilation working so we could post binaries and wanted to see how far I could get with windows.

@petermattis
Copy link
Contributor

LGTM

- Downcase some `#include`s since we run on case-sensitive file systems
- Avoid MSVC's `i64` suffix which isn't supported in GCC
TL;DR: Portable Executables (Windows) don't support missing symbols
after link-time, and the go toolchain doesn't link dependencies into
cgo archives.

See golang/go#14985.
@tamird
Copy link
Contributor Author

tamird commented May 26, 2016

Hey, this is ready for another look. For now, I've worked around some issues by omitting snappy on windows. This compiles successfully with xgo -go 1.6.1 --targets=windows-6.0/amd64 ..

@tbg
Copy link
Member

tbg commented May 26, 2016

:lgtm:, but with a healthy dose of science dog.

Previously, tamird (Tamir Duberstein) wrote…

Hey, this is ready for another look. For now, I've worked around some issues by omitting snappy on windows. This compiles successfully with xgo -go 1.6.1 --targets=windows-6.0/amd64 ..


Reviewed 6 of 8 files at r1, 6 of 6 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@tamird tamird merged commit 88fbafd into cockroachdb:master May 26, 2016
@tamird tamird deleted the windows-experiments branch May 26, 2016 18:29
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

Successfully merging this pull request may close these issues.

None yet

4 participants