From: Michał Kępień Date: Thu, 5 Nov 2020 10:45:19 +0000 (+0100) Subject: Fix detection of CMake-built libuv on Windows X-Git-Tag: v9.17.7~23^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64a091d587058641e0b7528054efd92cbb635f41;p=thirdparty%2Fbind9.git Fix detection of CMake-built libuv on Windows As of libuv 1.36.0, CMake is the only supported build method for libuv on Windows. Account for that fact by adjusting the relevant paths and DLL file names used in the win32utils/Configure script. Update Windows-specific documentation accordingly. --- diff --git a/win32utils/Configure b/win32utils/Configure index f0189151601..1403e40dac5 100644 --- a/win32utils/Configure +++ b/win32utils/Configure @@ -1319,14 +1319,14 @@ if ($use_libuv eq "yes") { die "can't find libuv uv.h include\n"; } my $libuv_inc = File::Spec->catdir($libuv_path, "include"); - my $libuv_libdir = File::Spec->catdir($libuv_path, "Release"); - my $libuv_lib = File::Spec->catfile($libuv_libdir, "libuv.lib"); - my $libuv_dll = File::Spec->catfile($libuv_libdir, "libuv.dll"); + my $libuv_libdir = File::Spec->catdir($libuv_path, "build\\Release"); + my $libuv_lib = File::Spec->catfile($libuv_libdir, "uv.lib"); + my $libuv_dll = File::Spec->catfile($libuv_libdir, "uv.dll"); if (!-f $libuv_lib) { - die "can't find libuv.lib library\n"; + die "can't find uv.lib library\n"; } if (!-f $libuv_dll) { - die "can't find libuv.dll library\n"; + die "can't find uv.dll library\n"; } $configvar{"LIBUV_PATH"} = "$libuv_path"; $configinc{"LIBUV_INC"} = "$libuv_inc"; @@ -2460,7 +2460,7 @@ sub makeinstallfile { print LOUT "libdns.dll-BCFT\n"; print LOUT "libirs.dll-BCFT\n"; print LOUT "libns.dll-BCFT\n"; - print LOUT "libuv.dll-BCFT\n"; + print LOUT "uv.dll-BCFT\n"; if ($use_openssl eq "yes") { my $v; my $d; diff --git a/win32utils/build.txt b/win32utils/build.txt index 35ce02d5c5a..7cf15a87039 100644 --- a/win32utils/build.txt +++ b/win32utils/build.txt @@ -37,7 +37,7 @@ Step 1: Download and build libuv Download and untar the libuv sources from https://libuv.org/ in the same directory in which you extracted the BIND 9 source: if BIND 9 is in - \build\bind-9.16.0, for instance, libuv should be in \build\libuv-v1.34.2 + \build\bind-9.16.9, for instance, libuv should be in \build\libuv-v1.40.0 (subject to version number changes). As of this writing, a patch (win32utils/libuv.diff) needs to be applied @@ -50,15 +50,14 @@ Step 1: Download and build libuv Applying the win32utils/libuv.diff patch will no longer be necessary for libuv versions released after this pull request has been merged. - To build libuv, use the vcbuild.bat script in the root directory of - libuv's source tree. Here is a sample command which builds a 64-bit - shared libuv library: + On Windows, libuv is built using CMake. Here is a sample sequence of + commands which builds a 64-bit shared libuv library: - cd libuv-v1.34.2 - vcbuild.bat x64 shared - - The vcbuild.bat script supports several command line switches which can - be listed by running "vcbuild.bat --help". + cd libuv-v1.40.0 + mkdir build + cd build + cmake -DCMAKE_GENERATOR_PLATFORM=x64 .. + cmake --build . --config Release Step 2: Download and build OpenSSL