From: Denis Ovsienko Date: Thu, 18 Mar 2021 02:14:37 +0000 (+0000) Subject: CI: Use libpcap.a on MATRIX_BUILD_LIBPCAP=yes. [skip appveyor] X-Git-Tag: tcpdump-4.99.1~45 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/89a5871f2cd3542e74a19d4869b588f48e265d39 CI: Use libpcap.a on MATRIX_BUILD_LIBPCAP=yes. [skip appveyor] The only way to pass tests on OpenBSD is to link with the upstream libpcap using ../libpcap/libpcap.a (hence not using CMake) because -lpcap always results in linking with OpenBSD /usr/lib/libpcap.so regardless of the libpcap.a and libpcap.so that build.sh installs under /tmp/local/. Work around by not cleaning in ../libpcap on MATRIX_BUILD_LIBPCAP=yes, so Autoconf can pick the static library up. On MATRIX_BUILD_LIBPCAP=no do the cleaning so it cannot. (cherry picked from commit 40733327128628b8b0db270c4220beaaad1d6e02) --- diff --git a/build_matrix.sh b/build_matrix.sh index fc3b7707..2be11f03 100755 --- a/build_matrix.sh +++ b/build_matrix.sh @@ -71,12 +71,13 @@ choose_libpcap() { if [ "$BUILD_LIBPCAP" = no ]; then echo_magenta 'Use system libpcap' rm -rf $PREFIX + make -C ../libpcap distclean || : else # Build libpcap with autoconf CMAKE_SAVE=$CMAKE CMAKE=no echo_magenta "Build libpcap (CMAKE=$CMAKE REMOTE=$REMOTE)" - (cd ../libpcap && ./build.sh && make distclean) + (cd ../libpcap && ./build.sh) CMAKE=$CMAKE_SAVE fi }