-
Notifications
You must be signed in to change notification settings - Fork 570
internal/poll: fails to build on Windows #688
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
Comments
Thanks a lot for this excellent bug report, @lifeng1992. It looks like GopherJS 1.9-1 is not working with GOOS=windows. I only tested it on macOS. In the meantime, can you try a work around of cross compiling for macOS or Linux? E.g.:
I will work on fixing the bug soon. |
I can reproduce locally on macOS:
|
@shurcooL presumably we can add a cross compile for Windows to the CI build matrix to help catch these? |
Yes. (It would be an additional workload.) We can also reconsider the decision of supporting multiple GOOS values instead of having |
fails for me too on win10 too btw. |
Okay, I investigated this and posted #693. My original plan to resolve this issue was to make Unfortunately, that proposal won't work exactly as I imagined it (a 2 line PR), and fixing Windows support is going to be more work. I can't afford to spend time on supporting Windows now, so I won't be actively working on this. You can either continue to use |
Wow! Is this an official announcement that gopherjs development will not be supported on Windows? |
I think it's an announcement that @shurcooL won't be fixing it any time soon. Is using |
I just tried darwin. Though it is supposed to work (according to the documentation) I get compiler errors from gcc_darwin... - looks like some OS functions have marginally different names (e.g. the call does not have an underscore before the name and the provided function does). |
This is a valid issue. I'm not working on it, but anyone else who's interested can.
Can you post exact command(s) you ran and the output you got? |
Sure. First, the environment variables:
Now the build results after creating the GOOS=darwin environment variable and cleaning my project
|
Some progress. I had CGO=1. When I removed that and set GOARCH=amd64, everything compiles. However, the tests will not execute. I get:
|
Are you running Let me clarify, what I said earlier is that you should use You should install |
I did go install a long time ago. I'm developing an application.
So wherever I am using the go binary at present I should be using the
gopherjs binary - even for .go files that have nothing to do with gopherjs?
…-- PCB
_______________________________________________________________
Paul C. Brown
Paul C. Brown Consulting LLC - *Specializing in IT Architecture and
Strategy*
"Total architecture is not a choice - it is a concession to reality."
Email: pbrow <[email protected]>[email protected] Mobile: 518-424-5360
Architecture Books:
-- Succeeding With SOA: Realizing Business Value Through Total Architecture
<http://www.informit.com/authors/bio.aspx?a=53cdb713-432d-4e63-a5b1-3a9ee6fedbeb>
-- Implementing SOA: Total Architecture In Practice
<http://www.informit.com/authors/bio.aspx?a=53cdb713-432d-4e63-a5b1-3a9ee6fedbeb>
-- TIBCO Architecture Fundamentals
<http://www.informit.com/authors/bio.aspx?a=53cdb713-432d-4e63-a5b1-3a9ee6fedbeb>
-- Architecting Composite Applications and Services with TIBCO
<http://www.informit.com/authors/bio.aspx?a=53cdb713-432d-4e63-a5b1-3a9ee6fedbeb>
-- Architecting Complex-Event Processing Solutions with TIBCO
<http://www.informit.com/authors/bio.aspx?a=53cdb713-432d-4e63-a5b1-3a9ee6fedbeb>
The SOA Manifesto: soa-manifesto.or <http://soa-manifesto.org/>g
______________________________________________________________
On Tue, Sep 26, 2017 at 4:30 PM, Dmitri Shuralyov ***@***.***> wrote:
C:\Go\bin\go.exe install
Are you running go install? This issue is about gopherjs.
Let me clarify, what I said earlier is that you should use GOOS=darwin
with gopherjs binary, not with go binary.
You should install gopherjs normally, without any kind of cross
compilation.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#688 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ARw4jCpEp9nkcmwbf2_hwd7Qi9IagnI4ks5smV7bgaJpZM4PD5Dl>
.
|
This issue is about If you're compiling things not related to GopherJS, then this issue and discussion in it is not relevant. |
I think it is relevant. The environment variable affects both normal go compiles and gopherjs. You're telling me it's OK to have an environment variable setting that has to be different (i.e. changed) every time you switch from go work to gopherjs work? Remember, we got here because the GOOS=windows is broken for gopherjs. |
Ok, I think I understand your issue now. You're setting the Setting the
Doing that would be my recommendation. Hopefully that helps. |
Yes, that's the issue. Your suggestion will work, but let's recognize that
it is a work-around. It would be nice to fix the two underlying issues so
that environments can be consistent across go and gopherjs. To recap, these
are:
- gopherjs does not execute correctly when GOOS=windows
- go does not execute correctly when GOOS=darwin
…-- PCB
_______________________________________________________________
Paul C. Brown
Paul C. Brown Consulting LLC - *Specializing in IT Architecture and
Strategy*
"Total architecture is not a choice - it is a concession to reality."
Email: pbrow <[email protected]>[email protected] Mobile: 518-424-5360
Architecture Books:
-- Succeeding With SOA: Realizing Business Value Through Total Architecture
<http://www.informit.com/authors/bio.aspx?a=53cdb713-432d-4e63-a5b1-3a9ee6fedbeb>
-- Implementing SOA: Total Architecture In Practice
<http://www.informit.com/authors/bio.aspx?a=53cdb713-432d-4e63-a5b1-3a9ee6fedbeb>
-- TIBCO Architecture Fundamentals
<http://www.informit.com/authors/bio.aspx?a=53cdb713-432d-4e63-a5b1-3a9ee6fedbeb>
-- Architecting Composite Applications and Services with TIBCO
<http://www.informit.com/authors/bio.aspx?a=53cdb713-432d-4e63-a5b1-3a9ee6fedbeb>
-- Architecting Complex-Event Processing Solutions with TIBCO
<http://www.informit.com/authors/bio.aspx?a=53cdb713-432d-4e63-a5b1-3a9ee6fedbeb>
The SOA Manifesto: soa-manifesto.or <http://soa-manifesto.org/>g
______________________________________________________________
On Wed, Sep 27, 2017 at 2:34 PM, Dmitri Shuralyov ***@***.***> wrote:
Ok, I think I understand your issue now.
You're setting the GOOS=darwin environment variable globally, which then
fixes GopherJS for you, but breaks normal Go. If you don't set it, then
normal Go works, but GopherJS doesn't. Is that the issue you're having?
Setting the GOOS environment variable globally is not an ideal approach,
when you run into different commands where you want to use different
environment variables. I don't use Windows actively, but the last time I
did, it was possible to use a bash-like shell where you could prepend
environment variable assignments before executing a binary to set
environment variables for that process only, like so:
$ go build
$ GOOS=darwin gopherjs build
Doing that would be my recommendation. Hopefully that helps.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#688 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ARw4jPIfpKUZ9vqxVGigJ5j72l6KcykNks5smpU3gaJpZM4PD5Dl>
.
|
Good to hear.
It certainly is. That's why this issue is open and has bug, NeedsFix labels.
It will be nice to fix this issue, but, that doesn't mean the environments can be consistent. So, you're expected to set |
Sounds like it would be useful to have some gopherjs-specific environment variables that would override (if necessary) the go-specific variables, e.g. GOPHERJSOS. |
Add instructions for what people should do when building with GopherJS on unsupported platforms. Code generation works completely fine, but syscalls (e.g., for gopherjs run) will only work on supported platforms. Previously, this information was only in issues, people's heads, commit messages, etc. It should be documented in README to provide clarity. Rename "OS X" to "macOS", the current name of that operating system. Rearrange sections to place more relevant information first. Mention Linux before macOS consistently. Linux is placed first because it's open source and more freely available than the proprietary macOS, so it's easier to recommend it as an alternative. Resolves #770. Updates #776. Updates #688.
Add instructions for what people should do when building with GopherJS on unsupported platforms. Code generation works completely fine, but syscalls (e.g., for gopherjs run) will only work on supported platforms. Previously, this information was only in issues, people's heads, commit messages, etc. It should be documented in README to provide clarity. Rename "OS X" to "macOS", the current name of that operating system. Rearrange sections to place more relevant information first. Mention Linux before macOS consistently. Linux is placed first because it's open source and more freely available than the proprietary macOS, so it's easier to recommend it as an alternative. Resolves #770. Updates #776. Updates #688.
What version of Go are you using (go version)?
go version go1.9 windows/amd64
What version of GopherJS are you using ?
GopherJS 1.9-1
What did you do?
cat src/hello/main.go
gopherjs build hello/main.go
What did you expect to see?
No errors
What did you see instead?
I think the bug is caused by commit 956dce4
The text was updated successfully, but these errors were encountered: