[dev] build alpine docker image failed when enable grpc
Quentin Young
qlyoung at qlyoung.net
Thu Sep 7 04:05:18 UTC 2023
In the future, please send patch files as attachments. They are difficult to
apply when pasted into an html email body.
I took a brief look at what you described and confirmed that it does fail to
build with your patch, although the error I get is different - something about
needing at least C++14.
Whether the patch is the correct way to build with GRPC on Alpine, I'm not
sure. I don't think anyone has ever done that, so you are in uncharted
territory.
If you figure it out please drop us a line on how you did it and we can write
it down in the docs, and potentially patch the image build to support it.
Quentin
On 9/1/23 09:11, hzchenyuefang wrote:
>
> hi,
> when I build frr docker image with grpc enabled, it is always failed
> with the following error:
>
> CXX tests/lib/test_grpc-test_grpc.o
> CXXLD tests/lib/test_grpc
> /usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld:
> tests/lib/test_grpc-test_grpc.o: undefined reference to symbol
> '_ZN4absl12lts_202206235MutexD1Ev'
> /usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld:
> /usr/lib/libabsl_synchronization.so.2206.0.0: error adding symbols:
> DSO missing from command line
> collect2: error: ld returned 1 exit status
> make: *** [Makefile:8659: tests/lib/test_grpc] Error 1
> >>> ERROR: frr: check failed
>
> frr version: tag 8.5.2
> build command: docker build -t frr-grpc-alpine:8.5.2 -f
> docker/alpine/Dockerfile .
> APKBUILD.in file changed:
>
> diff --git a/alpine/APKBUILD.in b/alpine/APKBUILD.in
> index fef7a61cc..adeb48199 100644
> --- a/alpine/APKBUILD.in
> +++ b/alpine/APKBUILD.in
> @@ -13,12 +13,12 @@ makedepends="ncurses-dev net-snmp-dev gawk texinfo
> perl
> expat fakeroot flex fortify-headers gdbm git gmp json-c-dev kmod
> lddtree libacl libatomic libattr libblkid libburn libbz2 libc-dev
> libcap-dev libcurl libedit libffi libgcc libgomp libisoburn libisofs
> - libltdl libressl libssh2 libstdc++ libtool libuuid
> + libltdl libressl libssh2 libstdc++ libtool libuuid abseil-cpp
> abseil-cpp-dev
> linux-headers lzip lzo m4 make mkinitfs mpc1 mpfr4 mtools musl-dev
> ncurses-libs ncurses-terminfo ncurses-terminfo-base patch
> pax-utils pcre2
> perl pkgconf python3 python3-dev readline readline-dev
> sqlite-libs pcre2-dev
> - squashfs-tools sudo tar texinfo xorriso xz-libs py-pip rtrlib rtrlib-dev
> - py3-sphinx elfutils elfutils-dev libyang-dev"
> + squashfs-tools sudo tar texinfo xorriso xz-libs py-pip rtrlib
> rtrlib-dev re2-dev
> + py3-sphinx elfutils elfutils-dev libyang-dev cmake grpc grpc-dev
> protobuf-dev"
> checkdepends="pytest py-setuptools"
> install="$pkgname.pre-install $pkgname.pre-deinstall
> $pkgname.post-deinstall"
> subpackages="$pkgname-dev $pkgname-doc $pkgname-dbg"
> @@ -43,6 +43,7 @@ build() {
> --localstatedir=$_localstatedir \
> --enable-rpki \
> --enable-vtysh \
> + --enable-grpc \
> --enable-multipath=64 \
> --enable-vty-group=frrvty \
> --enable-user=$_user \
>
>
> hzchenyuefang
>
> hzchenyuefang at corp.netease.com
>
> <https://dashi.163.com/projects/signature-manager/detail/index.html?ftlId=1&name=hzchenyuefang&uid=hzchenyuefang%40corp.netease.com&iconUrl=https%3A%2F%2Fmail-online.nosdn.127.net%2Fsm9c8cbf65365fabb85ec4eabe6d644815.jpg&items=%5B%22hzchenyuefang%40corp.netease.com%22%5D&logoUrl=http%3A%2F%2Fnos.netease.com%2Fmail-online%2F33d1a3d3d2d7995d9bd3521fd4ecbf70.jpeg>
>
>
> _______________________________________________
> dev mailing list
> dev at lists.frrouting.org
> https://lists.frrouting.org/listinfo/dev
More information about the dev
mailing list