pristineio / webrtc-build-scripts

A set of build scripts useful for building WebRTC libraries for Android and iOS.
BSD 3-Clause "New" or "Revised" License
1.12k stars 448 forks source link

Missing symbols for Field Trial lib. #138

Open zevarito opened 8 years ago

zevarito commented 8 years ago

Linking against 10410 revision causes missing symbols for Field Trial lib

I've checked that libfield_trial.a is not created using the build scripts but it is using original webrtc scripts.

Undefined symbols for architecture i386:
  "webrtc::field_trial::FindFullName(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      webrtc::PeerConnection::Initialize(webrtc::PeerConnectionInterface::RTCConfiguration const&, webrtc::MediaConstraintsInterface const*, webrtc::PortAllocatorFactoryInterface*, rtc::scoped_ptr<webrtc::DtlsIdentityStoreInterface, rtc::DefaultDeleter<webrtc::DtlsIdentityStoreInterface> >, webrtc::PeerConnectionObserver*) in libWebRTC-10410-arm-intel-Debug.a(libjingle_peerconnection.peerconnection.o)
      cricket::WebRtcVoiceEngine::Construct() in libWebRTC-10410-arm-intel-Debug.a(libjingle_media.webrtcvoiceengine.o)
      cricket::(anonymous namespace)::CodecIsInternallySupported(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libWebRTC-10410-arm-intel-Debug.a(libjingle_media.webrtcvideoengine2.o)
      cricket::WebRtcVideoEngine2::WebRtcVideoEngine2() in libWebRTC-10410-arm-intel-Debug.a(libjingle_media.webrtcvideoengine2.o)
      cricket::ScreenshareLayerConfig::GetDefault() in libWebRTC-10410-arm-intel-Debug.a(libjingle_media.simulcast.o)
      cricket::WebRtcVideoCapturer::SetApplyRotation(bool) in libWebRTC-10410-arm-intel-Debug.a(libjingle_media.webrtcvideocapturer.o)
      webrtc::AdaptiveThresholdExperimentIsEnabled() in libWebRTC-10410-arm-intel-Debug.a(remote_bitrate_estimator.overuse_detector.o)
      ...
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
zhihanhe commented 8 years ago

how to fix it? thx

zevarito commented 8 years ago

@zhihanhe I've give up and switch to build webrtc without build-scripts for now.

I'd suggest you to follow the guides at webrtc website, I found them pretty straight forward. The only thing is that if you want a Fat build in the fashion of libjingle pods or webrtc-build-scripts results you will need to compile it each time for one target and then merge all *.a results with libtool to create a single file arch dependent and then create a fat lib with all archs using lipo.

P.D. Even I am not using it, I had to compile AppRTC as well in some archs to build correctly. Dunno why.

jrpinteno commented 8 years ago

I'm also facing the same problem. And when trying to fetch earliest revision (10183) it doesn't fetch it at all.

zhihanhe commented 8 years ago

@zevarito thank you for your replay! try @jrpinteno 's commit,it works! thanks,@jrpinteno!