Skip to content

add bngblaster#13

Merged
hellt merged 4 commits intosrl-labs:mainfrom
jcpvdm:bngblaster
Nov 5, 2025
Merged

add bngblaster#13
hellt merged 4 commits intosrl-labs:mainfrom
jcpvdm:bngblaster

Conversation

@jcpvdm
Copy link
Contributor

@jcpvdm jcpvdm commented Nov 1, 2025

No description provided.

Dockerfile Outdated
Comment on lines +9 to +33
RUN mkdir /bngblaster
WORKDIR /bngblaster
RUN wget https://github.com/rtbrick/libdict/archive/refs/tags/1.0.4.zip
RUN unzip 1.0.4.zip
RUN mkdir libdict-1.0.4/build
WORKDIR /bngblaster/libdict-1.0.4/build
RUN cmake ..
RUN make -j16 install
WORKDIR /bngblaster
RUN wget https://github.com/rtbrick/bngblaster/archive/refs/tags/0.9.26.zip
RUN unzip 0.9.26.zip
RUN mkdir bngblaster-0.9.26/build
WORKDIR /bngblaster/bngblaster-0.9.26/build
#remove redundant include to avoid preprocessor redirect warning and consequent compilation failure
RUN sed -i '/#include <sys\/signal.h>/d' ../code/lwip/contrib/ports/unix/port/netif/sio.c
#typedef for uint to avoid compilation error on alpine musl libc
RUN sed -i '$i typedef unsigned int uint;' ../code/common/src/common.h
# add include to support be32toh and htobe32 on alpine musl libc
RUN sed -i '/#include <stdlib.h>/i #include <endian.h>' ../code/common/src/common.h
#replace __time_t with time_t to make it compatible with alpine musl libc
RUN find /bngblaster/bngblaster-0.9.26/code/ -type f \( -name "*.c" -o -name "*.h" \) -exec sed -i 's/\b__time_t\b/time_t/g' {} +
#Don't error on sequence-point errors to allow build to complete on musl libc. Ideally code should be fixed on upstream repo.
RUN sed -i 's/APPEND CMAKE_C_FLAGS "-pthread"/APPEND CMAKE_C_FLAGS "-pthread -Wno-error=sequence-point"/' ../code/bngblaster/CMakeLists.txt
RUN cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBNGBLASTER_VERSION=0.9.26 ..
RUN make install
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jcpvdm
can you please carve this out as install-bngbluster.sh and execute this script instead of doing this in the dockerfile? Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done @hellt

cmake ..
make -j16 install
cd /bngblaster
wget https://github.com/rtbrick/bngblaster/archive/refs/tags/0.9.26.zip
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe worth setting the BNGBLASTER_VERSION var to 0.9.26 at the top of the script and use it in the commands below.

This would allow to change the version easily in one place when the upgrade to bng blaster would be required

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah that's better. agreed & done @hellt

@hellt hellt merged commit 7e2e9cd into srl-labs:main Nov 5, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants