<div dir="ltr"><div dir="auto"><div>[Chen] "Also for configure/make, never pass paths with spaces, always use short name to avoid space, use /cygdrive/c/..., and never pass backslashes."</div><div dir="auto"><br></div><div dir="auto">Using the short name command produced "access denied". How did you use short name for Visual Studio?</div><div dir="auto"><br></div><div>Update:</div><div><br></div><div>While searching for the config.log file as Daniel advised, I found in build/windows-x86_64-server-release, a file: fixpath</div><div dir="auto">$ cat fixpath<br></div><div dir="auto"><br></div><div>showed</div><div><br></div><div>#!/bin/bash<br>export PATH="$PATH:/usr/local/bin:/usr/bin:/cygdrive/c/Python312/Scripts:/cygdrive/c/Python312:/cygdrive/c/Python311/Scripts:/cygdrive/c/Python311:/cygdrive/c/Python310/Scripts:/cygdrive/c/Python310:/cygdrive/c/Program Files/Common Files/Oracle/Java/javapath:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/WINDOWS/System32/OpenSSH:/cygdrive/c/Program Files/apache-maven-3.6.3/bin:/cygdrive/c/Program Files/TortoiseGit/bin:/cygdrive/c/Program Files/Git/cmd:/cygdrive/c/ProgramData/chocolatey/bin:/cygdrive/c/Program Files/dotnet:/cygdrive/c/minikube:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/WINDOWS/System32/OpenSSH:/cygdrive/c/Program Files/Docker/Docker/resources/bin:/cygdrive/c/Program Files/Java/jdk-17.0.4.1/bin:/cygdrive/c/Program Files/PowerShell/7:/cygdrive/c/Program Files/nodejs:/cygdrive/c/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit:/cygdrive/c/Program Files/MySQL/MySQL Shell 8.0/bin:/cygdrive/c/Users/Anil/AppData/Local/Programs/Python/Python39/Scripts:/cygdrive/c/Users/Anil/AppData/Local/Programs/Python/Python39:/cygdrive/c/Users/Anil/AppData/Local/Microsoft/WindowsApps:/cygdrive/c/Users/Anil/AppData/Local/Programs/Microsoft VS Code/bin:/cygdrive/c/Program Files/JetBrains/IntelliJ IDEA Community Edition 2022.2.3/bin:/cygdrive/c/Users/Anil/AppData/Local/GitHubDesktop/bin:/cygdrive/c/Users/Anil/AppData/Roaming/npm"<br>. /c/users/anil/openjdk/jdk/make/scripts/fixpath.sh -e /usr/bin/cygpath -p /cygdrive -r C:\\cygwin64 -t /tmp -c /cygdrive/c/WINDOWS/system32/cmd.exe -q "$@"<br></div><div><br></div><div>I edited the file to put</div><div><br></div><div>export PATH="$PATH:/usr/local/bin:/usr/bin:<b>/cygdrive/c/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64</b>:/cygdrive/c/Python312/Scripts:/cygdrive/c/Python312:/cygdrive/c/Python311/Scripts:/cygdrive/c/Python311:/cygdrive/c/Python310/Scripts:/cygdrive/c/Python310:/cygdrive/c/Program Files/Common Files/Oracle/Java/javapath:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/WINDOWS/System32/OpenSSH:/cygdrive/c/Program<br></div><div>...</div><div>After running bash configure again, I found the entry was erased!</div><div><br></div><div>~/jdk/build/windows-x86_64-server-release<br>$ cat fixpath<br>#!/bin/bash<br>export PATH="$PATH:/usr/local/bin:/usr/bin:/cygdrive/c/Python312/Scripts:/cygdrive/c/Python312:/<br></div><div><br></div><div><br></div><div>so I get the same error</div><div>configure: error: Cannot locate a valid Visual Studio installation<br>configure exiting with result code 1<br></div><div><br></div><div>I went in to Windows and added a new Environment Variable entry to Path for both User and System: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\Hostx64\x64</div><div>I rebooted the machine.</div><div><br></div><div>in ~/jdk/build/windows-x86_64-server-fastdebug<br>$ cat fixpath<br>#!/bin/bash<br>export PATH="$PATH:/usr/local/bin:/usr/bin:/cygdrive/c/Python312/Scripts:/cygdrive/c/Python312:/cygdrive/c/Python311/Scripts:/cygdrive/c/Python311:/cygdrive/c/Python310/Scripts:/cygdrive/c/Python310:/cygdrive/c/Program Files/Common Files/Oracle/Java/javapath:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/WINDOWS/System32/OpenSSH:/cygdrive/c/Program Files/apache-maven-3.6.3/bin:/cygdrive/c/Program Files/TortoiseGit/bin:/cygdrive/c/Program Files/Git/cmd:/cygdrive/c/ProgramData/chocolatey/bin:/cygdrive/c/Program Files/dotnet:/cygdrive/c/minikube:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/WINDOWS/System32/OpenSSH:/cygdrive/c/Program Files/Docker/Docker/resources/bin:/cygdrive/c/Program Files/Java/jdk-17.0.4.1/bin:/cygdrive/c/Program Files/PowerShell/7:/cygdrive/c/Program Files/nodejs:/cygdrive/c/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit:/cygdrive/c/Program Files/MySQL/MySQL Shell 8.0/bin:/cygdrive/c/Users/Anil/AppData/Local/Programs/Python/Python39/Scripts:/cygdrive/c/Users/Anil/AppData/Local/Programs/Python/Python39:/cygdrive/c/Users/Anil/AppData/Local/Microsoft/WindowsApps:/cygdrive/c/Users/Anil/AppData/Local/Programs/Microsoft VS Code/bin:/cygdrive/c/Program Files/JetBrains/IntelliJ IDEA Community Edition 2022.2.3/bin:/cygdrive/c/Users/Anil/AppData/Local/GitHubDesktop/bin:/cygdrive/c/Users/Anil/AppData/Roaming/npm"<br>. /c/users/anil/openjdk/jdk/make/scripts/fixpath.sh -e /usr/bin/cygpath -p /cygdrive -r C:\\cygwin64 -t /tmp -c /cygdrive/c/WINDOWS/system32/cmd.exe -q "$@"<br><br>in ~/jdk/build/windows-x86_64-server-fastdebug<br>$ ls ../windows-x86_64-server-release/fixpath<br>../windows-x86_64-server-release/fixpath<br><br>in ~/jdk/build/windows-x86_64-server-fastdebug<br>$ cat ../windows-x86_64-server-release/fixpath<br>#!/bin/bash<br>export PATH="$PATH:/usr/local/bin:/usr/bin:/cygdrive/c/Python312/Scripts:/cygdrive/c/Python312:/cygdrive/c/Python311/Scripts:/cygdrive/c/Python311:/cygdrive/c/Python310/Scripts:/cygdrive/c/Python310:/cygdrive/c/Program Files/Common Files/Oracle/Java/javapath:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/WINDOWS/System32/OpenSSH:/cygdrive/c/Program Files/apache-maven-3.6.3/bin:/cygdrive/c/Program Files/TortoiseGit/bin:/cygdrive/c/Program Files/Git/cmd:/cygdrive/c/ProgramData/chocolatey/bin:/cygdrive/c/Program Files/dotnet:/cygdrive/c/minikube:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/WINDOWS/System32/OpenSSH:/cygdrive/c/Program Files/Docker/Docker/resources/bin:/cygdrive/c/Program Files/Java/jdk-17.0.4.1/bin:/cygdrive/c/Program Files/PowerShell/7:/cygdrive/c/Program Files/nodejs:/cygdrive/c/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit:/cygdrive/c/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin:/cygdrive/c/Program Files/MySQL/MySQL Shell 8.0/bin:/cygdrive/c/Users/Anil/AppData/Local/Programs/Python/Python39/Scripts:/cygdrive/c/Users/Anil/AppData/Local/Programs/Python/Python39:/cygdrive/c/Users/Anil/AppData/Local/Microsoft/WindowsApps:/cygdrive/c/Users/Anil/AppData/Local/Programs/Microsoft VS Code/bin:/cygdrive/c/Program Files/JetBrains/IntelliJ IDEA Community Edition 2022.2.3/bin:/cygdrive/c/Users/Anil/AppData/Local/GitHubDesktop/bin:/cygdrive/c/Users/Anil/AppData/Roaming/npm:<b>/cygdrive/c/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin</b>"<br>. /c/users/anil/openjdk/jdk/make/scripts/fixpath.sh -e /usr/bin/cygpath -p /cygdrive -r C:\\cygwin64 -t /tmp -c /cygdrive/c/WINDOWS/system32/cmd.exe -q "$@"<br></div><div dir="auto"><br>I found that only the windows-x86_64-server-release/fixpath has taken the new entry.</div><div dir="auto">Is it a bug in the build system?</div><div dir="auto"><br></div><div>running bash configure, I get the same error.</div><div>configure: error: Cannot locate a valid Visual Studio installation<br></div><div dir="auto"><br></div><div dir="auto">Anil</div><div dir="auto"><br><br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Tue, Jul 2, 2024, 2:15 AM Chen Liang <<a href="mailto:liangchenblue@gmail.com" target="_blank">liangchenblue@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>Make sure all visual studio and related processes running in that directory are terminated. If you have trouble you might restart windows in safe mode.</div><div dir="auto"><br></div><div dir="auto">Also for configure/make, never pass paths with spaces, always use short name to avoid space, use /cygdrive/c/..., and never pass backslashes. That fixes a lot of bugs.<br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Mon, Jul 1, 2024, 8:55 PM Anil <<a href="mailto:1dropaflame@gmail.com" rel="noreferrer noreferrer" target="_blank">1dropaflame@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thank you for your reply.<div>I ran the Visual Studio Setup and installed both Build Tools 2019, and also Visual Studio 2022.</div><div>I enabled the checkboxes in *both* for Desktop Development with C++.</div><div> <div><div>I tried it but failed. I opened Administrator window in both Powershell and CMD but both gave "Access is denied"</div><div><br></div><div>PS C:\WINDOWS\system32> cd 'C:\Program Files\'<br>PS C:\Program Files> fsutil file setshortname "Microsoft Visual Studio" MICROS~3<br>Error: Access is denied.<br>PS C:\Program Files><br></div><div><br></div><div>Someone else suggested</div><div>$ bash configure --enable-debug --with-toolchain-path="C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.40.33807\\bin\\Hostx64\\x64" --with-toolchain-version=2022<br></div><div>and also without</div><div>$ bash configure --enable-debug --with-toolchain-path="C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.40.33807\\bin\\Hostx64\\x64" <br></div><div>and also with 2019</div><div><div>$ bash configure --enable-debug --with-toolchain-path="C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.40.33807\\bin\\Hostx64\\x64" --with-toolchain-version=2019<br></div><br></div><div>all give error:</div><div><br></div><div>configure: Using default toolchain microsoft (Microsoft Visual Studio)<br>configure: error: Cannot locate a valid Visual Studio installation<br>configure exiting with result code 1<br></div><div><br></div><div><br></div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 1, 2024 at 7:53 PM Chen Liang <<a href="mailto:liangchenblue@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">liangchenblue@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>Hi Anil,<div>I will share how I set up Visual Studio 2022 (2019 is a bit old now) for building JDK.</div><div>First, I go to <a href="https://visualstudio.microsoft.com" rel="noreferrer noreferrer noreferrer" target="_blank">https://visualstudio.microsoft.com</a> to download the visual studio setup (which installs an installer)</div><div>Once in the installer, go to visual studio, and select "Desktop Development with C++" which will install everything you need.</div></div><div><br></div><div>In your "C:\Program Files" (or C:\PROGRA~1) open administrator powershell (you can do it by right-clicking on win start menu icon) run:</div>fsutil file setshortname "Microsoft Visual Studio" MICROS~3<br><div>This is the only directory that really need short path; the rest of the path to cl already has no space.</div><div><br></div><div>And yes, I am using Windows11+cygwin to build openjdk. I think you already have 8dot3name enabled so you can see PROGRA~1, you shouldn't be far.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 1, 2024 at 2:31 PM Anil <<a href="mailto:1dropaflame@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">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">[Erik] "
You could try enabling 8dot3name on the whole volume (C:) using fsutil [1], "<div>I don't know what this means and the side effects. I don't want to try this on the entire C:<br></div><div>There must be people using Windows11 and Cygwin64 who have gotten OpenJDK to build?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 1, 2024 at 1:59 AM <<a href="mailto:erik.joelsson@oracle.com" rel="noreferrer noreferrer noreferrer" target="_blank">erik.joelsson@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"><u></u>
<div>
<p>Hello Anil,<br>
</p>
<div>On 6/30/24 12:50, Anil wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">I went into the VC.../bin directory to get the
actual path and tried again, but it failed.
<div><br>
</div>
<div>$ bash configure
--with-boot-jdk=/c/Users/Anil/OpenJDK/jdk-22.0.1
--enable-debug --with-tools-dir="C:\PROGRA~2\Microsoft Visual
Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin"<br>
</div>
</div>
</blockquote>
<p>The OpenJDK build cannot handle paths with spaces in them, and on
Windows, where the default installation directories of things like
Visual Studio and the SDK have spaces in the directory names, we
rely on short paths to work around this. If you installed Visual
Studio in the default location, you should not need to point to a
tools dir, and doing so won't help if the paths can't be expressed
without spaces in them. It's annoying that Windows seems to have
turned off short path generation by default in later versions.</p>
<p>You could try enabling 8dot3name on the whole volume (C:) using
fsutil [1], but you probably need to reinstall Visual Studio after
that to get the short path names generated for all the directories
in the installation.<br>
</p>
<p>/Erik<br>
</p>
<p>[1]
<a href="https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/fsutil-8dot3name" rel="noreferrer noreferrer noreferrer" target="_blank">https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/fsutil-8dot3name</a><br>
</p>
<blockquote type="cite">
<div dir="ltr">
<div>configure: Using default toolchain microsoft (Microsoft
Visual Studio)<br>
configure: The path given by --with-tools-dir does not contain
a valid<br>
configure: Visual Studio installation. Please point to the
VC/bin or VC/bin/amd64<br>
configure: directory within the Visual Studio installation<br>
configure: error: Cannot locate a valid Visual Studio
installation<br>
configure exiting with result code 1<br>
</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sun, Jun 30, 2024 at
2:07 PM Anil <<a href="mailto:1dropaflame@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">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">Thank you for your reply.
<div>I tried without those flags and got the same error
message</div>
<div>$ bash configure
--with-boot-jdk=/c/Users/Anil/OpenJDK/jdk-22.0.1<br>
</div>
<div>...</div>
<div>configure: Using default toolchain microsoft (Microsoft
Visual Studio)<br>
configure: error: Cannot locate a valid Visual Studio
installation<br>
configure exiting with result code 1<br>
</div>
<div><br>
</div>
<div>checking the shortnames.</div>
<div><br>
</div>
<div>C:\>dir /x<br>
Directory of C:\<br>
</div>
<div>06/29/2024 09:43 PM <DIR> PROGRA~1
Program Files<br>
03/01/2024 06:34 PM <DIR> PROGRA~2
Program Files (x86)<br>
</div>
<div><br>
</div>
<div>
<div>Directory of C:\PROGRA~1<br>
</div>
<div>C:\PROGRA~1>dir /x<br>
</div>
<div>06/29/2024 09:43 PM <DIR>
Microsoft Visual Studio</div>
</div>
<div><br>
</div>
<div>Directory of C:\PROGRA~2<br>
</div>
<div>C:\PROGRA~2>dir /x</div>
<div>06/29/2024 09:41 PM <DIR> Microsoft
Visual Studio<br>
</div>
<div><br>
</div>
<div>I don't see any shortnames set. </div>
<div><br>
</div>
<div>In the Visual Studio Installer, both Visual Studio
Build Tools 2019 and Visual Studio Community are set.</div>
<div>When I click on the Build Tools, I see the checkbox for
Desktop C++ is checked.</div>
<div><br>
</div>
<div><br>
</div>
<div>I saw that the C++ </div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sun, Jun 30, 2024 at
1:24 PM Chen Liang <<a href="mailto:liangchenblue@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">liangchenblue@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>Usually Microsoft Visual Studio c compiler (as
installed by Visual Studio installer) already has
short names set. It seems the short name has to be 8
characters in length and you can't set it when some
process is running in that directory. You can check
the short path in Windows cmd's "dir /x" command. And
try configure without --with-toolchain-version and
--with-tools-dir and only set these flags if it fails
without those flags: you declare version is 22 but you
point to MSVC 2019's directory, and you should point
to the bin directory within the VC directory.</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sun, Jun 30, 2024
at 12:57 PM Anil <<a href="mailto:1dropaflame@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">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">Update:
<div>I was able to get past the error</div>
<div>
<div dir="ltr">
<div>I installed Visual Studio 2022, rebooted,
but it still cannot detect it.</div>
</div>
</div>
<div><br>
</div>
<div>PS C:\> fsutil file setshortname "Program
Files (x86)" PROGRA~1<br>
Error: Access is denied.</div>
<div><br>
</div>
<div>PS C:\Program Files (x86)> fsutil file
setshortname "Microsoft Visual Studio"
Microsoft_Visual_Studio_2019<br>
Error: The parameter is incorrect.<br>
</div>
<div><br>
</div>
<div>$ bash configure
--with-boot-jdk=/c/Users/Anil/OpenJDK/jdk-22.0.1
--with-toolchain-version=2022 --enable-debug
--with-tools-dir="C:\Program Files (x86)\Microsoft
Visual Studio\2019\BuildTools\VC"<br>
</div>
<div><br>
</div>
<div>configure: Using default toolchain microsoft
(Microsoft Visual Studio)<br>
configure: The path given by --with-tools-dir does
not contain a valid<br>
configure: Visual Studio installation. Please
point to the VC/bin or VC/bin/amd64<br>
configure: directory within the Visual Studio
installation<br>
configure: error: Cannot locate a valid Visual
Studio installation<br>
configure exiting with result code 1</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, Jun 28,
2024 at 8:50 PM Anil <<a href="mailto:1dropaflame@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">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>(changed Subject line. was: Is anyone able
to build the JDK on Windows using VirtualBox
to host Ubuntu?)</div>
<div><br>
</div>
<div dir="ltr">I downloaded and unzipped
openjdk.
<div>$ ls<br>
jdk jdk-22.0.1
openjdk-22.0.1_windows-x64_bin.zip<br>
<br>
</div>
<div>but still I get the same error message</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">configure:
Could not find a valid Boot JDK. OpenJDK
distributions are available at <a href="http://jdk.java.net/" rel="noreferrer noreferrer noreferrer" target="_blank">http://jdk.java.net/</a>.<br>
configure: This might be fixed by explicitly
setting --with-boot-jdk<br>
configure: error: Cannot continue<br>
configure exiting with result code 1</blockquote>
<div><br>
</div>
<div>I am wondering if I should <i>not </i>install
the Open JDK in the directory created by
Cygwin (/c/Users/Anil/OpenJDK) but install
it in the /cygdrive Windows folders?</div>
<div>(I observe that the folder created in
Cygwin is not visible outside, in Windows
even after rebooting the laptop).</div>
<div>Can someone please confirm?</div>
<div>thanks,</div>
<div>Anil</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, Jun
28, 2024 at 6:48 PM Anil <<a href="mailto:1dropaflame@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">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">Thank you. I installed Cygwin
on my Windows 11 laptop, and after
overcoming some minor blocks, ran 'bash
configure'.
<div>Am I correct in assuming that I also
need to have Open JDK installed, not the
Oracle JDK?</div>
<div>I have Java 17 from Oracle installed.<br>
<div><br>
</div>
<div>configure: Found potential Boot JDK
using JAVA_HOME<br>
configure: Potential Boot JDK found at
/cygdrive/c/progra~1/java/jdk-17.0.4.1
is); ignoringot(TM) 64-Bit Server VM
(build 17.0.4.1+1-LTS-2, mixed mode,
sharing)<br>
configure: (Your Boot JDK version must
be one of: 22 23 24)<br>
checking for javac...
/cygdrive/c/progra~1/common~1/oracle/java/javapath/javac.exe<br>
checking for java...
/cygdrive/c/progra~1/common~1/oracle/java/javapath/java.exe<br>
configure: Found potential Boot JDK
using well-known locations (in
/cygdrive/c/progra~1/java/jdk-17.0.4.1)<br>
configure: Potential Boot JDK found at
/cygdrive/c/progra~1/java/jdk-17.0.4.1
is); ignoringot(TM) 64-Bit Server VM
(build 17.0.4.1+1-LTS-2, mixed mode,
sharing)<br>
configure: (Your Boot JDK version must
be one of: 22 23 24)<br>
configure: Found potential Boot JDK
using well-known locations (in
/cygdrive/c/progra~1/java/jdk-11.0.10)<br>
configure: Potential Boot JDK found at
/cygdrive/c/progra~1/java/jdk-11.0.10
is ); ignoringot(TM) 64-Bit Server VM
18.9 (build 11.0.10+8-LTS-162, mixed
mode)<br>
configure: (Your Boot JDK version must
be one of: 22 23 24)<br>
configure: Found potential Boot JDK
using well-known locations (in
/cygdrive/c/progra~1/java/javafx-sdk-11.0.2)<br>
configure: Potential Boot JDK found at
/cygdrive/c/progra~1/java/javafx-sdk-11.0.2 did not contain bin/java;
ignoring<br>
configure: Found potential Boot JDK
using well-known locations (in
/cygdrive/c/progra~1/java/jdk-17.0.4.1)<br>
configure: Potential Boot JDK found at
/cygdrive/c/progra~1/java/jdk-17.0.4.1
is); ignoringot(TM) 64-Bit Server VM
(build 17.0.4.1+1-LTS-2, mixed mode,
sharing)<br>
configure: (Your Boot JDK version must
be one of: 22 23 24)<br>
configure: Found potential Boot JDK
using well-known locations (in
/cygdrive/c/progra~1/java/jdk-11.0.10)<br>
configure: Potential Boot JDK found at
/cygdrive/c/progra~1/java/jdk-11.0.10
is ); ignoringot(TM) 64-Bit Server VM
18.9 (build 11.0.10+8-LTS-162, mixed
mode)<br>
configure: (Your Boot JDK version must
be one of: 22 23 24)<br>
configure: Found potential Boot JDK
using well-known locations (in
/cygdrive/c/progra~1/java/javafx-sdk-11.0.2)<br>
configure: Potential Boot JDK found at
/cygdrive/c/progra~1/java/javafx-sdk-11.0.2 did not contain bin/java;
ignoring<br>
configure: Found potential Boot JDK
using well-known locations (in
/cygdrive/c/Program
Files/Java/jdk-17.0.4.1)<br>
configure: Potential Boot JDK found at
/cygdrive/c/Program
Files/Java/jdk-17.0.4); ignoringot(TM)
64-Bit Server VM (build
17.0.4.1+1-LTS-2, mixed mode, sharing)<br>
configure: (Your Boot JDK version must
be one of: 22 23 24)<br>
configure: Found potential Boot JDK
using well-known locations (in
/cygdrive/c/Program
Files/Java/jdk-11.0.10)<br>
configure: Potential Boot JDK found at
/cygdrive/c/Program
Files/Java/jdk-11.0.1); ignoringot(TM)
64-Bit Server VM 18.9 (build
11.0.10+8-LTS-162, mixed mode)<br>
configure: (Your Boot JDK version must
be one of: 22 23 24)<br>
configure: Found potential Boot JDK
using well-known locations (in
/cygdrive/c/Program
Files/Java/javafx-sdk-11.0.2)<br>
configure: Potential Boot JDK found at
/cygdrive/c/Program
Files/Java/javafx-sdk-11.0.2 did not
contain bin/java; ignoring<br>
configure: Could not find a valid Boot
JDK. OpenJDK distributions are
available at <a href="http://jdk.java.net/" rel="noreferrer noreferrer noreferrer" target="_blank">http://jdk.java.net/</a>.<br>
configure: This might be fixed by
explicitly setting --with-boot-jdk<br>
configure: error: Cannot continue<br>
configure exiting with result code 1<br>
<br>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu,
Jun 27, 2024 at 9:06 AM <<a href="mailto:erik.joelsson@oracle.com" rel="noreferrer noreferrer noreferrer" target="_blank">erik.joelsson@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>
<p>Hello Anil,</p>
<p>Building in a VM on a laptop should
be doable, but given how resource
intensive the JDK build is, you
could run into problems like you
describe. You are most likely to get
the best build performance running
natively on the machine and OS you
have, so my recommendation is to
build for Windows in your case. If
you still prefer to build for Linux,
I think the best option is to use
WSL. See doc/building.md for
instructions on how to build for
Linux in WSL. To build for Windows,
I recommend installing Cygwin as the
most straightforward and well tested
option for a POSIX support layer on
Windows. Once installed, you won't
need to run any Windows commands as
Cygwin emulates a Linux/Unix
environment. Again see
doc/building.md for instructions on
how to install a build environment
on Windows.</p>
<p>/Erik<br>
</p>
<div>On 6/27/24 04:51, Anil wrote:<br>
</div>
<blockquote type="cite">
<div dir="auto">I want to try out a
small contribution to the JDK and
want to build the JDK first.
<div dir="auto">I have a Windows
11 laptop. </div>
<div dir="auto"><br>
</div>
<div dir="auto">I am not
comfortable with the Windows
commands and someone mentioned
in this forum that most of the
building is done on Linux.
<div dir="auto">So I installed
VirtualBox 7.0.18 and Ubuntu
24.04. however I was getting
black screens and freezing. I
downgraded the Ubuntu to
222.04 and still got black
screens. I don't know why this
is happening.</div>
<div dir="auto">Any advice
appreciated. </div>
<div dir="auto">Anil</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On
Tue, Jun 18, 2024, 7:25 PM Anil
<<a href="mailto:1dropaflame@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">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">Hello,
<div>I want to try out a small
contribution to the JDK and
wanted to build the JDK
first, </div>
<div>before I change the code.</div>
<div>I forked and cloned the
jdk following the
instructions at <a href="https://openjdk.org/guide/#cloning-the-jdk" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">The
OpenJDK Developers' Guide
– OpenJDK Developers’
Guide</a></div>
<div><br>
</div>
<div>I am on Windows 11.</div>
<div>These instructions are
given on the page but I am
unsure which of these to
execute since I have already
forked and cloned the git
repo</div>
<div><br>
</div>
<div>
<pre style="font-family:"DejaVu Sans Mono","Bitstream Vera Sans Mono","Luxi Mono","Courier New",monospace;font-size:smaller;margin-top:1em;color:rgb(0,0,0)"><code style="font-family:"DejaVu Sans Mono","Bitstream Vera Sans Mono","Luxi Mono","Courier New",monospace;border:1px solid rgb(204,204,204);background:rgb(252,252,255);display:block;padding:0.5em;margin:0em">$ wget <a href="https://download.java.net/java/GA/jdk16/7863447f0ab643c585b9bdebf67c69db/36/GPL/openjdk-16_linux-x64_bin.tar.gz" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">https://download.java.net/java/GA/jdk16/7863447f0ab643c585b9bdebf67c69db/36/GPL/openjdk-16_linux-x64_bin.tar.gz</a>
$ tar xzf openjdk-16_linux-x64_bin.tar.gz
$ sudo apt-get install autoconf zip make gcc g++ libx11-dev libxext-dev libxrender-dev libxrandr-dev libxtst-dev libxt-dev libcups2-dev libfontconfig1-dev libasound2-dev
$ cd jdk
$ sh ./configure --with-boot-jdk=$HOME/jdk-16/
$ make images</code></pre>
<br>
</div>
<div>Do I still need to do the
wget?</div>
<div>Also, I wondered if I
should use book jdk-17
instead of jdk-16 as in the
instructions above.</div>
<div>thanks,</div>
<div>Anil</div>
<div><br>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div></div></div>
</blockquote></div></div></div>
</div>