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

gfapi.Volume not defined error when attempting to cross compile #32

Open
chrisbecke opened this issue Apr 4, 2020 · 0 comments
Open

Comments

@chrisbecke
Copy link

Problem

Building the sample main.go from the README.md on MacOS I get the following result:

$ go build
# pkg-config --cflags  -- glusterfs-api glusterfs-api glusterfs-api
Package glusterfs-api was not found in the pkg-config search path.
Perhaps you should add the directory containing `glusterfs-api.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glusterfs-api' found
Package glusterfs-api was not found in the pkg-config search path.
Perhaps you should add the directory containing `glusterfs-api.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glusterfs-api' found
Package glusterfs-api was not found in the pkg-config search path.
Perhaps you should add the directory containing `glusterfs-api.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glusterfs-api' found
pkg-config: exit status 1

Ok. It seems that glusterfs-api is not available natively for Mac. Perhaps I can try cross compile the binary for a linux image:

$ GOOS=linux GOARCH=amd64 go build
# main 
./main.go:6:10: undefined: gfapi.Volume

Steps to replicate

  1. a test go project was created as per the instructions on github.com/gluster/gogfapi
  2. GOOS=linux GOARCH=amd64 go build was executed to do the build
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

1 participant