WebRTC on Linux 32bit (Native Build)

838 views
Skip to first unread message

mr.jay...@gmail.com

unread,
Oct 16, 2015, 8:32:33 AM10/16/15
to discuss-webrtc
Hello!

I am tasked to integrate WebRTC to our Qt Based Browser that uses
webkit. I was able to build the WebRTC on 64bit machine without any
hitch and i do see the Example peerconnection_client and peerconnection_server
to work. However our target system is 32bit and am stuck that the Build
Fails complaining Myriad errors.  I found out that Daily Devbuilds are built
for Linux 32bit mode. Could you please point me on to how to build WebRTC
like a .so or .a file  that can be linked Dynamically to our Browser pls?  

Either A BuildLog on what Parameters were used or a simple Howto Would
do. Webrtc Wiki Does not have much information, unfortunately for building
Native builds in 32bit mode.

Places i looked at were -


I really appreciate any help i can get to progress faster.

Best Regards,
Jayasimha

Henrik Kjellander

unread,
Oct 16, 2015, 10:01:52 AM10/16/15
to discuss...@googlegroups.com
We do have 32-bit builds in the WebRTC continuous build: this and this bot. You could check what they use for GYP_DEFINES in the runhooks step. The only thing of interest should be target_arch=ia32 though.
Note that those machines are plain 32-bit installations of Ubuntu, which is the easiest way to build for 32-bit.
Building 32-bit on a 64-bit machine is a lot trickier and nothing we support fully. Our own instructions mention a few 32-bit libraries but I'm not certain it's all that's needed (there are other threads at this mailing list discussing that).

