]> The Tcpdump Group git mirrors - tcpdump/commitdiff
CI: Use libpcap.a on MATRIX_BUILD_LIBPCAP=yes. [skip appveyor]
authorDenis Ovsienko <[email protected]>
Thu, 18 Mar 2021 02:14:37 +0000 (02:14 +0000)
committerFrancois-Xavier Le Bail <[email protected]>
Sun, 28 Mar 2021 18:12:13 +0000 (20:12 +0200)
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)

build_matrix.sh

index fc3b77078ece3ed446bed6f199ac6830240e22ad..2be11f03e32b5bab03dfcb784a3f3d2bbd3f7f6d 100755 (executable)
@@ -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
 }