Re: building the JDK on Windows using Cygwin

2024-07-12 Thread SWinxy
Chen! Good news: your fix works. Here's more on what I did. 1. I ran fsutil 8dot3name set 0 2. I rebooted into Safe Mode 3. I ran fsutil file setShortName in Program Files (x86); "Windows Kits" became WINKIT~1 4. I exited safe mode 5. I ran fsutil file setShortName in Program Files; "Microsoft Vi

Re: building the JDK on Windows using Cygwin

2024-07-11 Thread Chen Liang
Hi SWinxy, For not finding JDK, I recommend you set the %JAVA_HOME% environment variable to your latest Java installation. For VS, configure looks for the path and tries to fixpath, so you should be good mostly if you set the short names (just need no spaces) for "Windows Kits" and "Microsoft Visua

Re: building the JDK on Windows using Cygwin

2024-07-05 Thread Anil
[Chen] "try uncheck and recheck the box" How will that help? Following your suggestion, I ran the Installer, then I unchecked the "Desktop Components for C++" box and it says -6.81Gb That shows it was installed. Now I check the box again, and it says 0 Gb. Now the Close button is enabled. So No ac

Re: building the JDK on Windows using Cygwin

2024-07-05 Thread Chen Liang
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. On Fri, Jul 5, 2024, 12:17 PM Anil <1dropafl...@gmail.com> wrote: > When I installed VS, I ensured that Desktop Development with C+

Re: building the JDK on Windows using Cygwin

2024-07-05 Thread Anil
When I installed VS, I ensured that Desktop Development with C++ was checked. 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. It is the only box checked. On Fri, Jul 5, 2024 at 11:50 AM

Re: building the JDK on Windows using Cygwin

2024-07-05 Thread Chen Liang
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. On Fri, Jul 5, 2024, 11:46 AM Anil <1dropafl...@g

Re: building the JDK on Windows using Cygwin

2024-07-05 Thread Anil
Over the past few days, I have tried a lot of things. I reinstalled Cygwin. I used Git for Windows instead of Cygwin Git. I uninstalled and reinstalled Visual Studio and in different locations, but it didn't fix it. I added my user name to the Administrator Group account because one post said that

Re: building the JDK on Windows using Cygwin

2024-07-03 Thread Anil
Thank you. Yes, the vcvars file is present in that folder. $ cygpath -d "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build" cygpath: cannot create short name of C:\Program Files\Microsoft VisualStudio\2022\Community\VC\Auxiliary\Build On Wed, Jul 3, 2024 at 2:57 AM Dan

Re: building the JDK on Windows using Cygwin

2024-07-03 Thread Daniel Jeliński
Hi Anil, Can you check what the following command prints on your machine? $ cygpath -d "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build" I assume you have this directory on your machine, and it contains a file named "vcvars64.bat" The above command should print a path w

Re: building the JDK on Windows using Cygwin

2024-07-02 Thread erik . joelsson
On 7/1/24 18:55, Anil wrote: Thank you for your reply. I ran the Visual Studio Setup and installed both Build Tools 2019, and also Visual Studio 2022. I enabled the checkboxes in *both* for Desktop Development with C++. I tried it but failed. I opened Administrator window in both Powershell an

Re: building the JDK on Windows using Cygwin

2024-07-02 Thread Daniel Jeliński
Hi, If you want to know a Windows path to the Cygwin directory you're in, you can use the following command: $ cygpath -w `pwd` C:\cygwin64\home\anil If you want to know a Cygwin path without spaces for a Windows directory, you can use the following: $ cygpath `cygpath -d 'C:\Program Files\Micros

Re: building the JDK on Windows using Cygwin

2024-07-02 Thread Anil
How do I find the config.log? The Cygwin folder is not visible from Windows File Explorer. C:\Users\Anil does not show /c/Users/Anil/OpenJDK/ On Tue, Jul 2, 2024 at 10:52 AM Anil <1dropafl...@gmail.com> wrote: > What does this mean? It is not clear enough. > > Do not put the JDK clone in a path

Re: building the JDK on Windows using Cygwin

2024-07-02 Thread Anil
What does this mean? It is not clear enough. Do not put the JDK clone in a path under your Cygwin home directory. This > is especially important if your user name contains spaces and/or mixed > upper and lower case letters. jdk/doc/building.md at master · openjdk/jdk (github.com)

Re: building the JDK on Windows using Cygwin

2024-07-02 Thread Anil
[Chen] "Also for configure/make, never pass paths with spaces, always use short name to avoid space, use /cygdrive/c/..., and never pass backslashes." Using the short name command produced "access denied". How did you use short name for Visual Studio? Update: While searching for the config.log f

Re: building the JDK on Windows using Cygwin

2024-07-02 Thread Daniel Jeliński
Hi Anil, I can confirm that building on Windows 11 + cygwin + VS 2022 Community installed with default settings and in the default location works just fine without any extra command line parameters. The only parameter you need is --with-boot-jdk, and even that can be omitted if you have the right J

Re: building the JDK on Windows using Cygwin

2024-07-02 Thread Chen Liang
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. Also for configure/make, never pass paths with spaces, always use short name to avoid space, use /cygdrive/c/..., and never pass backslashes. That

Re: building the JDK on Windows using Cygwin

2024-07-01 Thread Anil
Thank you for your reply. I ran the Visual Studio Setup and installed both Build Tools 2019, and also Visual Studio 2022. I enabled the checkboxes in *both* for Desktop Development with C++. I tried it but failed. I opened Administrator window in both Powershell and CMD but both gave "Access is de

Re: building the JDK on Windows using Cygwin

2024-07-01 Thread Chen Liang
Hi Anil, I will share how I set up Visual Studio 2022 (2019 is a bit old now) for building JDK. First, I go to https://visualstudio.microsoft.com to download the visual studio setup (which installs an installer) Once in the installer, go to visual studio, and select "Desktop Development with C++" w

Re: building the JDK on Windows using Cygwin

2024-07-01 Thread Anil
[Erik] " You could try enabling 8dot3name on the whole volume (C:) using fsutil [1], " I don't know what this means and the side effects. I don't want to try this on the entire C: There must be people using Windows11 and Cygwin64 who have gotten OpenJDK to build? On Mon, Jul 1, 2024 at 1:59 AM w

Re: building the JDK on Windows using Cygwin

2024-07-01 Thread erik . joelsson
Hello Anil, On 6/30/24 12:50, Anil wrote: I went into the VC.../bin directory to get the actual path and tried again, but it failed. $ 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

Re: building the JDK on Windows using Cygwin

2024-06-30 Thread Anil
I went into the VC.../bin directory to get the actual path and tried again, but it failed. $ 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" configure: Using default

Re: building the JDK on Windows using Cygwin

2024-06-30 Thread Anil
Thank you for your reply. I tried without those flags and got the same error message $ bash configure --with-boot-jdk=/c/Users/Anil/OpenJDK/jdk-22.0.1 ... configure: Using default toolchain microsoft (Microsoft Visual Studio) configure: error: Cannot locate a valid Visual Studio installation config

Re: building the JDK on Windows using Cygwin

2024-06-30 Thread Chen Liang
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" comm

Re: building the JDK on Windows using Cygwin

2024-06-30 Thread Anil
Update: I was able to get past the error I installed Visual Studio 2022, rebooted, but it still cannot detect it. PS C:\> fsutil file setshortname "Program Files (x86)" PROGRA~1 Error: Access is denied. PS C:\Program Files (x86)> fsutil file setshortname "Microsoft Visual Studio" Microsoft_Vis