Skip to content

It is not possible to have parallel cross compilers #3136

@gopherbot

Description

@gopherbot

by cole.mickens:

What steps will reproduce the problem?
1. Build one cross compiler.
2. Build another.
3. Attempt to use first cross compiler.

What is the expected output?
I expect to see a compiled binary for the target of the cross compiler.

What do you see instead?
One of a few different errors stemming from missing generated files that seem to be
cleaned up before each build, and thus not available for generated cross compilers after
subsequent other compiler builds.

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g/8g.

Which operating system are you using?
Linux amd64

Which revision are you using?  (hg identify)
96bd78e7d35e weekly/weekly.2012-02-22

Please provide any additional information below.

Basically, I'm using this gma_setup() and gma()
(https://github.com/colemickens/scripts/blob/master/dotfiles/_zshrc_golang) to build
cross compilers and then utilize them to build my project(s). The cross-compiler that I
build last works without error, but depending on the order I build them in, earlier
cross compilers don't work.

For example, that script currently builds linux/386, then linux/amd64, then windows/386.
The build for windows/386 completes fine, but I get the following error when building my
project for linux/386:

GOOS=linux GOARCH=386
# runtime
../../../go/src/pkg/runtime/asm_386.s:6 8a: No such file or directory: zasm_GOOS_GOARCH.h

If I change the order and build the linux/386 cross compiler last, I get the following
errors:

GOOS=windows GOARCH=386
# runtime
../../../go/src/pkg/runtime/extern.go:135: undefined: theGoos
../../../go/src/pkg/runtime/extern.go:135: cannot use theGoos as type string in const
initializer

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions