8000 {doc} Add README to mnist3d for macOS build issues by asmaloney · Pull Request #13 · danaugrs/go-tsne · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

{doc} Add README to mnist3d for macOS build issues #13

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
L 8000 oading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions examples/mnist3d/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## Building mnist3d on macOS

You may run into these errors when trying to build mnist3d:

```
# github.com/g3n/engine/audio/vorbis
/Users/foo/go/pkg/mod/github.com/g3n/engine@v0.2.0/audio/vorbis/vorbis.go:19:11: fatal error: 'codec.h' file not found
#include "codec.h"
^~~~~~~~~
1 error generated.
# github.com/g3n/engine/audio/al
/Users/foo/go/pkg/mod/github.com/g3n/engine@v0.2.0/audio/al/al.go:20:11: fatal error: 'al.h' file not found
#include "al.h"
^~~~~~
1 error generated.
```

You need to install `libvorbis` and `openal-soft`:

```
% brew install libvorbis openal-soft
```

Then export the paths to build it:

```
% export CGO_CFLAGS="-I$(brew --prefix)/include/vorbis -I$(brew --prefix)/include/ -I$(brew --prefix)/opt/openal-soft/include/AL" CGO_LDFLAGS="-L$(brew --prefix)/lib -L$(brew --prefix)/opt/openal-soft/lib"
% go build
# github.com/danaugrs/go-tsne/examples/mnist3d
ld: warning: directory not found for option '-L/usr/local/opt/openal-soft/lib'
```

The warning can be ignored (it's a hardcoded path in some makefile, but we are setting `-L` ourselves).
0