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

Cannot build from the source - go get fails with accountsRes.Value undefined in api/common/conf_azure.go line 272 #527

Open
Htarlov opened this issue Jun 16, 2020 · 13 comments

Comments

@Htarlov
Copy link

Htarlov commented Jun 16, 2020

Version: current 0.24.0
GO Version: 1.14.4 linux/amd64

System:

Linux #1 SMP Debian 3.16.57-2 (2018-07-14) x86_64 GNU/Linux

Commands that were run:

cd /root/goofys
export GOPATH=/root/goofys
go get github.com/kahing/goofys

Expected result: project with dependencies downloaded

Result:

# github.com/kahing/goofys/api/common
src/github.com/kahing/goofys/api/common/conf_azure.go:272:34: accountsRes.Value undefined (type storage.AccountListResultPage has no field or method Value)
src/github.com/kahing/goofys/api/common/conf_azure.go:373:35: not enough arguments in call to client.ListKeys
have (context.Context, string, string)
want (context.Context, string, string, storage.ListKeyExpand)

I think that Azure SDK for GO added some breaking changes and it breaks the process, nevertheless could not quickly find out which version / revision is working.

@maobaolong
Copy link

This is also my pain.

➜  goofys git:(45b8d78) ✗ go get github.com/kahing/goofys
go: downloading github.com/kahing/goofys v0.24.0
go: github.com/kahing/goofys upgrade => v0.24.0
go: finding module for package github.com/sevlyar/go-daemon
go: finding module for package github.com/kardianos/osext
go: finding module for package github.com/jacobsa/fuse
go: finding module for package github.com/Azure/azure-storage-blob-go/azblob
go: finding module for package github.com/shirou/gopsutil/process
go: finding module for package gopkg.in/ini.v1
go: finding module for package golang.org/x/sys/unix
go: finding module for package github.com/Azure/go-autorest/autorest/adal
go: finding module for package github.com/aws/aws-sdk-go/aws/corehandlers
go: finding module for package github.com/aws/aws-sdk-go/aws/request
go: downloading github.com/Azure/azure-storage-blob-go v0.9.0
go: downloading github.com/sevlyar/go-daemon v0.1.5
go: downloading github.com/shirou/gopsutil v2.20.5+incompatible
go: downloading golang.org/x/sys v0.0.0-20200620081246-981b61492c35
go: downloading github.com/Azure/go-autorest v1.1.1
go: downloading github.com/jacobsa/fuse v0.0.0-20200423191118-1d001802f70a
go: downloading gopkg.in/ini.v1 v1.57.0
go: downloading github.com/Azure/go-autorest/autorest v0.10.2
go: downloading github.com/Azure/go-autorest/autorest/adal v0.8.3
go: downloading github.com/aws/aws-sdk-go v1.32.6
go: finding module for package github.com/Azure/azure-sdk-for-go/services/storage/datalake/2018-11-09/storagedatalake
go: finding module for package github.com/jacobsa/fuse/fuseutil
go: downloading github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
go: downloading github.com/Azure/azure-sdk-for-go v0.2.0-beta
go: finding module for package github.com/Azure/azure-sdk-for-go/services/datalake/store/2016-11-01/filesystem
go: finding module for package github.com/aws/aws-sdk-go/aws/awserr
go: downloading github.com/Azure/go-autorest v14.1.1+incompatible
go: finding module for package github.com/aws/aws-sdk-go/aws/credentials/stscreds
go: finding module for package github.com/satori/go.uuid
go: finding module for package github.com/Azure/go-autorest/autorest/azure/auth
go: downloading github.com/Azure/go-autorest/autorest/azure/auth v0.4.2
go: downloading github.com/satori/go.uuid v1.2.0
go: finding module for package github.com/aws/aws-sdk-go/aws/credentials
go: finding module for package github.com/sirupsen/logrus
go: downloading github.com/Azure/azure-sdk-for-go v43.3.0+incompatible
go: finding module for package github.com/Azure/go-autorest/autorest/azure/cli
go: finding module for package github.com/mitchellh/go-homedir
go: downloading github.com/Azure/go-autorest/autorest/azure/cli v0.3.1
go: downloading github.com/mitchellh/go-homedir v1.1.0
go: downloading github.com/sirupsen/logrus v1.6.0
go: finding module for package github.com/Azure/go-autorest/autorest/azure
go: finding module for package github.com/shirou/gopsutil/mem
go: finding module for package github.com/Azure/go-autorest/autorest
go: finding module for package github.com/sirupsen/logrus/hooks/syslog
go: finding module for package github.com/google/uuid
go: downloading github.com/google/uuid v1.1.1
go: finding module for package github.com/urfave/cli
go: finding module for package github.com/aws/aws-sdk-go/aws/client
go: downloading github.com/urfave/cli v1.22.4
go: finding module for package github.com/aws/aws-sdk-go/private/protocol/rest
go: finding module for package github.com/Azure/azure-pipeline-go/pipeline
go: downloading github.com/Azure/azure-pipeline-go v0.2.2
go: finding module for package github.com/aws/aws-sdk-go/aws/session
go: finding module for package github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage
go: finding module for package github.com/jacobsa/fuse/fuseops
go: finding module for package github.com/aws/aws-sdk-go/service/s3
go: finding module for package github.com/aws/aws-sdk-go/aws
go: found github.com/jacobsa/fuse in github.com/jacobsa/fuse v0.0.0-20200423191118-1d001802f70a
go: found github.com/kardianos/osext in github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
go: found github.com/sevlyar/go-daemon in github.com/sevlyar/go-daemon v0.1.5
go: found github.com/urfave/cli in github.com/urfave/cli v1.22.4
go: found github.com/sirupsen/logrus in github.com/sirupsen/logrus v1.6.0
go: found github.com/Azure/azure-pipeline-go/pipeline in github.com/Azure/azure-pipeline-go v0.2.2
go: found github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage in github.com/Azure/azure-sdk-for-go v43.3.0+incompatible
go: found github.com/Azure/azure-storage-blob-go/azblob in github.com/Azure/azure-storage-blob-go v0.9.0
go: found github.com/Azure/go-autorest/autorest in github.com/Azure/go-autorest/autorest v0.10.2
go: found github.com/Azure/go-autorest/autorest/adal in github.com/Azure/go-autorest/autorest/adal v0.8.3
go: found github.com/Azure/go-autorest/autorest/azure/auth in github.com/Azure/go-autorest/autorest/azure/auth v0.4.2
go: found github.com/Azure/go-autorest/autorest/azure/cli in github.com/Azure/go-autorest/autorest/azure/cli v0.3.1
go: found github.com/aws/aws-sdk-go/aws in github.com/aws/aws-sdk-go v1.32.6
go: found github.com/mitchellh/go-homedir in github.com/mitchellh/go-homedir v1.1.0
go: found gopkg.in/ini.v1 in gopkg.in/ini.v1 v1.57.0
go: found github.com/google/uuid in github.com/google/uuid v1.1.1
go: found github.com/satori/go.uuid in github.com/satori/go.uuid v1.2.0
go: found github.com/shirou/gopsutil/mem in github.com/shirou/gopsutil v2.20.5+incompatible
go: found golang.org/x/sys/unix in golang.org/x/sys v0.0.0-20200620081246-981b61492c35
go: downloading github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: downloading github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d
go: downloading github.com/Azure/go-autorest/autorest/date v0.2.0
go: finding module for package github.com/Azure/go-autorest/autorest/validation
go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d
go: downloading golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413
go: downloading github.com/konsorten/go-windows-terminal-sequences v1.0.3
go: finding module for package github.com/Azure/go-autorest/autorest/to
go: downloading github.com/Azure/go-autorest/logger v0.1.0
go: downloading github.com/dimchansky/utfbom v1.1.0
go: finding module for package github.com/StackExchange/wmi
go: downloading github.com/jmespath/go-jmespath v0.3.0
go: downloading github.com/russross/blackfriday/v2 v2.0.1
go: downloading github.com/Azure/go-autorest/tracing v0.5.0
go: downloading golang.org/x/net v0.0.0-20200602114024-627f9648deb9
go: downloading github.com/shurcooL/sanitized_anchor_name v1.0.0
go: downloading github.com/Azure/go-autorest/autorest/validation v0.2.0
go: downloading github.com/Azure/go-autorest/autorest/to v0.3.0
go: downloading github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d
go: downloading golang.org/x/text v0.3.0
go: found github.com/Azure/go-autorest/autorest/to in github.com/Azure/go-autorest/autorest/to v0.3.0
go: found github.com/Azure/go-autorest/autorest/validation in github.com/Azure/go-autorest/autorest/validation v0.2.0
go: found github.com/StackExchange/wmi in github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d
go: finding module for package github.com/go-ole/go-ole/oleutil
go: finding module for package github.com/go-ole/go-ole
go: downloading github.com/go-ole/go-ole v1.2.4
go: found github.com/go-ole/go-ole in github.com/go-ole/go-ole v1.2.4
# github.com/kahing/goofys/api/common
gopath/pkg/mod/github.com/kahing/goofys@v0.24.0/api/common/conf_azure.go:272:34: accountsRes.Value undefined (type storage.AccountListResultPage has no field or method Value)
gopath/pkg/mod/github.com/kahing/goofys@v0.24.0/api/common/conf_azure.go:373:35: not enough arguments in call to client.ListKeys
        have (context.Context, string, string)
        want (context.Context, string, string, storage.ListKeyExpand)

