Re: Choosing which Visual Studio installation to use
Hi Erik, On Thu, Feb 15, 2018 at 4:22 PM, Erik Joelssonwrote: > Hello Thomas, > > If you have multiple versions installed, configure will pick the one to > use in order of most supported. To explicitly pick one, you can use > --with-toolchain-version=2010 (or some other number) and configure will > look for that specific version of Visual Studio. Just pointing to an > install dir or bin dir does not work because configure needs to know which > version it is dealing with and we haven't implemented smart enough > discovery logic to automatically figure that out. > > Great, exactly what I was looking for! > Note that I recently added configure support for 2015 and 2017 in JDK 11. > This does NOT mean the product actually builds with those and configure > will print warnings accordingly. We are working on properly supporting > 2017, but it's apparently non trivial. > > Yes, I was playing around with getting VS2017 to build, and wanted to test changes with various VS versions. I see that Lois Foltan is quite active, maybe I just wait till he is done. ..Thomas > /Erik > > > > On 2018-02-14 03:24, Thomas Stüfe wrote: > >> Hi all, >> >> On Windows, if one has multiple VS installations side by side, is it >> possible to choose which Visual Studio installation to use? >> >> Note that I start the configure script from within the cygwin shell. >> >> Thanks, Thomas >> > >
Re: Choosing which Visual Studio installation to use
Hello, Just want to clear some things up around this. We use Cygwin just as a unix emulation layer for running typical unix tools. OpenJDK can only be built on Windows using Visual Studio as the compiler toolchain. We currently don't support any other unix emulation layer. We have had support for msys and we may work with msys2, but it's not being actively maintained so I'm pretty sure that has bit rotted by now. It's correct that if we actually used the gcc from cygwin, we would build for cygwin and not windows. In the future I would like to support WSL, but it will require some work. I do believe the latest version is competent enough to get everything we need working though. /Erik On 2018-02-14 05:16, John Paul Adrian Glaubitz wrote: On 02/14/2018 02:07 PM, Thomas Stüfe wrote: Does it have to be Cygwin though? Yes. I love cygwin. You can put it into fullscreen and pretend you have a very slow Linux machine :) But seriously, it is very stable and mature, would not like at all to change my environment. Yes, but, if I remember correctly, the problem is that anything built with Cygwin always requires Cygwin to be present to be able to run. You always have to carry the runtime around if I remember correctly. On Windows I usually install the "git bash for Windows" package or whatever it's called and it gives me a nice bash command prompt with a working git and bash environment. You can then call the environment scripts from there. Can you do a full openjdk build with that? I haven't tried OpenJDK. But in my previous company we did heavy Qt development with git bash for Windows and any additional external libraries that were required could usually be installed manually. It required some elbow grease, but at least the resulting binaries were regular Win32 applications which didn't require any particular runtime environment to be present except for the DLLs the binaries were linked against. Adrian
Re: Choosing which Visual Studio installation to use
Hello Thomas, If you have multiple versions installed, configure will pick the one to use in order of most supported. To explicitly pick one, you can use --with-toolchain-version=2010 (or some other number) and configure will look for that specific version of Visual Studio. Just pointing to an install dir or bin dir does not work because configure needs to know which version it is dealing with and we haven't implemented smart enough discovery logic to automatically figure that out. Note that I recently added configure support for 2015 and 2017 in JDK 11. This does NOT mean the product actually builds with those and configure will print warnings accordingly. We are working on properly supporting 2017, but it's apparently non trivial. /Erik On 2018-02-14 03:24, Thomas Stüfe wrote: Hi all, On Windows, if one has multiple VS installations side by side, is it possible to choose which Visual Studio installation to use? Note that I start the configure script from within the cygwin shell. Thanks, Thomas
Re: Choosing which Visual Studio installation to use
Hi Michael, On Wed, Feb 14, 2018 at 4:20 PM, Michal Valawrote: > Hi, > > On 02/14/2018 12:24 PM, Thomas Stüfe wrote: > >> Hi all, >> >> On Windows, if one has multiple VS installations side by side, is it >> possible to choose which Visual Studio installation to use? >> >> Note that I start the configure script from within the cygwin shell. >> >> > OpenJDK configure is reading VS environment properties > VS100COMNTOOLS/VS120COMNTOOLS/VS140COMNTOOLS etc. One option is to set > just one of them. AFAIK configure takes latest supported VS (2013 for > ojdk9). > > Another option is to use configure parameters, but I don't know how > exactly use them. Try to look to configure help > > $ bash ./configure --help | grep toolchain > --with-tools-diralias for --with-toolchain-path for backwards > --with-toolchain-path prepend these directories when searching for > toolchain binaries (compilers etc) > --with-toolchain-type the toolchain type (or family) to use, use > '--help' > --with-toolchain-version > the version of the toolchain to look for, use > --with-build-devkit Devkit to use for the build platform toolchain > [toolchain dependent] > The following toolchains are available as arguments to > --with-toolchain-type. > > > -- > Michal Vala > OpenJDK QE > Red Hat Czech > Thank you for your pointers, I'll see how far I get. ..Thomas
Re: Choosing which Visual Studio installation to use
Hi, On 02/14/2018 12:24 PM, Thomas Stüfe wrote: Hi all, On Windows, if one has multiple VS installations side by side, is it possible to choose which Visual Studio installation to use? Note that I start the configure script from within the cygwin shell. OpenJDK configure is reading VS environment properties VS100COMNTOOLS/VS120COMNTOOLS/VS140COMNTOOLS etc. One option is to set just one of them. AFAIK configure takes latest supported VS (2013 for ojdk9). Another option is to use configure parameters, but I don't know how exactly use them. Try to look to configure help $ bash ./configure --help | grep toolchain --with-tools-diralias for --with-toolchain-path for backwards --with-toolchain-path prepend these directories when searching for toolchain binaries (compilers etc) --with-toolchain-type the toolchain type (or family) to use, use '--help' --with-toolchain-version the version of the toolchain to look for, use --with-build-devkit Devkit to use for the build platform toolchain [toolchain dependent] The following toolchains are available as arguments to --with-toolchain-type. -- Michal Vala OpenJDK QE Red Hat Czech
Re: Choosing which Visual Studio installation to use
On Wed, Feb 14, 2018 at 2:16 PM, John Paul Adrian Glaubitz < glaub...@physik.fu-berlin.de> wrote: > On 02/14/2018 02:07 PM, Thomas Stüfe wrote: > >> Does it have to be Cygwin though? >> >> >> Yes. I love cygwin. You can put it into fullscreen and pretend you have a >> very slow Linux machine :) But seriously, it is very stable and mature, >> would not like at all to change my environment. >> > > Yes, but, if I remember correctly, the problem is that anything built > with Cygwin always requires Cygwin to be present to be able to run. > > We do not build with cygwin. We just use the cygwin tool chain (bash, make etc) to run the make. Compiler tool chain is still Visual Studio (hence the original question). > You always have to carry the runtime around if I remember correctly. > > Maybe if you use cygwin gcc, but the standard openjdk build on Windows does not. There was someone on the mailing list attempting to build with gcc, if I remember correctly. If you are right, this would be an argument against such a build. > On Windows I usually install the "git bash for Windows" package or >> whatever >> it's called and it gives me a nice bash command prompt with a working >> git >> and bash environment. You can then call the environment scripts from >> there. >> >> >> Can you do a full openjdk build with that? >> > I haven't tried OpenJDK. But in my previous company we did heavy Qt > development > with git bash for Windows and any additional external libraries that were > required > could usually be installed manually. It required some elbow grease, but at > least > the resulting binaries were regular Win32 applications which didn't > require any > particular runtime environment to be present except for the DLLs the > binaries > were linked against. Neither do ours, see above. cygwin basically gives you apt-get for windows. A very well maintained repository of any tool you potentially need. In addition to the pure build tool, I use ksh, diff tools, vim, mercurial, git, ... from cygwin. That completeness together with the stability is very useful. (So, if any Redhat people read this, thank you for cygwin :-) ..Thomas > > > Adrian > > -- > .''`. John Paul Adrian Glaubitz > : :' : Debian Developer - glaub...@debian.org > `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de > `-GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913 >
Re: Choosing which Visual Studio installation to use
On 02/14/2018 02:07 PM, Thomas Stüfe wrote: Does it have to be Cygwin though? Yes. I love cygwin. You can put it into fullscreen and pretend you have a very slow Linux machine :) But seriously, it is very stable and mature, would not like at all to change my environment. Yes, but, if I remember correctly, the problem is that anything built with Cygwin always requires Cygwin to be present to be able to run. You always have to carry the runtime around if I remember correctly. On Windows I usually install the "git bash for Windows" package or whatever it's called and it gives me a nice bash command prompt with a working git and bash environment. You can then call the environment scripts from there. Can you do a full openjdk build with that? I haven't tried OpenJDK. But in my previous company we did heavy Qt development with git bash for Windows and any additional external libraries that were required could usually be installed manually. It required some elbow grease, but at least the resulting binaries were regular Win32 applications which didn't require any particular runtime environment to be present except for the DLLs the binaries were linked against. Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `-GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Re: Choosing which Visual Studio installation to use
On Wed, Feb 14, 2018 at 12:45 PM, John Paul Adrian Glaubitz < glaub...@physik.fu-berlin.de> wrote: > On 02/14/2018 12:42 PM, Thomas Stüfe wrote: > >> Yes, that is normally the way - that or just starting the corresponding >> "visual studio command prompt" shell. That is why I was specifying that I >> am running from cygwin shell - the openjdk build somehow chooses that batch >> script for you, and it would be nice to be able to choose with a configure >> option. >> > > Does it have to be Cygwin though? > > Yes. I love cygwin. You can put it into fullscreen and pretend you have a very slow Linux machine :) But seriously, it is very stable and mature, would not like at all to change my environment. On Windows I usually install the "git bash for Windows" package or whatever > it's called and it gives me a nice bash command prompt with a working git > and bash environment. You can then call the environment scripts from there. > > Can you do a full openjdk build with that? ..Thomas > > Adrian > > -- > .''`. John Paul Adrian Glaubitz > : :' : Debian Developer - glaub...@debian.org > `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de > `-GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913 >
Re: Choosing which Visual Studio installation to use
On 02/14/2018 12:42 PM, Thomas Stüfe wrote: Yes, that is normally the way - that or just starting the corresponding "visual studio command prompt" shell. That is why I was specifying that I am running from cygwin shell - the openjdk build somehow chooses that batch script for you, and it would be nice to be able to choose with a configure option. Does it have to be Cygwin though? On Windows I usually install the "git bash for Windows" package or whatever it's called and it gives me a nice bash command prompt with a working git and bash environment. You can then call the environment scripts from there. Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `-GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Re: Choosing which Visual Studio installation to use
Hi Adrian, On Wed, Feb 14, 2018 at 12:29 PM, John Paul Adrian Glaubitz < glaub...@physik.fu-berlin.de> wrote: > Hi Thomas! > > On 02/14/2018 12:24 PM, Thomas Stüfe wrote: > >> On Windows, if one has multiple VS installations side by side, is it >> possible to choose which Visual Studio installation to use? >> > > From my slightly rusted memory regarding Visual Studio, isn't the regular > way to choose a certain VS toolchain calling a batch script which sets > the environment variables for the toolchain to be used. > > That is, when you open a command prompt and type "cl.exe" which usually > end up with a "Bad command or filename" error as none of the command > line utilities are normally set in $PATH. > > Yes, that is normally the way - that or just starting the corresponding "visual studio command prompt" shell. That is why I was specifying that I am running from cygwin shell - the openjdk build somehow chooses that batch script for you, and it would be nice to be able to choose with a configure option. ..Thomas > So, I would guess that you would use that method for OpenJDK as well? > > Adrian > > -- > .''`. John Paul Adrian Glaubitz > : :' : Debian Developer - glaub...@debian.org > `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de > `-GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913 >
Re: Choosing which Visual Studio installation to use
Hi Thomas! On 02/14/2018 12:24 PM, Thomas Stüfe wrote: On Windows, if one has multiple VS installations side by side, is it possible to choose which Visual Studio installation to use? From my slightly rusted memory regarding Visual Studio, isn't the regular way to choose a certain VS toolchain calling a batch script which sets the environment variables for the toolchain to be used. That is, when you open a command prompt and type "cl.exe" which usually end up with a "Bad command or filename" error as none of the command line utilities are normally set in $PATH. So, I would guess that you would use that method for OpenJDK as well? Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `-GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913