Skip to content
This repository was archived by the owner on Feb 29, 2024. It is now read-only.

Commit 025e319

Browse files
jasonborgcopybara-github
authored andcommitted
Update gflags, glog and jsoncpp to newer versions.
In addition to refreshing the gflags, glog and jsoncpp libraries, update the agent Makefile to run static_def_gen.py using `python3` instead of `python`. PiperOrigin-RevId: 461606067 Change-Id: If534897c75c804282913c75d34f6fdead7e373f7
1 parent 0337874 commit 025e319

File tree

2 files changed

+25
-22
lines changed

2 files changed

+25
-22
lines changed

build.sh

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
# Home page of jsoncpp: http://sourceforge.net/projects/libjson/files/?source=navbar
3535
#
3636

37-
GFLAGS_URL=https://github.com/gflags/gflags/archive/v2.1.2.tar.gz
38-
GLOG_URL=https://github.com/google/glog/archive/v0.3.4.tar.gz
39-
JSONCPP_URL=https://github.com/open-source-parsers/jsoncpp/archive/refs/tags/1.7.4.tar.gz
37+
GFLAGS_URL=https://github.com/gflags/gflags/archive/v2.2.2.tar.gz
38+
GLOG_URL=https://github.com/google/glog/archive/v0.4.0.tar.gz
39+
JSONCPP_URL=https://github.com/open-source-parsers/jsoncpp/archive/refs/tags/1.7.6.tar.gz
4040

4141

4242
ROOT=$(cd $(dirname "${BASH_SOURCE[0]}") >/dev/null; /bin/pwd -P)
@@ -45,56 +45,59 @@ ROOT=$(cd $(dirname "${BASH_SOURCE[0]}") >/dev/null; /bin/pwd -P)
4545
PARALLEL_BUILD_OPTION="-j $(($(nproc 2> /dev/null || echo 4)*3/2))"
4646

4747
# Clean up any previous build files.
48-
rm -rf ${ROOT}/third_party/gflags* \
49-
${ROOT}/third_party/glog* \
50-
${ROOT}/third_party/*jsoncpp* \
51-
${ROOT}/third_party/install
48+
rm -rf "${ROOT}"/third_party/gflags* \
49+
"${ROOT}"/third_party/glog* \
50+
"${ROOT}"/third_party/*jsoncpp* \
51+
"${ROOT}"/third_party/install
5252

5353
# Build and install gflags to third_party/.
54-
pushd ${ROOT}/third_party
55-
curl -Lk ${GFLAGS_URL} -o gflags.tar.gz
54+
pushd "${ROOT}"/third_party
55+
curl -Lk "${GFLAGS_URL}" -o gflags.tar.gz
5656
tar xzf gflags.tar.gz
5757
cd gflags-*
5858
mkdir build
5959
cd build
6060
cmake -DCMAKE_CXX_FLAGS=-fpic \
6161
-DGFLAGS_NAMESPACE=google \
62-
-DCMAKE_INSTALL_PREFIX:PATH=${ROOT}/third_party/install \
62+
-DCMAKE_INSTALL_PREFIX:PATH="${ROOT}"/third_party/install \
6363
..
6464
make ${PARALLEL_BUILD_OPTION}
6565
make install
6666
popd
6767

6868
# Build and install glog to third_party/.
69-
pushd ${ROOT}/third_party
70-
curl -L ${GLOG_URL} -o glog.tar.gz
69+
pushd "${ROOT}"/third_party
70+
curl -L "${GLOG_URL}" -o glog.tar.gz
7171
tar xzf glog.tar.gz
7272
cd glog-*
73-
./configure --with-pic \
74-
--prefix=${ROOT}/third_party/install \
75-
--with-gflags=${ROOT}/third_party/install
73+
mkdir build
74+
cd build
75+
cmake -DCMAKE_CXX_FLAGS=-fpic \
76+
-DCMAKE_PREFIX_PATH="${ROOT}"/third_party/install \
77+
-DCMAKE_INSTALL_PREFIX:PATH="${ROOT}"/third_party/install \
78+
..
7679
make ${PARALLEL_BUILD_OPTION}
7780
make install
7881
popd
7982

8083
# Build and install jsoncpp to third_party/.
81-
pushd ${ROOT}/third_party
84+
pushd "${ROOT}"/third_party
8285
curl -L ${JSONCPP_URL} -o jsoncpp.tar.gz
8386
tar xzf jsoncpp.tar.gz
8487
cd *jsoncpp-*
8588
mkdir build
8689
cd build
8790
cmake -DCMAKE_CXX_FLAGS=-fpic \
88-
-DCMAKE_INSTALL_PREFIX:PATH=${ROOT}/third_party/install \
91+
-DCMAKE_INSTALL_PREFIX:PATH="${ROOT}"/third_party/install \
8992
..
9093
make ${PARALLEL_BUILD_OPTION}
9194
make install
9295
popd
9396

9497
# Build the debugger agent.
95-
pushd ${ROOT}/src/agent
98+
pushd "${ROOT}"/src/agent
9699
make ${PARALLEL_BUILD_OPTION} \
97-
BUILD_TARGET_PATH=${ROOT} \
98-
THIRD_PARTY_LIB_PATH=${ROOT}/third_party/install/lib \
99-
THIRD_PARTY_INCLUDE_PATH=${ROOT}/third_party/install/include
100+
BUILD_TARGET_PATH="${ROOT}" \
101+
THIRD_PARTY_LIB_PATH="${ROOT}"/third_party/install/lib \
102+
THIRD_PARTY_INCLUDE_PATH="${ROOT}"/third_party/install/include
100103
popd

src/agent/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ endif
237237
cp internals-class-loader/target/com/google/devtools/cdbg/debuglets/java/InternalsClassLoader.class $(INTERNALS_CLASS_LOADER)
238238

239239
internals_class_loader_static_defs: internals_class_loader
240-
python ../codegen/static_def_gen.py $(INTERNALS_CLASS_LOADER_STATIC_DEFS) .:^$(INTERNALS_CLASS_LOADER)$
240+
python3 ../codegen/static_def_gen.py $(INTERNALS_CLASS_LOADER_STATIC_DEFS) .:^$(INTERNALS_CLASS_LOADER)$
241241

242242
internals_jar:
243243
ifeq ($(JAVA_BUILD),maven)

0 commit comments

Comments
 (0)