GauthamBanasandra commented on code in PR #8844:
URL: https://github.com/apache/hadoop/pull/8844#discussion_r4426562799
##########
hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/CMakeLists.txt:
##########
@@ -171,6 +171,13 @@ if (NOT PROTOC_IS_COMPATIBLE)
compiler are compatible with each other.")
endif (NOT PROTOC_IS_COMPATIBLE)
+# The checks above leave CMAKE_REQUIRED_INCLUDES and CMAKE_REQUIRED_LIBRARIES
+# pointing at the Protobuf and Abseil targets. Abseil carries C++ feature
+# requirements, which a C-language check_symbol_exists() below cannot satisfy
+# under the Visual Studio generator. Reset them so later checks run clean.
+unset (CMAKE_REQUIRED_INCLUDES)
+unset (CMAKE_REQUIRED_LIBRARIES)
Review Comment:
Agreed, and fixed in 46038bf1 -- the values are now saved before the
Protobuf check and restored afterwards, rather than unset.
You were right that unsetting discards state rather than restoring it: an
earlier check in the same file sets `CMAKE_REQUIRED_LIBRARIES` to
`${CMAKE_THREAD_LIBS_INIT}` for the `thread_local` probe, so the blanket
`unset` left later checks with less than they started with.
##########
BUILDING.txt:
##########
@@ -603,12 +603,29 @@ still be immensely useful as a raw guide for all the
steps involved in creating
needed to build Hadoop on Windows 10.
Building using the Docker:
+Docker Desktop must first be switched to Windows containers. In the default
Linux container mode
+every command below fails immediately with "no matching manifest for
linux/amd64".
+> "%ProgramFiles%\Docker\Docker\DockerCli.exe" -SwitchWindowsEngine
+
+Wait for the engine to restart, then confirm - this must print "windows"
before proceeding.
+> docker info --format "{{.OSType}}"
+
We first need to build the Docker image for building Hadoop on Windows 10. Run
this command from
the root of the Hadoop repository.
-> docker build -t hadoop-windows-10-builder -f
.\dev-support\docker\Dockerfile_windows_10 .\dev-support\docker\
+> docker build -t hadoop-windows-10-builder -m 8g -f
.\dev-support\docker\Dockerfile_windows_10 .\dev-support\docker\
+
+The -m 8g is needed because the vcpkg step compiles Boost, Protocol Buffers,
OpenSSL and Zlib from
+source and the default container memory is too small. Expect the image build
to take a few hours
+and the resulting image to be around 23 GB. Note that -m and --isolation are
options of the classic
+builder, so leave DOCKER_BUILDKIT unset; BuildKit does not accept them.
Review Comment:
Done in 46038bf1. BUILDING.txt now gives the explicit command for both
shells rather than only saying to leave it unset:
> set DOCKER_BUILDKIT= (cmd.exe)
> $Env:DOCKER_BUILDKIT = '' (PowerShell)
and notes that setting it to 0 works as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]