[
https://issues.apache.org/jira/browse/HADOOP-19016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17800186#comment-17800186
]
Gautham Banasandra commented on HADOOP-19016:
---------------------------------------------
[~wekoms] Ah, my bad. You're right, the VS build tools doesn't give the
*devenv* tool. We thus need to bypass the invocation of *win-vs-upgrade.cmd*.
This happens when you specify the following maven argument -
{code}
-Duse.platformToolsetVersion=v142
{code}
In fact, you'll need to pass all these arguments to maven, as mentioned in the
build instructions -
https://github.com/apache/hadoop/blob/415e9bdfbdeebded520e0233bcb91a487411a94b/BUILDING.txt#L644-L651
{code}
> set classpath=
> set PROTOBUF_HOME=C:\vcpkg\installed\x64-windows
> mvn clean package -Dhttps.protocols=TLSv1.2 -DskipTests -DskipDocs
> -Pnative-win,dist^
-Drequire.openssl -Drequire.test.libhadoop -Pyarn-ui
-Dshell-executable=C:\Git\bin\bash.exe^
-Dtar -Dopenssl.prefix=C:\vcpkg\installed\x64-windows^
-Dcmake.prefix.path=C:\vcpkg\installed\x64-windows^
-Dwindows.cmake.toolchain.file=C:\vcpkg\scripts\buildsystems\vcpkg.cmake
-Dwindows.cmake.build.type=RelWithDebInfo^
-Dwindows.build.hdfspp.dll=off -Dwindows.no.sasl=on
-Duse.platformToolsetVersion=v142
{code}
> Unable to build Hadoop in Windows Container due to missing of devenv
> --------------------------------------------------------------------
>
> Key: HADOOP-19016
> URL: https://issues.apache.org/jira/browse/HADOOP-19016
> Project: Hadoop Common
> Issue Type: Bug
> Components: client-mounts, common
> Affects Versions: 3.3.4
> Environment: Can reproduce this on 2 of my computers.
> * Windows 11 22631.2861
> * Docker Desktop 4.26.1 (131620)
> * Docker version 24.0.7, build afdd53b
> * Tested Hadoop trunk commit: 77edca8f0a97668722a6d602aa4d08d1fff06172
> * Tested Hadoop 3.3.4 commit: a585a73c3e02ac62350c136643a5e7f6095a3dbb
> Reporter: wy
> Priority: Major
> Attachments: image-2023-12-22-17-12-45-278.png,
> image-2023-12-22-17-14-49-935.png, image-2023-12-22-17-18-37-712.png,
> image-2023-12-22-17-20-24-345.png, image-2023-12-22-20-08-59-918.png,
> screenshot-1.png
>
>
> For Windows,
> [Dockerfile|https://github.com/apache/hadoop/blob/77edca8f0a97668722a6d602aa4d08d1fff06172/dev-support/docker/Dockerfile_windows_10]
> and [build
> instructions|https://github.com/apache/hadoop/blob/trunk/BUILDING.txt] are
> provided for building Hadoop. However, when starting to Maven build Hadoop
> project in the container, it will fail at calling `devenv` to upgrade VS
> solutions:
> !image-2023-12-22-17-12-45-278.png!
> This is caused by
> [win-vs-upgrade.cmd|https://github.com/apache/hadoop/blob/trunk/dev-support/bin/win-vs-upgrade.cmd].
> The script checks whether there's `devenv` command, and if there's not, exit
> with error.
> !image-2023-12-22-17-14-49-935.png!
> The script is called during building Hadoop Common project, set in win-native
> profile of the
> [POM|https://github.com/apache/hadoop/blob/77edca8f0a97668722a6d602aa4d08d1fff06172/hadoop-common-project/hadoop-common/pom.xml#L903C38-L903C38].
> !image-2023-12-22-17-18-37-712.png!
> But within the container the command is not available, so it will always fail
> at this step.
> !image-2023-12-22-17-20-24-345.png!
> If we manually edit the file, removing the check and the call to devenv. The
> build will still fail, because current sln file within the code repo is based
> on VS 2010. Because the VS tools installed is 2019(16), the versions do not
> match.
> !image-2023-12-22-20-08-59-918.png!
> I'm not sure if someone has successfully built Hadoop using this Dockerfile
> before, but currently it doesn't seem to be possible to directly build it
> just following BUILDING.txt without other change.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]