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

undefined reference to `ogg_stream_iovecin' #26

Closed
AndreKR opened this issue Apr 2, 2024 · 1 comment
Closed

undefined reference to `ogg_stream_iovecin' #26

AndreKR opened this issue Apr 2, 2024 · 1 comment

Comments

@AndreKR
Copy link

AndreKR commented Apr 2, 2024

To get somewhere with the build, I took these steps first:

  • Removed my existing installation of MinGW-w64.
  • Installed MSYS2 (in c:\dev\tools\msys64).
  • Ran pacman -S pacman -S mingw-w64-ucrt-x86_64-gcc.
  • Added c:\dev\tools\msys64\ucrt64\bin to the PATH.
  • Ran pacman -S mingw-w64-ucrt-x86_64-pkg-config
  • Ran pacman -S mingw-w64-ucrt-x86_64-libogg
  • Ran pacman -S mingw-w64-ucrt-x86_64-libvorbis
  • Set an envvar PKG_CONFIG_PATH=c:\dev\tools\msys64\ucrt64\lib\pkgconfig.

Then I had to add two new functions to output/driver_windows.go to satisfy the interface:

func (out *output) Drop() error { return nil }
func (out *output) DelayMs() (int64, error) { return 0, nil }

But now I get:

C:/dev/tools/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\andre\AppData\Local\Temp\go-link-407401969\000013.o: in function `_cgo_fb2c7143e03b_Cfunc_ogg_stream_iovecin':
/tmp/go-build/vorbis.cgo2.c:371:(.text+0x35b): undefined reference to `ogg_stream_iovecin'
collect2.exe: error: ld returned 1 exit status

Famously CGO is not Go, and I have no idea what this error even means.

@devgianlu
Copy link
Owner

To build Windows I've been using a Docker container because that seemed like the easiest way. I have updated #4 with the build instructions. I have also rebased on master to fix the missing functions so you may need to git reset.

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

2 participants