You might want to try out build/install-build-deps.sh --lib32 as well (see https://code.google.com/p/chromium/codesearch#chromium/src/build/install-build-deps.sh for details), as it's possible Chromium is more up to date with what libraries are needed. 
You could also setup a 32-bit chroot environment on your 64-bit system (e.g. http://jblevins.org/log/ubuntu-chroot), but that's adds a bit of maintenance of course...


--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/3405b179-40a3-45be-a9f4-5e71822dfa54%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mr.jay...@gmail.com

unread,
Oct 17, 2015, 12:27:53 AM10/17/15
to discuss-webrtc
Hello Henrik,

Thanks for your response. Following the GYP_DEFINITION i was able to get a .a File building for WebRTC

[jay: webrtc]$echo $GYP_DEFINES

target_arch=ia32 clang=0 host_clang=0 werror=



However, while linking a simple Hello World program with rtc::InitializeSSL(NULL) and rtc::CloseSSL() APIs i get

these unresolved symbols -


[jay: Test]$make

g++ -DWEBRTC_POSIX -I. -I/home/jayasimh/webrtc/src -I/home/jayasimh/webrtc/src/webrtc -std=c++11 libwebrtc.a -o simpleTest test.cpp

/tmp/cck0ohlE.o: In function `main':

test.cpp:(.text+0x5b): undefined reference to `rtc::InitializeSSL(bool (*)(void*))'

test.cpp:(.text+0xaa): undefined reference to `rtc::CleanupSSL()'

/tmp/cck0ohlE.o: In function `bool rtc::FromString<int>(std::string const&, int*)':

test.cpp:(.text+0x114): undefined reference to `rtc::FatalMessage::FatalMessage(char const*, int)'

test.cpp:(.text+0x195): undefined reference to `rtc::FatalMessage::~FatalMessage()'

test.cpp:(.text+0x217): undefined reference to `rtc::FatalMessage::~FatalMessage()'

/tmp/cck0ohlE.o: In function `bool rtc::ToString<double>(double const&, std::string*)':

test.cpp:(.text+0x283): undefined reference to `rtc::FatalMessage::FatalMessage(char const*, int)'

test.cpp:(.text+0x304): undefined reference to `rtc::FatalMessage::~FatalMessage()'

test.cpp:(.text+0x3cb): undefined reference to `rtc::FatalMessage::~FatalMessage()'

/tmp/cck0ohlE.o: In function `bool rtc::ToString<int>(int const&, std::string*)':

test.cpp:(.text+0x446): undefined reference to `rtc::FatalMessage::FatalMessage(char const*, int)'

test.cpp:(.text+0x4c7): undefined reference to `rtc::FatalMessage::~FatalMessage()'

test.cpp:(.text+0x582): undefined reference to `rtc::FatalMessage::~FatalMessage()'

/tmp/cck0ohlE.o: In function `bool rtc::ToString<bool>(bool const&, std::string*)':

test.cpp:(.text+0x5fd): undefined reference to `rtc::FatalMessage::FatalMessage(char const*, int)'

test.cpp:(.text+0x67e): undefined reference to `rtc::FatalMessage::~FatalMessage()'

test.cpp:(.text+0x73d): undefined reference to `rtc::FatalMessage::~FatalMessage()'

collect2: error: ld returned 1 exit status

make: *** [simpleTest] Error 1

[jay: Test]$



[jay: Test]$cat test.cpp 

#include <iostream>

#include <unistd.h>



#include "talk/app/webrtc/peerconnectioninterface.h"

#include "talk/app/webrtc/jsep.h"

#include "talk/app/webrtc/datachannelinterface.h"

#include "talk/app/webrtc/test/fakeconstraints.h"

#include "talk/app/webrtc/test/mockpeerconnectionobservers.h"

#include "webrtc/base/logging.h"

#include "webrtc/base/ssladapter.h"

#include "webrtc/base/sslstreamadapter.h"

#include "webrtc/base/thread.h"

#include "webrtc/base/common.h"

#include "webrtc/base/basictypes.h"

#include "webrtc/base/ssladapter.h"

using rtc::scoped_ptr;

using rtc::scoped_refptr;

using webrtc::MediaStreamInterface;

using webrtc::CreatePeerConnectionFactory;

using webrtc::DataChannelInterface;

using webrtc::MockDataChannelObserver;

using webrtc::PeerConnectionFactoryInterface;

using webrtc::PeerConnectionInterface;

using webrtc::PeerConnectionObserver;

using webrtc::PortAllocatorFactoryInterface;

using webrtc::VideoSourceInterface;

using webrtc::VideoTrackInterface;


int main()

{

    fprintf(stderr,"Hello World\n");

    fprintf(stderr,"Initializing SSL\n");

    rtc::InitializeSSL(NULL);

    fprintf(stderr,"Initialized SSL\n");

    fprintf(stderr,"Closing SSL\n");

    rtc::CleanupSSL();

    fprintf(stderr,"Closed SSL\n");

    return 0;

}


Any ideas how can i tackle this issue?


thanks,
Jayasimha

mr.jay...@gmail.com

unread,
Oct 18, 2015, 2:28:02 AM10/18/15
to discuss-webrtc
Ok, i figured it out what the issue was. Had to link librtc_base_approved.a  to my Cpp. 

[jay: Test]$makelibtool --mode=link g++ -DWEBRTC_POSIX  -I. -I/gwebrtc/libwebrtc-ia32/include -std=c++11 webrtc/src/out/Debug/obj/webrtc/libwebrtc.a webrtc/src/out/Debug/obj/webrtc/libwebrtc_common.a webrtc/src/out/Debug/obj/webrtc/base/librtc_base.a webrtc/src/out/Debug/obj/webrtc/base/librtc_base_approved.a webrtc/src/out/Debug/obj/chromium/src/third_party/boringssl/libboringssl.a  -lpthread -lm -o simpleTest test.cpp

libtool: link: g++ -DWEBRTC_POSIX -I. -I/gwebrtc/libwebrtc-ia32/include -std=c++11 -o simpleTest test.cpp  webrtc/src/out/Debug/obj/webrtc/libwebrtc.a webrtc/src/out/Debug/obj/webrtc/libwebrtc_common.a webrtc/src/out/Debug/obj/webrtc/base/librtc_base.a webrtc/src/out/Debug/obj/webrtc/base/librtc_base_approved.a webrtc/src/out/Debug/obj/chromium/src/third_party/boringssl/libboringssl.a -lpthread -lm


Thx!
Reply all
Reply to author
Forward
0 new messages