<div dir="ltr">Anil,<div><br></div><div>I was also never able to build the JDK on my Windows 11 machine, having encountered the same problems you are. The configure script was not finding the boot JDK unless manually specified, nor could it find the installation of Visual Studio 2022. I tried a few months ago and it still didn't work, so you're not alone here. No fix worked, and the log didn't specify where it was looking. I resorted to just developing on my Mac.</div><div><br></div><div>SWinxy</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 5, 2024 at 4:51 PM Anil <<a href="mailto:1dropaflame@gmail.com">1dropaflame@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Here is the screenshot of my Installer - same version of VS as yours.</div><div><br></div><img src="cid:ii_ly9660ga1" alt="image.png" style="margin-right: 25px;"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 5, 2024 at 3:40 PM Chen Liang <<a href="mailto:chen.l.liang@oracle.com" target="_blank">chen.l.liang@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>
<div dir="ltr">
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
To solve this, I have uninstalled VS, reinstalled VS community 2022 17.10.3, selected "Desktop development with C++", which looks like in the attached screenshot.<br>
<br>
After a fresh reinstallation like this, my "bash configure" then succeeds; it failed to find vs before the installation. Can you try following the steps I take, or at least compare your installation details selection to mine?<br>
<span><img size="93728" style="max-width: 1595px;" src="cid:ii_19084a922c9cb971f161"></span></div>
<div id="m_-8989642613450683690m_5230753695597996329appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="m_-8989642613450683690m_5230753695597996329divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> build-dev <<a href="mailto:build-dev-retn@openjdk.org" target="_blank">build-dev-retn@openjdk.org</a>> on behalf of Anil <<a href="mailto:1dropaflame@gmail.com" target="_blank">1dropaflame@gmail.com</a>><br>
<b>Sent:</b> Friday, July 5, 2024 2:57 PM<br>
<b>To:</b> Chen Liang <<a href="mailto:liangchenblue@gmail.com" target="_blank">liangchenblue@gmail.com</a>><br>
<b>Cc:</b> <a href="mailto:build-dev@openjdk.org" target="_blank">build-dev@openjdk.org</a> <<a href="mailto:build-dev@openjdk.org" target="_blank">build-dev@openjdk.org</a>><br>
<b>Subject:</b> Re: building the JDK on Windows using Cygwin</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>[Chen] "try uncheck and recheck the box"</div>
<div><br>
</div>
How will that help?
<div>Following your suggestion, I ran the Installer, then I unchecked the "Desktop Components for C++" box and it says -6.81Gb</div>
<div>That shows it was installed.</div>
<div>Now I check the box again, and it says 0 Gb.</div>
<div>Now the Close button is enabled.</div>
<div>So No action is taken.</div>
<div><br>
</div>
</div>
<br>
<div>
<div dir="ltr">On Fri, Jul 5, 2024 at 2:03 PM Chen Liang <<a href="mailto:liangchenblue@gmail.com" target="_blank">liangchenblue@gmail.com</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<p dir="ltr">try uncheck and recheck the box. some optional components are required for jdk, and uncheck and recheck will select those components if they aren't already selected.</p>
<br>
<div>
<div dir="ltr">On Fri, Jul 5, 2024, 12:17 PM Anil <<a href="mailto:1dropaflame@gmail.com" target="_blank">1dropaflame@gmail.com</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">When I installed VS, I ensured that Desktop Development with C++ was checked.
<div>I ran the installer again, and it shows as checked and since the "Modify" button is not enabled, but "Close" is enabled, it means that it is already installed.</div>
<div>It is the only box checked.<br>
<div><br>
</div>
</div>
</div>
<br>
<div>
<div dir="ltr">On Fri, Jul 5, 2024 at 11:50 AM Chen Liang <<a href="mailto:liangchenblue@gmail.com" rel="noreferrer" target="_blank">liangchenblue@gmail.com</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<p dir="ltr">Hi Anil, I had encountered the same problem before. Can you try install VS's desktop development with c++ with its default selection? Last time I unchecked some boxes and failed like you did. I don't think other big components are required for
jdk.</p>
<br>
<div>
<div dir="ltr">On Fri, Jul 5, 2024, 11:46 AM Anil <<a href="mailto:1dropaflame@gmail.com" rel="noreferrer" target="_blank">1dropaflame@gmail.com</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">Over the past few days, I have tried a lot of things.<br>
I reinstalled Cygwin. I used Git for Windows instead of Cygwin Git.<br>
I uninstalled and reinstalled Visual Studio and in different locations, but it didn't fix it.<br>
I added my user name to the Administrator Group account because one post said that is why I get access denied error but it still failed.<br>
I set it back to being an ordinary user and now shortnames worked<br>
I think the solution was simply to sign out of the Windows account so that processes accessing PROGRA~1 would be stopped.<br>
:) I am glad to be over that hurdle but now I see:<br>
<br>
$ bash configure --enable-debug --with-toolchain-path=/cygdrive/c/PROGRA~1/MICROS~3/2022/Community/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64<br>
configure: Using default toolchain microsoft (Microsoft Visual Studio)<br>
configure: Found Visual Studio installation at /cygdrive/c/progra~1/micros~3/2022/Community using well-known name<br>
configure: Found Microsoft Visual Studio 2022<br>
configure: Trying to extract Visual Studio environment variables for x86_64<br>
configure: using /cygdrive/c/progra~1/micros~3/2022/Community/vc/auxiliary/build/vcvars64.bat<br>
configure: Setting extracted environment variables for x86_64<br>
fixpath: warning: Path '/cygdrive/c/minikube' does not exist<br>
fixpath: failure: Path '/cygdrive/c/progra~2/windows kits/10/windows performance toolkit' contains space<br>
fixpath: failure: Path '/cygdrive/c/progra~1/mysql/mysql shell 8.0/bin' contains space<br>
fixpath: failure: Path '/cygdrive/c/users/anil/appdata/local/programs/microsoft vs code/bin' contains space<br>
fixpath: failure: Path '/cygdrive/c/progra~1/jetbrains/intellij idea community edition 2022.2.3/bin' contains space<br>
fixpath: failure: Path '/cygdrive/c/progra~1/micros~3/2022/community/common7/ide/commonextensions/microsoft/teamfoundation/team explorer' contains space<br>
fixpath: failure: Path '/cygdrive/c/progra~1/micros~3/2022/community/team tools/diagnosticshub/collector' contains space<br>
fixpath: failure: Path '/cygdrive/c/progra~2/windows kits/10/bin/10.0.22621.0/x64' contains space<br>
fixpath: failure: Path '/cygdrive/c/progra~2/windows kits/10/bin/x64' contains space<br>
fixpath: warning: Path '/cygdrive/c/minikube' does not exist<br>
fixpath: failure: Path '/cygdrive/c/progra~2/windows kits/10/windows performance toolkit' contains space<br>
fixpath: failure: Path '/cygdrive/c/progra~1/mysql/mysql shell 8.0/bin' contains space<br>
fixpath: failure: Path '/cygdrive/c/users/anil/appdata/local/programs/microsoft vs code/bin' contains space<br>
fixpath: failure: Path '/cygdrive/c/progra~1/jetbrains/intellij idea community edition 2022.2.3/bin' contains space<br>
fixpath: failure: Path '/cygdrive/c/progra~2/windows kits/10/include/10.0.22621.0/ucrt' contains space<br>
fixpath: failure: Path '/cygdrive/c/progra~2/windows kits/10/include/10.0.22621.0/um' contains space<br>
fixpath: failure: Path '/cygdrive/c/progra~2/windows kits/10/include/10.0.22621.0/shared' contains space<br>
fixpath: failure: Path '/cygdrive/c/progra~2/windows kits/10/include/10.0.22621.0/winrt' contains space<br>
fixpath: failure: Path '/cygdrive/c/progra~2/windows kits/10/include/10.0.22621.0/cppwinrt' contains space<br>
fixpath: failure: Path '/cygdrive/c/progra~2/windows kits/10/lib/10.0.22621.0/ucrt/x64' contains space<br>
fixpath: failure: Path '/cygdrive/c/progra~2/windows kits/10/lib/10.0.22621.0/um/x64' contains space<br>
fixpath: failure: Path '/cygdrive/c/progra~2/windows kits/10/' contains space<br>
fixpath: failure: Path '/cygdrive/c/progra~2/windows kits/10/' contains space<br>
checking that Visual Studio variables have been correctly extracted... ok<br>
checking for cl... $FIXPATH /cygdrive/c/progra~1/micros~3/2022/community/vc/tools/msvc/14.40.33807/bin/hostx64/x64/cl.exe<br>
checking resolved symbolic links for CC... no symlink<br>
configure: Using microsoft C compiler version 19.40.33811 [Microsoft (R) C/C++ Optimizing Compiler Version 19.40.33811 for x64]<br>
checking whether the C compiler works... no<br>
configure: error: in '/cygdrive/c/users/anil/OpenJDK/jdk':<br>
configure: error: C compiler cannot create executables<br>
See 'config.log' for more details<br>
configure exiting with result code 77<br>
</div>
<div dir="ltr"><br>
</div>
<div>I have attached my config.log</div>
<div>appreciate any help.</div>
<div>thanks,</div>
<div>Anil</div>
<div><br>
</div>
<div dir="ltr"><br>
</div>
<div>
<div dir="ltr">On Wed, Jul 3, 2024 at 9:13 AM Anil <<a href="mailto:1dropaflame@gmail.com" rel="noreferrer noreferrer" target="_blank">1dropaflame@gmail.com</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Thank you.
<div>Yes, the vcvars file is present in that folder.</div>
<div><br>
</div>
<div>$ cygpath -d "C:\Program Files\Microsoft Visual<br>
Studio\2022\Community\VC\Auxiliary\Build"<br>
cygpath: cannot create short name of C:\Program Files\Microsoft VisualStudio\2022\Community\VC\Auxiliary\Build<br>
<br>
</div>
<div><br>
</div>
</div>
<br>
<div>
<div dir="ltr">On Wed, Jul 3, 2024 at 2:57 AM Daniel Jeliński <<a href="mailto:djelinski1@gmail.com" rel="noreferrer noreferrer" target="_blank">djelinski1@gmail.com</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi Anil,<br>
Can you check what the following command prints on your machine?<br>
$ cygpath -d "C:\Program Files\Microsoft Visual<br>
Studio\2022\Community\VC\Auxiliary\Build"<br>
<br>
I assume you have this directory on your machine, and it contains a<br>
file named "vcvars64.bat"<br>
<br>
The above command should print a path without spaces. If the command<br>
fails or there are any spaces in the output, that's where you should<br>
focus your search.<br>
<br>
The other thing to check is if you have a case-sensitive file system.<br>
Configure looks for file named (note lowercase in the last 3<br>
directories):<br>
"C:\Program Files\Microsoft Visual<br>
Studio\2022\Community\vc\auxiliary\build\vcvars64.bat"<br>
<br>
and from the logs you provided it looks like that file can't be found.<br>
<br>
By the way, the above paths were used when I started configure with:<br>
$ bash configure --with-tools-dir="C:\Program Files\Microsoft Visual<br>
Studio\2022\Community\VC\Auxiliary\Build"<br>
<br>
..and on my machine that configure command succeeded.<br>
Regards,<br>
Daniel<br>
<br>
wt., 2 lip 2024 o 23:16 Anil <<a href="mailto:1dropaflame@gmail.com" rel="noreferrer noreferrer" target="_blank">1dropaflame@gmail.com</a>> napisał(a):<br>
><br>
> trimming earlier message as it was over 500Kb with attachment. Including configure.log<br>
><br>
><br>
> On Tue, Jul 2, 2024 at 2:00 PM Anil <<a href="mailto:1dropaflame@gmail.com" rel="noreferrer noreferrer" target="_blank">1dropaflame@gmail.com</a>> wrote:<br>
>><br>
>> Thank you.<br>
>> I have attached both config.log and configure.log to this email.<br>
>> Anil<br>
>>><br>
>>><br>
</blockquote>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</div>
</div></blockquote></div>
</blockquote></div>