Skip to content
This repository has been archived by the owner on Mar 9, 2019. It is now read-only.

add bolt_arm64.go for arm64 #414

Merged
merged 1 commit into from Sep 9, 2015
Merged

add bolt_arm64.go for arm64 #414

merged 1 commit into from Sep 9, 2015

Conversation

jefby
Copy link
Contributor

@jefby jefby commented Sep 8, 2015

Support arm64 architecture

Signed-off-by: jefby jef199006@gmail.com

Signed-off-by: jefby <jef199006@gmail.com>
@jefby
Copy link
Contributor Author

jefby commented Sep 9, 2015

@benbjohnson Hi, could you please check the code? Thanks very much.

@benbjohnson
Copy link
Member

👍 thanks!

benbjohnson added a commit that referenced this pull request Sep 9, 2015
add bolt_arm64.go for arm64
@benbjohnson benbjohnson merged commit 9f37fd9 into boltdb:master Sep 9, 2015
const maxMapSize = 0xFFFFFFFFFFFF // 256TB

// maxAllocSize is the size used when creating array pointers.
const maxAllocSize = 0x7FFFFFFF
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is causing build errors:

src/github.com/boltdb/bolt/bolt_arm64.go|4 error| maxMapSize redeclared in this block previous declaration at src/github.com/boltdb/bolt/bolt_amd64.go:4                                                                                                                                                                                                                                                                         
src/github.com/boltdb/bolt/bolt_arm64.go|7 error| maxAllocSize redeclared in this block previous declaration at src/github.com/boltdb/bolt/bolt_amd64.go:7

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you running Go 1.4.x?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll move this discussion to #416.

@drsnyder drsnyder mentioned this pull request Sep 9, 2015
@benbjohnson
Copy link
Member

I reverted this change in this PR (#418). I attempted to add build tags to support it in this PR (#417) but no luck.

@jefby If you can get build tags working on Go 1.4 then we can put arm64 support back into Bolt.

@jefby
Copy link
Contributor Author

jefby commented Sep 10, 2015

@benbjohnson Hi,it can work in go 1.5beta3/1.5/1.5rc1, maybe version 1.4.x is not supported arm64.

@benbjohnson
Copy link
Member

It works in 1.5 but the problem is that 1.4 doesn't recognize arm64 as a GOARCH so it doesn't ignore the file. See the other PR for more details.

@dodgerblue
Copy link

Any current plans on merging the arm64 support in bolt? From the discussion, I understood that the build fails for Go 1.4.x. However, I am now trying to build Docker 1.9-dev on arm64 and this patch would be the missing piece. What's the current status?

@dodgerblue
Copy link

Oh and by the way - Go version is 1.5.

@benbjohnson
Copy link
Member

@dodgerblue The issue is that Go 1.4 (and before) don't recognize arm64 as an ARCH so builds fail if bolt_amd64.go is included. It's a tough choice to either support Go 1.4 or Go 1.5. If you can get the arm64 to be ignored by Go 1.4 then I'm cool to merge it in.

@dodgerblue
Copy link

@benbjohnson What about #417? Doesn't that fix the issue? I tested that on my machine and got no compile errors (albeit it's not an amd64, but a i386). So if I were to submit a PR, it would be consisted of #414 and #417.

@benbjohnson
Copy link
Member

@dodgerblue Hmm, yeah, you're right. If you can submit the PR and test it against Go 1.4 & 1.5 then I'll merge it in. 👍

@hqhq
Copy link
Contributor

hqhq commented Oct 9, 2015

@benbjohnson I sent a new PR #435 , added build tag for arm64, I tested it against Go 1.4.2 & 1.5, it works fine.
And I think we can add that kind of build tags for other platform specific files, like other Docker venders such as https://github.com/vishvananda/netns does? I'll sent a new PR soon.

@hqhq
Copy link
Contributor

hqhq commented Oct 9, 2015

I checked other vendors, like https://github.com/kr/pty
it only handles build tag for arm64, so maybe we can keep other files as they were.

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

Successfully merging this pull request may close these issues.

None yet

5 participants