Skip to content
This repository has been archived by the owner on Aug 14, 2020. It is now read-only.

GOARCH is '386' and not 'i386' #571

Open
nponeccop opened this issue Feb 26, 2016 · 4 comments
Open

GOARCH is '386' and not 'i386' #571

nponeccop opened this issue Feb 26, 2016 · 4 comments

Comments

@nponeccop
Copy link

Apparently runtime.GOARCH value is put into image metadata when building images (it's "386" on 32-bit x86 systems):

https://github.com/appc/spec/blob/master/ace/build_aci#L25

However, during validation "i386" is used (with an extra i):

https://github.com/appc/spec/blob/master/schema/types/labels.go#L24

@jonboulle
Copy link
Contributor

Sigh, this is an unfortunate side effect of 41fc66c and is probably going to bite us with other combinations too. Any bright ideas here, aside from aliasing a bunch of combinations? /cc @mpasternacki

@nponeccop
Copy link
Author

Well, I actually built 32-bit appc on a 32-bit box. (In fact I tried to build rkt which uses the appc repo as a dependency. So reproduction isn't directly related to the commit. I think operation on 386 is not supported now, but it might be supported in the future.

I see the issue just as a typo - Go compiler developers call 32-bit 386, and you i386. Is it deeper?

@jonboulle
Copy link
Contributor

Sort of - check out some historical discussion here. We are not strictly using Go's concepts for these values (at the very least since the spec should be language-agnostic)

I am not really sure what to do here aside from removing the whitelist entirely.
@mpasternacki any bright ideas?

@nponeccop
Copy link
Author

The removal of the whitelist looks good. The architecture is commonly called i686, as many post-386 instructions are widely used these days. And the technically correct name (which nobody uses) is IA-32.

However, appc still needs a way to recognize incompatible images, so standard names of popular architectures should be in the standard document and recognized by everybody, I think.

Well, most of my thoughts have already been discussed in the issue mentioned by you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants