{"action":"created","issue":{"url":"https://api.github.com/repos/keroserene/go-webrtc/issues/76","repository_url":"https://api.github.com/repos/keroserene/go-webrtc","labels_url":"https://api.github.com/repos/keroserene/go-webrtc/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/keroserene/go-webrtc/issues/76/comments","events_url":"https://api.github.com/repos/keroserene/go-webrtc/issues/76/events","html_url":"https://github.com/keroserene/go-webrtc/issues/76","id":308381589,"number":76,"title":"ctestenums.cc:2:48: fatal error: webrtc/api/peerconnectioninterface.h: No such file or directory","user":{"login":"anadahz","id":4969544,"avatar_url":"https://avatars3.githubusercontent.com/u/4969544?v=4","gravatar_id":"","url":"https://api.github.com/users/anadahz","html_url":"https://github.com/anadahz","followers_url":"https://api.github.com/users/anadahz/followers","following_url":"https://api.github.com/users/anadahz/following{/other_user}","gists_url":"https://api.github.com/users/anadahz/gists{/gist_id}","starred_url":"https://api.github.com/users/anadahz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anadahz/subscriptions","organizations_url":"https://api.github.com/users/anadahz/orgs","repos_url":"https://api.github.com/users/anadahz/repos","events_url":"https://api.github.com/users/anadahz/events{/privacy}","received_events_url":"https://api.github.com/users/anadahz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-25T20:15:30Z","updated_at":"2018-03-26T01:21:19Z","closed_at":null,"author_association":"NONE","body":"Why I'm here: `go-webrtc` is a [snowflake dependency](https://github.com/keroserene/snowflake#dependencies)\r\n\r\n`go get github.com/keroserene/go-webrtc` results in \r\n```\r\nctestenums.cc:2:48: fatal error: webrtc/api/peerconnectioninterface.h: No such file or directory\r\ncompilation terminated.\r\n```\r\n\r\n`% go env`\r\n```\r\ngo env\r\nGOARCH=\"amd64\"\r\nGOBIN=\"/home/user/go/bin\"\r\nGOCACHE=\"/home/user/.cache/go-build\"\r\nGOEXE=\"\"\r\nGOHOSTARCH=\"amd64\"\r\nGOHOSTOS=\"dragonfly\"\r\nGOOS=\"dragonfly\"\r\nGOPATH=\"/home/user/go\"\r\nGORACE=\"\"\r\nGOROOT=\"/usr/local/go\"\r\nGOTMPDIR=\"\"\r\nGOTOOLDIR=\"/usr/local/go/pkg/tool/dragonfly_amd64\"\r\nGCCGO=\"gccgo\"\r\nCC=\"gcc\"\r\nCXX=\"g++\"\r\nCGO_ENABLED=\"1\"\r\nCGO_CFLAGS=\"-g -O2\"\r\nCGO_CPPFLAGS=\"\"\r\nCGO_CXXFLAGS=\"-g -O2\"\r\nCGO_FFLAGS=\"-g -O2\"\r\nCGO_LDFLAGS=\"-g -O2\"\r\nPKG_CONFIG=\"pkg-config\"\r\nGOGCCFLAGS=\"-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build032258926=/tmp/go-build -gno-record-gcc-switches\"\r\n```\r\n\r\nHappy to provide any required details in order to help resolve this issue."},"comment":{"url":"https://api.github.com/repos/keroserene/go-webrtc/issues/comments/376020896","html_url":"https://github.com/keroserene/go-webrtc/issues/76#issuecomment-376020896","issue_url":"https://api.github.com/repos/keroserene/go-webrtc/issues/76","id":376020896,"user":{"login":"uumaro","id":32969605,"avatar_url":"https://avatars0.githubusercontent.com/u/32969605?v=4","gravatar_id":"","url":"https://api.github.com/users/uumaro","html_url":"https://github.com/uumaro","followers_url":"https://api.github.com/users/uumaro/followers","following_url":"https://api.github.com/users/uumaro/following{/other_user}","gists_url":"https://api.github.com/users/uumaro/gists{/gist_id}","starred_url":"https://api.github.com/users/uumaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uumaro/subscriptions","organizations_url":"https://api.github.com/users/uumaro/orgs","repos_url":"https://api.github.com/users/uumaro/repos","events_url":"https://api.github.com/users/uumaro/events{/privacy}","received_events_url":"https://api.github.com/users/uumaro/received_events","type":"User","site_admin":false},"created_at":"2018-03-26T01:21:19Z","updated_at":"2018-03-26T01:21:19Z","author_association":"NONE","body":"Note that this is an attempt to build on BSD (`GOOS=\"dragonfly\"`).\r\n\r\nThe immediate cause is that the build is missing the `-I` option to include the files in the [include](https://github.com/keroserene/go-webrtc/tree/90ac15ae07cc6e820cd922a239dd892598986622/include) directory.\r\n\r\nThat's because the `-I` option comes from [webrtc-darwin-amd64.pc](https://github.com/keroserene/go-webrtc/blob/90ac15ae07cc6e820cd922a239dd892598986622/webrtc-darwin-amd64.pc), [webrtc-linux-386.pc](https://github.com/keroserene/go-webrtc/blob/90ac15ae07cc6e820cd922a239dd892598986622/webrtc-linux-386.pc), [webrtc-linux-amd64.pc](https://github.com/keroserene/go-webrtc/blob/90ac15ae07cc6e820cd922a239dd892598986622/webrtc-linux-amd64.pc), or [webrtc-linux-arm.pc](https://github.com/keroserene/go-webrtc/blob/90ac15ae07cc6e820cd922a239dd892598986622/webrtc-linux-arm.pc). There isn't one yet for BSD.\r\n\r\nYou 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](https://github.com/keroserene/go-webrtc/blob/90ac15ae07cc6e820cd922a239dd892598986622/peerconnection.go#L35-L38).\r\n\r\nBut then there will still be a problem, because there's no precompiled library for BSD in the [lib](https://github.com/keroserene/go-webrtc/tree/90ac15ae07cc6e820cd922a239dd892598986622/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](https://github.com/keroserene/go-webrtc/blob/90ac15ae07cc6e820cd922a239dd892598986622/build.sh) and the \"hard way\" of [README#Building](https://github.com/keroserene/go-webrtc/tree/90ac15ae07cc6e820cd922a239dd892598986622#building). I don't know if anyone has tried building the library on BSD yet."}}
{"actor":{"display_login":"uumaro"}}