Skip to content

Commit 1d62e2f

Browse files
committed
1 parent 5bbb84b commit 1d62e2f

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

docker/Dockerfile.python_wheels

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ ENV TROOT="/tmp/build_cache_root"
2323
ENV PIPCACHE_DIR="${CACHE_ROOT}/pip"
2424

2525
RUN dnf --refresh -y makecache
26-
RUN dnf install -y perl perl-core clang lld
26+
RUN dnf install -y perl perl-core clang lld llvm
2727
RUN dnf install -y pv || true
2828
RUN dnf clean -y all
2929

@@ -44,7 +44,7 @@ RUN --mount=type=bind,source=scripts/build,target=scripts/build \
4444

4545
COPY --exclude=.git --exclude=.github --exclude=docker --exclude=dist \
4646
--exclude=scripts . .
47-
COPY ./scripts/build/set_env.sh ./scripts/build/set_env.sh
47+
COPY ./scripts/build ./scripts/build
4848

4949
ENV CCACHE_BIN="/usr/bin/ccache"
5050
COPY --from=ccache ${CCACHE_BIN} ${CCACHE_BIN}
@@ -58,8 +58,7 @@ ENV CCACHE_COMPILERCHECK="content"
5858
ARG TARGETPLATFORM
5959
ENV SET_ENV="sh ./scripts/build/set_env.sh platformopts"
6060

61-
RUN env -S `${SET_ENV}` \
62-
${PYTHON_CMD} -m build --wheel
61+
RUN sh ./scripts/build/in_docker.sh
6362
RUN auditwheel repair dist/*.whl --wheel-dir dist_out
6463
RUN make -C rtpproxy clean
6564
RUN rm -rf build/*

python/build_rtpproxy.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ MYDIR="`dirname ${_SELF}`"
88

99
BDIR="${MYDIR}/../build"
1010

11-
if [ "${CC}" = "clang" ]
11+
if ${CC} -v 2>&1 | grep -q "clang"
1212
then
1313
export AR="llvm-ar"
1414
export RANLIB="llvm-ranlib"
@@ -70,7 +70,8 @@ then
7070
then
7171
rm -rf ${MYDIR}/../openssl
7272
fi
73-
if ! CFLAGS="${CFLAGS_opt}" LDFLAGS="${LDFLAGS_opt}" ./configure \
73+
if ! CFLAGS="${CFLAGS_opt}" LDFLAGS="${LDFLAGS_opt}" LIBS="${SRTP_LIBS}" \
74+
./configure \
7475
--prefix="${BDIR}" --enable-static --disable-shared --enable-openssl \
7576
--with-openssl-dir="${BDIR}"
7677
then

scripts/build/in_docker.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
IFS='
6+
'
7+
set -- `${SET_ENV}`
8+
env -S "${@}" ${PYTHON_CMD} -m build --wheel

scripts/build/set_env.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ platformopts() {
1717
echo "CCACHE_MAXSIZE=40M"
1818
;;
1919
esac
20+
if [ -e /opt/rh/gcc-toolset-14/root/usr/lib/gcc/i686-redhat-linux/14/libatomic.a ]
21+
then
22+
echo 'SRTP_LIBS="-L/opt/rh/gcc-toolset-14/root/usr/lib/gcc/i686-redhat-linux/14 -l:libatomic.a"'
23+
fi
2024
echo "SAVE_SPACE=yes"
2125
}
2226

0 commit comments

Comments
 (0)