@maobaolong
Copy link

@kahing Please help us to build this repo successfully. Thank you.

@PengleiShi
Copy link

I'm in the same trouble, have you fixed it? @maobaolong

@Fiber-Man
Copy link

modify go.mod in you project.

  1. add:
replace github.com/jacobsa/fuse v0.0.0-20200706075950-f8927095af03 => github.com/kahing/fusego v0.0.0-20200327063725-ca77844c7bcc
  1. change:
github.com/Azure/azure-sdk-for-go v33.4.0+incompatible // indirect
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect

@OneAceGuy
Copy link

@maobaolong @PengleiShi I had the same issue as you guys, new to git and had to work it out. Here is what I did.

Create a directory for github project to download to (logged in as root, so done in root home dir):
mkdir -p go/src/github.com/kahing

Pull in goofys project:

cd go/src/github.com/kahing/
git clone https://github.com/kahing/goofys.git

Set my environment variables appropriately:

export GOPATH=/root/go
export GOOFYS_HOME=/root/go/src/github.com/kahing/goofys/

Next I went up one directory to github.com, then pulled in the Azure project (not sure if this was necessary, just documenting what I did):

cd /root/go/src/github.com
go get github.com/Azure/azure-pipeline-go

Once that finished I went back to the goofys directory and populated the submodule repositories using following commands:

