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

Unable to build with go 1.11 #29

Closed
max-k opened this issue Nov 4, 2018 · 11 comments
Closed

Unable to build with go 1.11 #29

max-k opened this issue Nov 4, 2018 · 11 comments

Comments

@max-k
Copy link

max-k commented Nov 4, 2018

Here is the output of make dev using go 1.11.1:

go build\
 -ldflags "-X github.com/pydio/cells/common.version=0.2.0\
 -X github.com/pydio/cells/common.BuildStamp=2018-01-01T00:00:00\
 -X github.com/pydio/cells/common.BuildRevision=dev"\
 -o cells\
 main.go
# command-line-arguments
github.com/pydio/cells/vendor/golang.org/x/crypto/blake2b.supportsAVX2: relocation target runtime.support_avx2 not defined
github.com/pydio/cells/vendor/golang.org/x/crypto/blake2b.supportsAVX: relocation target runtime.support_avx not defined
make: *** [Makefile:49: dev] Error 2

It works perfectly with go 1.10.3.

Maybe this issue could help: golang/go#25098.

@cdujeu
Copy link
Member

cdujeu commented Nov 5, 2018

Hello @max-k thanks for this! we're on it, probably a lib to update in vendor

@Yamilquery
Copy link

Yamilquery commented Nov 7, 2018

Yes. It also can not be built using version 1.11.2 and even also with go version go1.10.5 darwin/amd64 in Mac OS X

go build\
         -tags dev\
         -ldflags "-X github.com/pydio/cells/common.version=0.2.0\
         -X github.com/pydio/cells/common.BuildStamp=2018-01-01T00:00:00\
         -X github.com/pydio/cells/common.BuildRevision=dev"\
         -o cells\
         .
# github.com/pydio/cells/vendor/github.com/rjeczalik/notify
vendor/github.com/rjeczalik/notify/watcher_fsevents_cgo.go:51:216: cannot use nil as type _Ctype_CFAllocatorRef in argument to func literal
vendor/github.com/rjeczalik/notify/watcher_fsevents_cgo.go:165:47: cannot use nil as type _Ctype_CFAllocatorRef in argument to _Cfunc_CFStringCreateWithCStringNoCopy
vendor/github.com/rjeczalik/notify/watcher_fsevents_cgo.go:166:225: cannot use nil as type _Ctype_CFAllocatorRef in argument to func literal
make: *** [dev] Error 2

@Yamilquery
Copy link

Yamilquery commented Nov 7, 2018

In this Issue they suggest me to execute the following command to convert nil to 0:

go tool fix -r cftype ./

However it doesn't work for me.

After execute the above code I'm still getting the same error:

➜  cells git:(master) go tool fix -r cftype ./
warning: no cgo types: exit status 1
warning: no cgo types: exit status 1
warning: no cgo types: exit status 1
warning: no cgo types: exit status 1
➜  cells git:(master) go test
# github.com/pydio/cells/vendor/github.com/rjeczalik/notify
vendor/github.com/rjeczalik/notify/watcher_fsevents_cgo.go:51:216: cannot use nil as type _Ctype_CFAllocatorRef in argument to func literal
vendor/github.com/rjeczalik/notify/watcher_fsevents_cgo.go:165:47: cannot use nil as type _Ctype_CFAllocatorRef in argument to _Cfunc_CFStringCreateWithCStringNoCopy
vendor/github.com/rjeczalik/notify/watcher_fsevents_cgo.go:166:225: cannot use nil as type _Ctype_CFAllocatorRef in argument to func literal
➜  cells git:(master)

@cdujeu
Copy link
Member

cdujeu commented Nov 8, 2018

@bsinou can you check this ticket please?

@bsinou
Copy link
Collaborator

bsinou commented Nov 8, 2018

Hello,

I have quickly tested the different versions for linux/amd64 on CentOS 7.
We definitively have the issue reported by @max-k as from version 1.11.

But build and tests pass with all go version of the 1.10 branch, including 1.10.5 released last Friday.
Thanks to the good work of @Yamilquery , we know that the problem (that is not related to the first one) comes from the notify TP library from rjeczalik and his specific to the latest version of MacOS.
We will have a closer look and give feedback.

@mersinvald
Copy link

@max-k @bsinou are there any updates about how to fix this issue on Mac OS X Mojave?
We've encountered the same issue in etheriumproject/go-etherium and go tool fix -r cftype does not work either.

@cdujeu
Copy link
Member

cdujeu commented Nov 21, 2018

hi guys
1/ notify issue is fixed in the master branch => build for 1.10.5
2/ The 1.11 issue is different (github.com/pydio/cells/vendor/golang.org/x/crypto/blake2b.supportsAVX2: relocation target runtime.support_avx2 not defined)
I did not check where it comes from yet
charles

@cdujeu
Copy link
Member

cdujeu commented Nov 21, 2018

and for notify => we had to update the notify lib in the vendor folder.

@max-k
Copy link
Author

max-k commented Nov 21, 2018

Hi,
I think you only have to update these dependencies:

  • x/sys/cpu
  • x/crypto/blake2b
    They seem unused in your code, so perhaps you could simply remove them.

@cdujeu
Copy link
Member

cdujeu commented Nov 21, 2018

Actually I just retested : the master branch does build on 1.11 since we updated the minio-srv inside vendor! See https://travis-ci.org/pydio/cells/jobs/457886544

These dependencies are used by underlying libs (minio)

Can you try to pull the last version from master?

@cdujeu
Copy link
Member

cdujeu commented Nov 27, 2018

Building for Travis with go 1.11.2

@cdujeu cdujeu closed this as completed Nov 27, 2018
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

No branches or pull requests

5 participants