Closed liphx closed 1 year ago
bazel 6.3.2
没有复现出来,看这的信息也看不出具体原因。用一个干净的docker容器编译一下试试。
应该是编译第三方依赖时缺少libtool,下面的测试ok了
docker run -it debian bash
# in docker
apt update && apt install git python3 -y && git clone https://github.com/Tencent/flare.git
# install bazel
# https://bazel.build/install/ubuntu?hl=zh-cn
cd flare/
bazel build ...
# configure: error: --with-nghttp2 was specified but could not find libnghttp2 pkg-config file.
# apt install -y autoconf libtool libnghttp2-dev
# build ok
应该是编译第三方依赖时缺少libtool,下面的测试ok了
docker run -it debian bash # in docker apt update && apt install git python3 -y && git clone https://github.com/Tencent/flare.git # install bazel # https://bazel.build/install/ubuntu?hl=zh-cn cd flare/ bazel build ... # configure: error: --with-nghttp2 was specified but could not find libnghttp2 pkg-config file. # apt install -y autoconf libtool libnghttp2-dev # build ok
那看上去应该是缺失autotools, 编译nghttp2,jemalloc,ctemplate和gperftools都用的是configure_make
应该是编译第三方依赖时缺少libtool,下面的测试ok了
docker run -it debian bash # in docker apt update && apt install git python3 -y && git clone https://github.com/Tencent/flare.git # install bazel # https://bazel.build/install/ubuntu?hl=zh-cn cd flare/ bazel build ... # configure: error: --with-nghttp2 was specified but could not find libnghttp2 pkg-config file. # apt install -y autoconf libtool libnghttp2-dev # build ok
那看上去应该是缺失autotools, 编译nghttp2,jemalloc,ctemplate和gperftools都用的是configure_make
新容器里autoconf libtool libnghttp2-dev 都需要安装 libnghttp2-dev是为了pkgconfig,最后应该还是链接的flare里编译出的库 libtool的问题参考下面链接 https://stackoverflow.com/questions/18978252/error-libtool-library-used-but-libtool-is-undefined
应该是编译第三方依赖时缺少libtool,下面的测试ok了
docker run -it debian bash # in docker apt update && apt install git python3 -y && git clone https://github.com/Tencent/flare.git # install bazel # https://bazel.build/install/ubuntu?hl=zh-cn cd flare/ bazel build ... # configure: error: --with-nghttp2 was specified but could not find libnghttp2 pkg-config file. # apt install -y autoconf libtool libnghttp2-dev # build ok
那看上去应该是缺失autotools, 编译nghttp2,jemalloc,ctemplate和gperftools都用的是configure_make
新容器里autoconf libtool libnghttp2-dev 都需要安装 libnghttp2-dev是为了pkgconfig,最后应该还是链接的flare里编译出的库 libtool的问题参考下面链接 https://stackoverflow.com/questions/18978252/error-libtool-library-used-but-libtool-is-undefined
容器镜像使用GCC11(理论上GCC8以上就行)即可,如果是x86-64换成将bazel换成x86_64即可
FROM gcc:11
CMD git clone https://github.com/Tencent/flare.git && cd flare && \
wget https://github.com/bazelbuild/bazel/releases/download/6.3.2/bazel-6.3.2-linux-arm64 && \
chmod +x bazel-6.3.2-linux-arm64 && \
./bazel-6.3.2-linux-arm64 build ...