Open anadahz opened 6 years ago
Note that this is an attempt to build on BSD (GOOS="dragonfly"
).
The immediate cause is that the build is missing the -I
option to include the files in the include directory.
That's because the -I
option comes from webrtc-darwin-amd64.pc, webrtc-linux-386.pc, webrtc-linux-amd64.pc, or webrtc-linux-arm.pc. There isn't one yet for BSD.
You could try making a new file webrtc-dragonfly-amd64.pc containing the necessary flags. (-I${pc}/include
is the crucial one for including the proper headers.) You may have to also add a new #cgo
line to certain .go files, like here.
But then there will still be a problem, because there's no precompiled library for BSD in the lib directory. go-webrtc is an interface to a massive underlying C++ library. So the build will fail at the linking stage. Until we have a prebuilt library for BSD, you will have to compile the webrtc library yourself, and unfortunately it's a little involved. See build.sh and the "hard way" of README#Building. I don't know if anyone has tried building the library on BSD yet.
@uumaro Thanks for your response.
I can try build go-webrtc in BSD but it seems that are many dependencies and things that may go wrong. Is there any related BSD go build script were I can start from?
It's not the Go part of go-webrtc that's difficult to build. It's the WebRTC native code library that's big. (It's not really difficult to build, just huge (source code is ~9 GB).) You can try making some minor modifications to build.sh and see if it works, but I suspect you would be the first one to try it. Unfortunately, https://webrtc.org/native-code/development/ says "The currently supported platforms are Windows, Mac OS X, Linux, Android and iOS."
It may work on BSD anyway; for example we are cross-compiling linux→mac for Tor Browser, which isn't a supported configuration. But it took some patches to make it work.
@uumaro great thanks for the guidelines. @egypcio is working on a freebsd port of snowflake.
Why I'm here:
go-webrtc
is a snowflake dependencygo get github.com/keroserene/go-webrtc
results in% go env
Happy to provide any required details in order to help resolve this issue.