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

Fix building on OpenBSD by bumping azure-storage-blob-go #17966

Merged
merged 4 commits into from
Jul 23, 2019
Merged

Fix building on OpenBSD by bumping azure-storage-blob-go #17966

merged 4 commits into from
Jul 23, 2019

Conversation

alexandervdm
Copy link
Contributor

Building geth on OpenBSD has been broken since 1.8.13 when a hard dependency on azure-storage-blob-go was added. This library contained a bug that was recently fixed. Upstream has now packaged a new 0.3.0 release that includes this fix and no breaking changes as far as I can tell.

This PR bumps go-ethereum's azure-storage-blob to 0.3.0. It looks correct to me, but I should note that I'm not a Go guy, so suggestions are welcomed.

@adamschmideg adamschmideg added this to the 1.9.1 milestone Jun 20, 2019
@gballet
Copy link
Member

gballet commented Jul 3, 2019

@alexandervdm I have been trying to reproduce the problem while investigating your fix. Could you please describe what the problem you run into is, and how to reproduce it? I have found a series of unrelated issues that I'm in the process of fixing, but can't reproduce the exact isse that your fix addresses.

@alexandervdm
Copy link
Contributor Author

@gballet
The problem can be reproduced as follows; unpack a go-ethereum release >= 1.8.13 on a clean OpenBSD system with the go package installed and try to compile. In the example below I've used OpenBSD 6.5 (latest release at this time) that comes with go 1.12.1. The following error is then displayed:

root@gethtest> cd go-ethereum-1.8.27/                                                                                              
root@gethtest> make geth
build/env.sh go run build/ci.go install ./cmd/geth
# github.com/ethereum/go-ethereum/vendor/github.com/Azure/azure-storage-blob-go/2018-03-28/azblob
vendor/github.com/Azure/azure-storage-blob-go/2018-03-28/azblob/highlevel.go:137:7: undefined: mmf
vendor/github.com/Azure/azure-storage-blob-go/2018-03-28/azblob/highlevel.go:139:12: undefined: newMMF
vendor/github.com/Azure/azure-storage-blob-go/2018-03-28/azblob/highlevel.go:288:13: undefined: newMMF
*** Error 2 in /root/go-ethereum-1.8.27 (Makefile:15 'geth')

The problem is that the version of azure-storage-blob-go inside the vendor directory does not include build flags for openbsd. This problem was reported upstream here.

The way I see it there are three possible solutions:

  1. Bump the azure-storage-blob-go package in vendor to 0.3.0 (this PR)
  2. Patch the azure-storage-blob-go package in vendor to include the build flag for openbsd. Example.
  3. Don't compile the azure functionality unless specified by a make flag

Copy link
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

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

I've updated the Azure libs to latest ones. LGTM

@karalabe karalabe merged commit 57d9c93 into ethereum:master Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants