遇到的问题
Repository rule http_archive defined at:
/root/.cache/bazel/_bazel_root/5861efbf6640604f322aefb7a661544e/external/bazel_tools/tools/build_defs/repo/http.bzl:336:16: in <toplevel>
ERROR: An error occurred during the fetch of repository 'com_github_gperftools_gperftools':
Traceback (most recent call last):
File "/root/.cache/bazel/_bazel_root/5861efbf6640604f322aefb7a661544e/external/bazel_tools/tools/build_defs/repo/http.bzl", line 121
patch(ctx)
File "/root/.cache/bazel/_bazel_root/5861efbf6640604f322aefb7a661544e/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 161, in patch
fail(<1 more arguments>)
Error applying patch command ./autogen.sh:
configure.ac:172: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
重要的信息是:autoconf编译 http_archive时遇到了没有定义的:AC_PROG_LIBTOOL
思路来源:envoy的issue
因为没有安装libtool,查询是否安装了libtool的命令:
dpkg -l | grep libtool
所以需要安装工具包
apt install libtool
Tips:使用Bazel编译Envoy时需要提前安装一些工具
sudo apt-get install \
libtool \
cmake \
automake \
autoconf \
make \
ninja-build \
curl \
unzip \
virtualenv \
patch