Closed 9a4gl closed 7 years ago
These symbols are already linked inside the library, otherwise the build bots would not be able to build the sample.
Here's the result of objdump with the release version coming from libwebrtc-1.0.0-linux-x64.tar.gz:
$ objdump -h libwebrtc.a | grep field_trial
field_trial_default.o: file format elf64-x86-64
1 .text._ZN6webrtc11field_trial12FindFullNameERKSs 0000025d 0000000000000000 0000000000000000 00000040 2**4
2 .text._ZN6webrtc11field_trial25InitFieldTrialsFromStringEPKc 00000008 0000000000000000 0000000000000000 000002a0 2**4
3 .text._ZN6webrtc11field_trial19GetFieldTrialStringEv 00000008 0000000000000000 0000000000000000 000002b0 2**4
4 .bss._ZN6webrtc11field_trialL18trials_init_stringE 00000008 0000000000000000 0000000000000000 000002b8 2**3
$ objdump -h libwebrtc.a | grep metrics
[...]
metrics_default.o: file format elf64-x86-64
1 .text._ZN6webrtc7metrics25HistogramFactoryGetCountsERKSsiii 00000005 0000000000000000 0000000000000000 00000040 2**4
2 .text._ZN6webrtc7metrics31HistogramFactoryGetCountsLinearERKSsiii 00000146 0000000000000000 0000000000000000 00000050 2**4
3 .text._ZN6webrtc7metrics30HistogramFactoryGetEnumerationERKSsi 00000144 0000000000000000 0000000000000000 000001a0 2**4
4 .text._ZN6webrtc7metrics16GetHistogramNameEPNS0_9HistogramE 00000005 0000000000000000 0000000000000000 000002f0 2**4
5 .text._ZN6webrtc7metrics12HistogramAddEPNS0_9HistogramEi 00000109 0000000000000000 0000000000000000 00000300 2**4
I need more details, such as the linking command (showing the linker, the objects to link, the ldflags and the libraries), and the complete log before investigating further on this.
some background here.
Since three weeks ago, we went ahead with henrik and made the default code build a full static lib by default across all platforms, while it was not doing this on mac.
Only two libs are left aside the filed_trial and the metrics because they need to be overloaded by clients/users. The documentation for that does not exist yet but is coming.
So if you compile libwebrtc today following webrtc.org recipe, you will get three libs, like 9a4gl described.
If you compile libwebrtc today following axel recipe, he will grab all the .o objects and make a static lib directly, bypassing the linking step of Ninja, and those symbols will already be in the libwebrtc.a
it's likely that you are using the wrong libwebrtc.a (the one compiled by ninja). If you were using CMake and an installed version of libwebrtc, that could not happen. It might or might not be convenient in your case.
On Wed, Apr 5, 2017 at 1:32 PM, Axel Isouard notifications@github.com wrote:
Closed #43 https://github.com/aisouard/libwebrtc/issues/43.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/aisouard/libwebrtc/issues/43#event-1029805205, or mute the thread https://github.com/notifications/unsubscribe-auth/AAT1njSKNwS2UuAnl5VVc6ul3K9k9JKbks5rszyggaJpZM4MzSt1 .
sg.linkedin.com/agouaillard
-
Ah, true, maybe I pick wrong libwebrtc.a file. I was not aware that ninja also create file with same name.
linux 64bit, ubuntu 14.04 lts I tried to link webrtc-streamer with libwebrtc.a and I had to provide following to linked to succeed: /usr/local/src/libwebrtc/out/webrtc/src/out/Release/obj/webrtc/system_wrappers/libmetrics_default.a \ /usr/local/src/libwebrtc/out/webrtc/src/out/Release/obj/webrtc/system_wrappers/field_trial_default/field_trial_default.o Looks this also should go into lib.
BR, Tihomir