Skip to content

Commit

Permalink
Merge pull request #34 from giubacc/fix-build-20231004
Browse files Browse the repository at this point in the history
Fix build 20231004
  • Loading branch information
Giuseppe Baccini authored Oct 6, 2023
2 parents d7f23bb + fdb07b5 commit 2c31b9e
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 19 deletions.
2 changes: 1 addition & 1 deletion contrib/depot_tools
Submodule depot_tools updated from 401f0f to 60adf7
2 changes: 1 addition & 1 deletion contrib/restclient-cpp
3 changes: 2 additions & 1 deletion scripts/Dockerfile.builder
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
FROM opensuse/leap
FROM opensuse/tumbleweed
LABEL Name=chatterbox-builder

RUN zypper -n install --no-recommends \
xz \
awk \
wget \
find \
make \
Expand Down
6 changes: 3 additions & 3 deletions scripts/Dockerfile.chatterbox
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM opensuse/leap
FROM opensuse/tumbleweed
LABEL Name=chatterbox

RUN zypper -n install --no-recommends curl \
Expand All @@ -7,6 +7,6 @@ RUN zypper -n install --no-recommends curl \
RUN mkdir /monitor
VOLUME /monitor

COPY chatterbox /usr/bin/chatterbox
COPY cbx /usr/bin/cbx

ENTRYPOINT ["chatterbox"]
ENTRYPOINT ["cbx"]
6 changes: 3 additions & 3 deletions scripts/Dockerfile.chatterbox-test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM opensuse/leap
FROM opensuse/tumbleweed
LABEL Name=chatterbox-test

RUN zypper -n install --no-recommends curl \
Expand All @@ -7,7 +7,7 @@ RUN zypper -n install --no-recommends curl \
RUN mkdir -p /wd/scenarios
COPY scenarios /wd/scenarios

COPY chatterbox_test /usr/bin/chatterbox_test
COPY cbx_test /usr/bin/cbx_test

WORKDIR /wd
ENTRYPOINT ["chatterbox_test"]
ENTRYPOINT ["cbx_test"]
15 changes: 10 additions & 5 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

container_mng=${CNT_MNG:-"podman"}
container_mng=${CNT_MNG:-"docker"}
basedir=$(realpath ${BASE_DIR:-"../"})
ninja_jobs=${NINJA_JOBS:-"6"}
builder_image=${BUILDER_IMAGE:-"chatterbox-builder"}
Expand Down Expand Up @@ -87,12 +87,12 @@ create_chatterbox_test() {

build() {
echo "Building chatterbox binary ..."
mkdir -p $basedir/build && cd $basedir/build && cmake -DCONTRIB_PATH=$contrib_path .. && make chatterbox
mkdir -p $basedir/build && cd $basedir/build && cmake -DCONTRIB_PATH=$contrib_path .. && make cbx
}

build_test() {
echo "Building chatterbox-test binary ..."
mkdir -p $basedir/build && cd $basedir/build && cmake -DCONTRIB_PATH=$contrib_path .. && make chatterbox_test
mkdir -p $basedir/build && cd $basedir/build && cmake -DCONTRIB_PATH=$contrib_path .. && make cbx_test
}

clean() {
Expand Down Expand Up @@ -155,15 +155,16 @@ clean_googletest() {
# see this issue: https://bugs.chromium.org/p/v8/issues/detail?id=13455
patch_v8_code() {
sed -i 's/std::is_pod/std::is_standard_layout/g' $basedir/contrib/v8/src/base/vector.h
sed -i 's/std::back_insert_iterator(snapshots)/std::back_insert_iterator<base::SmallVector<Snapshot, 8>>(snapshots)/g' $basedir/contrib/v8/src/compiler/turboshaft/wasm-gc-type-reducer.cc
}

build_v8() {
echo "Building V8 ..."
PATH=$contrib_path/depot_tools:$PATH
gclient
cd $contrib_path
fetch v8
cd v8
git checkout branch-heads/11.9
args=$(cat <<EOF
dcheck_always_on = false
is_component_build = false
Expand All @@ -183,7 +184,11 @@ EOF

clean_v8() {
echo "Cleaning v8 build ..."
rm -rf $contrib_path/v8/out
rm -rf $contrib_path/v8
rm -rf $contrib_path/.cipd
rm -rf $contrib_path/.gclient
rm -rf $contrib_path/.gclient_entries
rm -rf $contrib_path/.gclient_previous_sync_commits
}

build_deps() {
Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ link_directories(${CONTRIB_PATH}/restclient-cpp/.libs
${CONTRIB_PATH}/cryptopp
${CONTRIB_PATH}/v8/out/x86.release/obj)

add_executable(chatterbox
add_executable(cbx
main.cpp
utils.cpp
crypto.cpp
Expand All @@ -36,7 +36,7 @@ add_executable(chatterbox
endpoint.cpp
cbox.cpp)

target_link_libraries(chatterbox
target_link_libraries(cbx
"librestclient-cpp.a"
ryml
pistache
Expand Down
4 changes: 2 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ link_directories(${CONTRIB_PATH}/restclient-cpp/.libs
${CONTRIB_PATH}/v8/out/x86.release/obj
${CONTRIB_PATH}/googletest/build/lib)

add_executable(chatterbox_test
add_executable(cbx_test
test.cpp
${CHATTERBOX_PATH}/utils.cpp
${CHATTERBOX_PATH}/crypto.cpp
Expand All @@ -40,7 +40,7 @@ add_executable(chatterbox_test
${CHATTERBOX_PATH}/endpoint.cpp
${CHATTERBOX_PATH}/cbox.cpp)

target_link_libraries(chatterbox_test
target_link_libraries(cbx_test
"librestclient-cpp.a"
ryml
pistache
Expand Down

0 comments on commit 2c31b9e

Please sign in to comment.