Comments (4)
I found a solution, but i fixed libsrtp-CMakeLists.txt
FROM debian
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -y install \
build-essential cmake gawk libncurses-dev libc6-dev intltool python \
git subversion time unzip zlib1g-dev libssl-dev wget curl cpio bc \
gettext gettext-base liblocale-gettext-perl upx \
flex texinfo help2man libtool-bin byacc bison pkg-config libyaml-dev
WORKDIR /root/
RUN git clone https://github.com/crosstool-ng/crosstool-ng
WORKDIR /root/crosstool-ng
RUN ./bootstrap
RUN ./configure && make && make install
RUN ct-ng arm-unknown-linux-uclibcgnueabi
# here i change .config for root compilation
# CT_EXPERIMENTAL=y
# CT_ALLOW_BUILD_AS_ROOT=y
# CT_ALLOW_BUILD_AS_ROOT_SURE=y
RUN ct-ng build
# Now we have toolchain in /root/x-tools/arm-unknown-linux-uclibcgnueabi/
ENV PATH ${PATH}:/root/x-tools/arm-unknown-linux-uclibcgnueabi/bin
ENV SYS_ROOT /root/x-tools/arm-unknown-linux-uclibcgnueabi/arm-unknown-linux-uclibcgnueabi/sysroot/
RUN printf '\
set(CMAKE_SYSTEM_NAME Linux)\n\
set(CMAKE_SYSTEM_PROCESSOR arm)\n\
\n\
set(CMAKE_C_COMPILER "arm-unknown-linux-uclibcgnueabi-gcc")\n\
set(CMAKE_CXX_COMPILER "arm-unknown-linux-uclibcgnueabi-g++")\n\
set(CMAKE_AR_COMPILER "arm-unknown-linux-uclibcgnueabi-ar")\n\
\n\
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\n\
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\n\
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\n\
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) \n\
' >> /root/x-tools/arm-unknown-linux-uclibcgnueabi/toolchain.cmake
# Build OpenSSL from sources
ENV OPENSSL_ROOT_DIR ${SYS_ROOT}usr/local/ssl/
WORKDIR /src
RUN git clone https://github.com/openssl/openssl.git
WORKDIR /src/openssl
RUN git checkout OpenSSL_1_1_0l && \
CC=arm-unknown-linux-uclibcgnueabi-gcc \
AR=arm-unknown-linux-uclibcgnueabi-ar \
./Configure linux-armv4 --prefix=${OPENSSL_ROOT_DIR} && make -j6 && make install
RUN rm -rf /src/openssl
# git clone or copy aws_webrtc repo
# copy repo because we need to fix configure process for libsrtp
# i specify --build and --host libsrtp-CMakeLists.txt
# CONFIGURE_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/build/src/project_libsrtp/configure --build=x86_64-unknown-linux-gnu --host=arm-unknown-linux-uclibcgnueabi "CFLAGS=${CMAKE_C_FLAGS}" --prefix=${OPEN_SRC_INSTALL_PREFIX} --enable-openssl --with-openssl-dir=${OPENSSL_DIR}
COPY ./aws_webrtc /src/aws_webrtc
WORKDIR /src/aws_webrtc
RUN cmake ./ -DCMAKE_TOOLCHAIN_FILE=/root/x-tools/arm-unknown-linux-uclibcgnueabi/toolchain.cmake
RUN make
from amazon-kinesis-video-streams-webrtc-sdk-c.
This is amazing! Nice work @chertov, sorry this week has been slow.
I am going to roll your changes in, and make it so you don't need to do the libsrtp
changes.
Maybe we can setup a builder that ensures cross-compiling always works.
from amazon-kinesis-video-streams-webrtc-sdk-c.
Hey @chertov
I opened a PR that makes cross-compilation a lot easier! I also added it to Travis, so it shouldn't regress in the future.
Thank you so much for the example. It helped me a lot when getting things working. If there is anyway I can make it better I would love to hear suggestions :)
from amazon-kinesis-video-streams-webrtc-sdk-c.
@Sean-Der thank you! Cross-compilation is very comfortable now.
libusrsctp has "Debug" build type by default, libusrsctp size is 1.9Mb
https://github.com/sctplab/usrsctp/blob/ef8a35a6e7eb30e7026bf20bde89e8a2d50eb8f1/CMakeLists.txt#L35
If i add to CMAKE_ARGS in libusrsctp-CMakeLists.txt -DCMAKE_BUILD_TYPE=Release libusrsctp is 658kb
from amazon-kinesis-video-streams-webrtc-sdk-c.
Related Issues (20)
- [Bug]: Network filter does not apply to socket routing HOT 1
- [Bug]: resolveStunIceServerIp Ignores Command Line AWS Region, Uses Environment Variable Instead HOT 1
- [Feature request]: Need to build the kvsdk package with OpenWrt HOT 3
- [Documentation]: README.md should mention the supported video codecs for WebRTC ingestion HOT 2
- [Bug]: Memory leak for WebRTC SDK 1.10.2 when testing sample code HOT 28
- [Bug]: kvsWebrtcClientMasterGstSample receive audio not work HOT 1
- [Bug]: KVS SDK RTP retransmitter bug HOT 2
- [Bug]: [2024/05/23 15:19:40:0909] W: [wsicli|5a|WS/h1/default/m-579da5db.kinesisvideo.ap-southeast-]: lws_client_ws_upgrade: got bad HTTP response '403' 2024-05-23 15:19:40.091 VERBOSE lwsWssCallbackRoutine(): WSS callback with reason 1 2024-05-23 15:19:40.091 WARN lwsWssCallbackRoutine(): Client connection failed. Connection error string: HS: ws upgrade response not 101 HOT 8
- softphone signaling server HOT 4
- [Bug]: how to ensure the functon "wakeLwsServiceEventLoop " thread safety,because of "lws_callback_on_writable" is not thread-safe HOT 1
- [Bug]: how to ensure the functon "wakeLwsServiceEventLoop " thread safety,because of "lws_callback_on_writable" is not thread-safe
- [Bug]: decryptSrtcpPacket(): Decrypting rtcp packet failed with error code 9 on srtp session HOT 4
- [Bug]: TURN_STATE_GET_CREDENTIALS fails after update from 1.7.2. to 1.10.2 of the SDK HOT 17
- [Bug]: Windows build fails at openssl HOT 1
- [Bug]: Seemingly SessionDescription creation bug HOT 1
- [Feature request]: Reduce the time it takes to connect to live view. HOT 1
- [Bug]: Close peer connection:ERROR fromCheckConnectionIceAgentState(): operation returned status code: 0x5a00000d HOT 4
- [Bug]: Call serializeSessionDescriptionInit and return STATUS_BUFFER_TOO_SMALL HOT 2
- [Bug]: 1.10.2, kvsWebrtcClientMasterGstSample continually increases CPU usage HOT 7
- [Bug]: Wrong SDP answer when the codec doesn't match with viewer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazon-kinesis-video-streams-webrtc-sdk-c.