roc-streaming / roc-go

Golang bindings for Roc Toolkit.
https://roc-streaming.org
MIT License
21 stars 10 forks source link

[WIP] Use libroc obtained from pkg-config #31

Closed Asalle closed 3 years ago

Asalle commented 3 years ago

Could not test this, as make shows me

cd roc && go build .
# github.com/roc-streaming/roc-go/roc
./address.go:5:10: fatal error: roc/address.h: No such file or directory
    5 | #include <roc/address.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:8: check] Error 2

and pkg-config cannot find headers afaik

➜  roc-go git:(asalle/use-pkg-config) pkg-config --cflags-only-I roc 
<empty line>

Contents of my roc.pc, all the files where they are supposed to be

➜  roc-go git:(asalle/use-pkg-config) cat /usr/lib64/pkgconfig/roc.pc
prefix=/usr
exec_prefix=${prefix}
libdir=/usr/lib64
includedir=${prefix}/include

Name: roc
Requires: libuv libunwind speexdsp
Version: 0.1.5
Description: Real-time audio streaming over the network.
URL: https://roc-streaming.org

Libs: -L${libdir} -lroc -lrt -ldl -lm -lpthread
Cflags: -I${includedir}
Asalle commented 3 years ago

ok, I figured it out, after roc 2.0 address.h was renamed to endpoint.h.. so I'll have to update the bindings to roc 2.0 and then come back to this pr, closing for now

gavv commented 3 years ago

Hi, sorry for delay. Yes, you're right.

gavv commented 3 years ago

BTW it's probably enough to add pkg-config line only to one file.