Skip to content

cmd/go: 'build output "...." already exists and is not an object file' error after interrupted compilation #57039

@woody77

Description

@woody77

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

$ go version
go version go1.19.3 linux/amd64

Does this issue reproduce with the latest release?

Unknown.

What did you do?

Rough steps:

  1. Interrupt a build with ^C
  2. Make some changes that cause our build system to attempt to rebuild the binary (like git rebase)
  3. Run the build

What did you expect to see?

No error.

What did you see instead?

go build go.fuchsia.dev/fuchsia/tools/fidl/fidlmerge: build output "../../../../fidlmerge" already exists and is not an object file

Upon inspection, the file starts with 4KB of 0x00s, which definitely isn't an object file. But the block of the file at 0x1000 does match the contents of the file that's written by the compiler if I delete the "bad" file and re-run the build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GoCommandcmd/goNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions