EricssonResearch / openwebrtc

A cross-platform WebRTC client framework based on GStreamer
http://www.openwebrtc.org
BSD 2-Clause "Simplified" License
1.8k stars 537 forks source link

build failed for openwebrtc (Step 4) #197

Closed weidezhang closed 9 years ago

weidezhang commented 9 years ago

I'm trying to build the openwebrtc following the instructions: https://github.com/EricssonResearch/openwebrtc/wiki/Building-OpenWebRTC Step 1~3 were successful. For step 3, I used: ./build-all.sh -Cbr osx ios ios-simulator because I'm planning to try it on an ios-simulator.

At step 4: build OpenWebRTC when I run the following command: ./build.sh -Cbr osx I tried several times with different machines (Yosemite). And I kept getting the following error message:

ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame GISCAN Owr-0.1.gir dyld: Symbol not found: _g_settings_schema_get_key Referenced from: /Users/wezhan/Documents/qiong/openwebrtc/build/x86_64-apple-darwin/owr/.libs/libopenwebrtc.3601.dylib Expected in: flat namespace in /Users/wezhan/Documents/qiong/openwebrtc/build/x86_64-apple-darwin/owr/.libs/libopenwebrtc.3601.dylib Command '['/Users/wezhan/Documents/qiong/openwebrtc/build/x86_64-apple-darwin/owr/tmp-introspectROADiA/Owr-0.1', '--introspect-dump=/Users/wezhan/Documents/qiong/openwebrtc/build/x86_64-apple-darwin/owr/tmp-introspectROADiA/functions.txt,/Users/wezhan/Documents/qiong/openwebrtc/build/x86_64-apple-darwin/owr/tmp-introspectROADiA/dump.xml']' returned non-zero exit status -5

Can you help me to solve this problem? Thanks!

superdump commented 9 years ago

I think we need to update and fix libopenwebrtc.exp. I'll look into that on Monday.

EvilTrev commented 9 years ago

I'm having some issues as well, everything built correctly up to this stage... but I'm seeing these errors:

owr_require_symbols.c:3840:9: error: invalid operands to binary expression
      ('void *' and 'void *')
    ret |= owr_init_with_main_context;
    ~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~
owr_require_symbols.c:3841:9: error: invalid operands to binary expression
      ('void *' and 'void *')
    ret |= owr_local_media_source_get_type;
    ~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[3]: *** [owr_require_symbols.lo] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Failed building....
ford-prefect commented 9 years ago

PR #194 should fix that last

sdroege commented 9 years ago

Those bits are fixed now, and the missing symbol should be fixed by https://github.com/EricssonResearch/openwebrtc/commit/0d3fcc84ae8622c487a3364dd2157ee145572c38

stefanalund commented 9 years ago

Let's reopen if you guys still have problems.

EvilTrev commented 9 years ago

I've done a complete update of the dependencies, openwebrtc and rebuilt it all from scratch... I'm seeing this error now:

xxd -i peerhandler.js_ > peerhandler.js.h
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
make[4]: Nothing to be done for `all-am'.
rm peerhandler.js_ bridgeserver.js_
  CC       libopenwebrtc_bridge_la-owr_bridge.lo
  CCLD     libopenwebrtc_bridge.la
ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame
  CC       daemon.o
  CCLD     openwebrtc-daemon
ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame
Undefined symbols for architecture x86_64:
  "_gst_plugin_nice_register", referenced from:
      _owr_init in libopenwebrtc.a(owr.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [openwebrtc-daemon] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Failed building....
superdump commented 9 years ago

It looks like the libnice GStreamer plugin is missing. Can you run:

V=1 ./build.sh -Cbr osx

And check if there is a libgstnice.a in your openwebrtc-deps-*/lib directory?

mlakkadshaw commented 9 years ago

@superdump I tried running using V=1 ./build.sh -Cbr osx, still same error. I checked, libgstnice.a is present under lib/gstreamer-1.0/libgstnice.a

EvilTrev commented 9 years ago

I also have that lib file present. Side note, and not terribly important to this particular issue... but the build won't start if you have a space ("My Projects" for example) in your folder structure.

superdump commented 9 years ago

@mlakkadshaw - Can you paste the output of that V=1 ./build.sh -Cbr osx build? It displays more information about the actual commands that are run which will help me with debugging. If libgstnice.a is present in your openwebrtc-deps-*/lib/gstreamer-1.0 directory, it may be that somehow a library search path has gone missing in the build script or something.

sdroege commented 9 years ago

The libnice problem should be fixed already by https://github.com/EricssonResearch/openwebrtc-build-scripts/commit/9fe9423288aa857de4d8d7827575435b835e5613 Try rebuilding libnice with the latest build scripts

mlakkadshaw commented 9 years ago

I pulled the latest scripts, and rebuild libnice, still getting the same error. Here is the output of V=1 ./build.sh -Cbr osx https://gist.github.com/mlakkadshaw/5724657eeba90197ed4e

EvilTrev commented 9 years ago

I just deleted everything, pulled it all again and rebuilt from scratch... I'm still not able to get past this issue:

/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
make[4]: Nothing to be done for `all-am'.
rm peerhandler.js_ bridgeserver.js_
  CC       libopenwebrtc_bridge_la-owr_bridge.lo
  CCLD     libopenwebrtc_bridge.la
ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame
  CC       daemon.o
  CCLD     openwebrtc-daemon
ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame
Undefined symbols for architecture x86_64:
  "_gst_plugin_nice_register", referenced from:
      _owr_init in libopenwebrtc.a(owr.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [openwebrtc-daemon] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Failed building....

Any thoughts? Below is the complete gist from a V1 build...

https://gist.github.com/EvilTrev/eeca8ba3a6a24d9ef7ad

superdump commented 9 years ago
cd scripts
git checkout master
git pull --rebase
cd dependencies
rm -rf openwebrtc-deps-*
./build-libnice.sh -Cbr osx && ./create_file_release.sh osx && ./deploy_deps.sh
cd ../..
./build.sh -Cbr osx
EvilTrev commented 9 years ago

That got it. Thank you