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

cmd/go: windows build doesn't report write error #18014

Closed
pczajkowskiw opened this issue Nov 22, 2016 · 12 comments
Closed

cmd/go: windows build doesn't report write error #18014

pczajkowskiw opened this issue Nov 22, 2016 · 12 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@pczajkowskiw
Copy link

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go1.7 windows/amd64

What operating system and processor architecture are you using (go env)?

GOARCH=amd64
GOHOSTOS=windows
GOOS=windows
GOGCCFLAGS=-m64 -mthreads -fmessage-length=0

What did you do?

Compiled 'test.exe', run it, tried to compile to same file again while running.

What did you expect to see?

Write error.

What did you see instead?

Nothing. Go build exited without error, but 'test.exe' was obviously not updated.

@davecheney
Copy link
Contributor

Please use -x to confirm that the go tool is compiling something.

@pczajkowskiw
Copy link
Author

pczajkowskiw commented Nov 22, 2016

OK, but shouldn't compiler inform user about such error by default? Any text editor does, for instance. And it's not displaying error message anyway.

@davecheney
Copy link
Contributor

If there is nothing to compile, go build will do nothing.

On 22 Nov. 2016, at 20:58, piotrfti notifications@github.com wrote:

OK, but shouldn't compiler inform user about such error by default? Any text editor does, for instance.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@bradfitz bradfitz added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Nov 22, 2016
@bradfitz
Copy link
Contributor

Please copy & paste here the command you run (with -x added) and its output.

@pczajkowskiw
Copy link
Author

go build -ldflags="-H windowsgui" -x

WORK=AppData\Local\Temp\go-build870179366 mkdir -p $WORK\_\C_\Data\git\translations\go\gui\quarkChecker\_obj\ mkdir -p $WORK\_\C_\Data\git\translations\go\gui\quarkChecker\_obj\exe\ cd C:\Data\git\translations\go\gui\quarkChecker "c:\\Data\\Portable\\PortableApps\\go\\pkg\\tool\\windows_amd64\\compile.exe" -o "AppData\\Local\\Te mp\\go-build870179366\\_\\C_\\Data\\git\\translations\\go\\gui\\quarkChecker.a" -trimpath "AppData\\ Local\\Temp\\go-build870179366" -p main -buildid b9a1985bd9270962f5b434b31379e26bfb1c5797 -D _/C_/Data/git/translations/ go/gui/quarkChecker -I "AppData\\Local\\Temp\\go-build870179366" -pack "C:\\Data\\git\\translations\ \go\\gui\\quarkChecker\\checker.go" "C:\\Data\\git\\translations\\go\\gui\\quarkChecker\\quarkChecker.go" pack r "AppData\\Local\\Temp\\go-build870179366\\_\\C_\\Data\\git\\translations\\go\\gui\\quarkCheck er.a" "C:\\Data\\git\\translations\\go\\gui\\quarkChecker\\rsrc.syso" # internal cd . "c:\\Data\\Portable\\PortableApps\\go\\pkg\\tool\\windows_amd64\\link.exe" -o "AppData\\Local\\Temp\ \go-build870179366\\_\\C_\\Data\\git\\translations\\go\\gui\\quarkChecker\\_obj\\exe\\a.out.exe" -L "C:\\Users\\pczajko\ \AppData\\Local\\Temp\\go-build870179366" -extld=gcc -buildmode=exe -buildid=b9a1985bd9270962f5b434b31379e26bfb1c5797 -H windowsgui "AppData\\Local\\Temp\\go-build870179366\\_\\C_\\Data\\git\\translations\\go\\gui\\quark Checker.a" cp $WORK\_\C_\Data\git\translations\go\gui\quarkChecker\_obj\exe\a.out.exe quarkChecker.exe

I've stripped c:\users\username part.

@davecheney
Copy link
Contributor

It doesn't look like you've set GOPATH

On 22 Nov. 2016, at 22:54, piotrfti notifications@github.com wrote:

go build -ldflags="-H windowsgui" -x

WORK=AppData\Local\Temp\go-build870179366 mkdir -p $WORK_\C_\Data\git\translations\go\gui\quarkChecker_obj\ mkdir -p $WORK_\C_\Data\git\translations\go\gui\quarkChecker_obj\exe\ cd C:\Data\git\translations\go\gui\quarkChecker "c:\Data\Portable\PortableApps\go\pkg\tool\windows_amd64\compile.exe" -o "AppData\Local\Te mp\go-build870179366_\C_\Data\git\translations\go\gui\quarkChecker.a" -trimpath "AppData\ Local\Temp\go-build870179366" -p main -buildid b9a1985bd9270962f5b434b31379e26bfb1c5797 -D /C/Data/git/translations/ go/gui/quarkChecker -I "AppData\Local\Temp\go-build870179366" -pack "C:\Data\git\translations\ \go\gui\quarkChecker\checker.go" "C:\Data\git\translations\go\gui\quarkChecker\quarkChecker.go" pack r "AppData\Local\Temp\go-build870179366_\C_\Data\git\translations\go\gui\quarkCheck er.a" "C:\Data\git\translations\go\gui\quarkChecker\rsrc.syso" # internal cd . "c:\Data\Portable\PortableApps\go\pkg\tool\windows_amd64\link.exe" -o "AppData\Local\Temp\ \go-build870179366_\C_\Data\git\translations\go\gui\quarkChecker_obj\exe\a.out.exe" -L "C:\Users\pczajko\ \AppData\Local\Temp\go-build870179366" -extld=gcc -buildmode=exe -buildid=b9a1985bd9270962f5b434b31379e26bfb1c5797 -H windowsgui "AppData\Local\Temp\go-build870179366_\C_\Data\git\translations\go\gui\quark Checker.a" cp $WORK_\C_\Data\git\translations\go\gui\quarkChecker_obj\exe\a.out.exe quarkChecker.exe

I've stripped c:\users\username part.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@pczajkowskiw
Copy link
Author

It's set to c:\Data\go. And sometimes there's mv instead of cp, like "mv $WORK_\C_\Data\git\translations\go\gui\quarkChecker_obj\exe\a.out.exe quarkChecker.exe".

@davecheney
Copy link
Contributor

It doesn't look like your source is in C:\data\go\src

On Wed, 23 Nov 2016, 20:18 piotrfti notifications@github.com wrote:

It's set to c:\Data\go. And sometimes there's mv instead of cp, like "mv
$WORK_\C_\Data\git\translations\go\gui\quarkChecker_obj\exe\a.out.exe
quarkChecker.exe".


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
#18014 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAAcA6Puw5AC_t1R4Ljvt3_wii8xlxlWks5rBAT1gaJpZM4K5MeU
.

@pczajkowskiw
Copy link
Author

That's true, it's in completely different location.

@sgen
Copy link

sgen commented Nov 23, 2016

Your GOPATH structure isn't optional. Go source code must reside in GOPATH\src. See Getting Started.

@rsc
Copy link
Contributor

rsc commented Jan 4, 2017

Why is it obvious that test.exe was not updated?

Please show a command transcript (full commands and output) with these commands in sequence:

  • build
  • dir test.exe
  • build
  • dir test.exe

Thanks.

@rsc rsc changed the title Windows compiler doesn't report write error cmd/go: windows build doesn't report write error Jan 4, 2017
@bradfitz bradfitz added this to the Unplanned milestone Jan 5, 2017
@rsc
Copy link
Contributor

rsc commented Jun 9, 2017

Timed out waiting for reply.

@rsc rsc closed this as completed Jun 9, 2017
@golang golang locked and limited conversation to collaborators Jun 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

6 participants