cd /root/go/src/github.com/kahing/goofys
git submodule init
git submodule update

Finally, I installed goofys using full path to the src (not sure why I needed to give full path, but it only worked for me with full path):

go install /root/go/src/github.com/kahing/goofys/

The goofys utility is in the bin directory for your go project space:

PATH=$PATH:/root/go/bin; export PATH
goofys --version

Hope this helps.

@Htarlov
Copy link
Author

Htarlov commented Apr 7, 2021

@OneAceGuy your suggestion worked for me (with proper paths changed to what I have and with GO updated to version 1.16)

Thanks

@colin-sitehost
Copy link

colin-sitehost commented Jun 2, 2021

replace directives are generally considered bad practice for tagged releases, since they break go-get and are suggested for testing/debugging and pre-releases only. is there a story for merging github.com/kahing/fuse back into github.com/jacobsa/fusego, or is this a hard fork?

@e8-HongJunLiu
Copy link

e8-HongJunLiu commented Sep 15, 2021

@OneAceGuy

I have installed goofys as your steps successfully,but I don't find goofys command,Do I need to do anything else?I don't find bin directory in go project space

@OneAceGuy
Copy link

@hongjun0619 there are too many things it might be - ownership, permissions, different distro, different configs... take your pick.

A few suggestions:

  • check where GO is writing the output by issuing command go env GOPATH. The default is in $HOME directory, but it could be set to something else
  • instead of issuing the command go install /root/go/src/github.com/kahing/goofys/ you can use go build -o ~/bin/goofys. This will force the output to the bin directory in your home directory. Make sure you issue the command from within the goofys directory

Read this article for tips on how to build go programs.

@e8-HongJunLiu
Copy link

@OneAceGuy
My Linux system core is aarch64,not x86.for go command,I installed in /usr/local/go/bin/go.For goofys I followed your steps,no error for installing process.But after I don't find goofys command.And /root/go don't have /bin,just including pkg & src.
Thanks.

@e8-HongJunLiu
Copy link

I found a easy way to install, but it only works on x84_64 system(don't need go):

wget http://bit.ly/goofys-latest
mv goofys-latest /bin/goofys
chmod +x /bin/goofys

@e8-HongJunLiu
Copy link

@OneAceGuy
I seem that already install goofys succesfully,but it can't use

goofys --version

panic: Page size is unexpectedly 65536

goroutine 1 [running]:
github.com/jacobsa/fuse/internal/buffer.init.0()
/root/go/pkg/mod/github.com/kahing/fusego@v0.0.0-20200327063725-ca77844c7bcc/internal/buffer/in_message.go:33 +0xb8

@e8-HongJunLiu
Copy link

@OneAceGuy
I need your help,I have changed thses values ,but it still didn't work:
sed -i 's/4096/65536/g' /root/gopath/src/github.com/jacobsa/fuse/internal/buffer/in_message.go
sed -i 's/17/21/g' /root/gopath/src/github.com/jacobsa/fuse/internal/buffer/in_message_linux.go
sed -i 's/17/21/g' /root/gopath/src/github.com/jacobsa/fuse/internal/buffer/out_message_linux.go

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

7 participants