go-sound icon indicating copy to clipboard operation
go-sound copied to clipboard

Get error when go get the project from in MAC

Open yorelog opened this issue 6 years ago • 4 comments

> go get github.com/padster/go-sound
# pkg-config --cflags flac
pkg-config: exec: "pkg-config": executable file not found in $PATH
# github.com/rakyll/portmidi
codes/go/src/github.com/rakyll/portmidi/portmidi.go:22:11: fatal error: 'portmidi.h' file not found
 #include <portmidi.h>
          ^~~~~~~~~~~~
1 error generated.
# github.com/xthexder/go-jack
codes/go/src/github.com/xthexder/go-jack/jack.go:9:10: fatal error: 'jack/jack.h' file not found
#include <jack/jack.h>
         ^~~~~~~~~~~~~
1 error generated.

yorelog avatar Aug 13 '18 22:08 yorelog

maybe this project can be more compatible 😄

yorelog avatar Aug 13 '18 22:08 yorelog

Thanks for filing this issue - unfortunately I haven't been working with this code for a while, so there'll be a few things that don't work, in particular on non-linux platforms.

Out of interest, do you have either the portmidi or jack headers installed? As the dependencies are on the C/C++ libraries providing these files,, so I'm not sure if there's a good way to pull those in with go's dependency management?

If it helps, neither of those sections (midi / jack output) are required for the rest of the code to work, so it's possible to use, just not with 'go get' automatically. I don't know a good way to have optional compilation with the go builder though.

padster avatar Aug 14 '18 17:08 padster

@padster No, I don't have jack installed.
Maybe you can start up a new project to make this fit for jack . and the jack project have dependency of go-sound. you just do the basic things at go-sound

yorelog avatar Aug 27 '18 02:08 yorelog

To install required libs on macOS:

brew install jack pulseaudio portmidi

Builds should work fine after this.

rdbell avatar Sep 13 '20 20:09 rdbell