`build.win32x86/HowToBuild` describes how we can build the VM using cygwin. However, I have installed WSL instead. When running `mvm`, it gives me:
``` ../../platforms/win32/vm/sqWin32Utils.c:11:10: fatal error: Windows.h: No such file or directory ```
What do I have to do to enable mingw to find these header files? Any help is appreciated.
I would like to debug the dnd plugin for Windows. But if possible, I did not want to install cygwin additionally as I prefer WSL ...
Hi Christoph.
WSL = Windows Subsystem for Linux? https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux [https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux]
Can you even build Windows binaries from within WSL? I don't know.
Using Cygwin, you can build Windows binaries that link against Cygwin1.dll. Using MinGW (not necessarily out of Cygwin) you can build Windows binaries that directly link to Windows libraries. MinGW provides all the header files such as windows.h.
But you can also use the MSVC compiler. :-) I think. There are people doing that.
Best, Marcel Am 13.06.2020 19:33:37 schrieb Christoph Thiede notifications@github.com: I would like to debug the dnd plugin for Windows. But if possible, I did not want to install cygwin additionally as I prefer WSL ...
-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510#issuecomment-64...
I would like to debug the dnd plugin for Windows. But if possible, I did not want to install cygwin additionally as I prefer WSL ...
— You are receiving this because you commented. Reply to this email directly, view it on GitHub [https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510#issuecomment-64...], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AIJPEW6D4M55JISUIMAUUG3RWO...].
Hi Marcel,
WSL = Windows Subsystem for Linux? https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux
Exactly. :-)
I tried installing Cygwin now, too, but I still do not succeed. I ran `scripts/installCygwin.bat`, then started a Cygwin session and ran the `mvm` script from there. But still, `Windows.h` is not found. Is this what I am supposed to do?
However, I tried MSVC, too (this would be my preferred way over Cygwin). So, again strictly following the `HowToBuild` file, I opened an x86 Native Tools Command Prompt, navigated to `build.win32x86\squeak.cog.spur`, executed `..\common\SETPATH.BAT` and finally `..\common\MAKEDEBUG.BAT`. Now guess what `type LOGD` will give me? ``` ../../platforms/win32/vm/sqWin32Utils.c:11:10: fatal error: Windows.h: No such file or directory ```
So I guess the `HowToBuild` instructions much miss some significant point on how to these headers ... :-(
Best, Christoph
Hi Christoph,
On Jun 13, 2020, at 11:07 AM, Christoph Thiede notifications@github.com wrote:
Hi Marcel,
WSL = Windows Subsystem for Linux? https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux
Exactly. :-)
I tried installing Cygwin now, too, but I still do not succeed. I ran scripts/installCygwin.bat, then started a Cygwin session and ran the mvm script from there. But still, Windows.h is not found. Is this what I am supposed to do?
However, I tried MSVC, too (this would be my preferred way over Cygwin). So, again strictly following the HowToBuild file, I opened an x86 Native Tools Command Prompt, navigated to build.win32x86\squeak.cog.spur, executed ..\common\SETPATH.BAT and finally ..\common\MAKEDEBUG.BAT. Now guess what type LOGD will give me?
../../platforms/win32/vm/sqWin32Utils.c:11:10: fatal error: Windows.h: No such file or directory So I guess the HowToBuild instructions much miss some significant point on how to these headers ... :-(
Did you install an SDK? I’m pretty sure that’s where the Windows.h headers live. Instal a 10.x SDK if you haven’t already.
Best, Christoph
_,,,^..^,,,_ (phone)
Using Cygwin, you can build Windows binaries that link against Cygwin1.dll. Using MinGW (not necessarily out of Cygwin) you can build Windows binaries that directly link to Windows libraries. MinGW provides all the header files such as windows.h.
Technically, we don't build a cygwin application (requiring Cygwin1.dll). We use cross-compiler for a mingw64 target. It's just that cygwin comes with enough pre-compiled tools and libraries (including mingw target), unlike various flavours of mingw/msys. Eliot provided makefiles for using MSVC toolchain, but we still need a gnu-make AFAIR.
Maybe it's possible to use WSL if you installed enough tools for cross-compiling a mingw target, but you'll be alone then, I think no one ever tried that.
installCygwin.bat requires parameters, at least x86_64, otherwise, it will install tools for 32bit (i686) VM. see https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/07161bcb145bc4c6b08c6...
Maybe it's possible to use WSL if you installed enough tools for cross-compiling a mingw target, but you'll be alone then, I think no one ever tried that.
As said, this would be optimal, but at the moment I will be happy if I manage to build it anyhow :-)
installCygwin.bat requires parameters, at least x86_64, otherwise, it will install tools for 32bit (i686) VM. see
https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/07161bcb145bc4c6b08c6...
Yes, I had specified these parameters (`i686`). I am trying to build the 32bit version.
WSL runs a Linux, so without cross-compilation you don't make Windows binaries there, unlike with mingw or Cygwin. If you want a VM that runs in WSL, build a Linux VM. Don't use WSL to build a Windows VM.
Kind regards, Jakob
Christoph Thiede notifications@github.com schrieb am Sa., 13. Juni 2020, 21:21:
Maybe it's possible to use WSL if you installed enough tools for cross-compiling a mingw target, but you'll be alone then, I think no one ever tried that.
As said, this would be optimal, but at the moment I will be happy if I manage to build it anyhow :-)
installCygwin.bat requires parameters, at least x86_64, otherwise, it will install tools for 32bit (i686) VM. see
https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/07161bcb145bc4c6b08c6...
Yes, I had specified these parameters (i686). I am trying to build the 32bit version.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510#issuecomment-643666521, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIJPEW6GXMF32FGZCWLGLZDRWPGRBANCNFSM4N5CJXTQ .
please don't send me more letters !!!
On 2020-06-13, at 23:29, Jakob Reschke forums.jakob@resfarm.de wrote:
WSL runs a Linux, so without cross-compilation you don't make Windows binaries there, unlike with mingw or Cygwin. If you want a VM that runs in WSL, build a Linux VM. Don't use WSL to build a Windows VM.
Kind regards, Jakob
Christoph Thiede notifications@github.com schrieb am Sa., 13. Juni 2020, 21:21:
Maybe it's possible to use WSL if you installed enough tools for cross-compiling a mingw target, but you'll be alone then, I think no one ever tried that.
As said, this would be optimal, but at the moment I will be happy if I manage to build it anyhow :-)
installCygwin.bat requires parameters, at least x86_64, otherwise, it will install tools for 32bit (i686) VM. see
https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/07161bcb145bc4c6b08c6...
Yes, I had specified these parameters (i686). I am trying to build the 32bit version.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
Alright, thanks for all your help. Marcel has explained to me that I need to start cygwin via the `cygwin.bat` but never must start the `bash.exe` itself. Now the headers are found and `mvm` succeeds! 🎉
I still don't understand why it did work for me via MSVC, but at least I can build now, so everything else is secondary :-)
... I can build the VM, but I cannot load any image file. After running `Squeak[Console].exe` and choosing an image, I always get `[Smalltalk stack dump: ]Segmentation fault`. gdb only tells me that the exception occurs in JIT code. Is this a common problem? How can I investigate this? :-)
Is it the win64 (64 bits) VM?<br> It's currently broken (crash at early startup).
There is an issue opened https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/498 <br> It would be great to bissect...
AFAIK, the build using LLVM clange.exe is working OK though...<br> But this requires different build instructions...
Is it the win64 (64 bits) VM?
`build.win32x86`, no 64 bit. Hm ... could this occur because I have installed 64-bit version of cygwin?
Is it the win64 (64 bits) VM?
`build.win32x86`, no 64 bit. Hm ... could this occur because I have installed 64-bit version of cygwin?
No, just installed cygwin 32 bit and built everything again. Still segfault ...
No progress on this so far. Does there exist something like a docker file I could use to skip all these error-prone setup steps?
Hi Christoph,
On Jun 19, 2020, at 11:56 AM, Christoph Thiede notifications@github.com wrote:
Is it the win64 (64 bits) VM?
build.win32x86, no 64 bit. Hm ... could this occur because I have installed 64-bit version of cygwin?
No. 64-bit Cygwin will build the 32-bit vm. The problem is that its gdb won’t debug the 32-big exe :-(. So if you do want to debug you have to install 32-big Cygwin, & IIRC it had to be on a 32-bit OS. Hence use a VM :-(
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Hi all,
here are my current results of building the spur versions on Windows, using commit 16ffd5b3c4c6e48968277e40543ca1f96b984473 + patch from https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/498#issuecomment-64...
- cygwin32/cygwin64 for `build.win32x86`: ```console $ ./mvm -f <lots of output with exit code zero> $ ./build/vm/SqueakConsole ..\relative\path\to\valid\squeak.image Could not open the Squeak image file <C:\absolute\path\to\valid\squeak.image> <...> Aborting... Smalltalk stack dump: <end of output> ``` - cygwin32 for `build.win64x64`: ```console $ ./mvm -f <lots of output with exit code zero> $ ./build/vm/SqueakConsole ..\relative\path\to\valid\squeak.image <no output> ``` - cygwin64 for `build.win64x64`: ```console $ ./mvm -f <less but still a lot of output> rm: cannot remove 'build/vm/ADPCMCodecPlugin.lib': No such file or directory make[1]: [/cygdrive/c/Users/Christoph/OneDrive/Dokumente/Squeak/Christoph/git/opensmalltalk-vm/build.win64x64/common/Makefile.plugin:139: build/vm/ADPCMCodecPlugin.lib] Error 1 (ignored) x86_64-w64-mingw32-ar rc build/vm/ADPCMCodecPlugin.lib build/ADPCMCodecPlugin/ADPCMCodecPlugin.o make[1]: x86_64-w64-mingw32-ar: No such file or directory make[1]: *** [/cygdrive/c/Users/Christoph/OneDrive/Dokumente/Squeak/Christoph/git/opensmalltalk- vm/build.win64x64/common/Makefile.plugin:140: build/vm/ADPCMCodecPlugin.lib] Error 127 make[1]: Leaving directory „/cygdrive/c/Users/Christoph/OneDrive/Dokumente/Squeak/Christoph/git/opensmalltalk- vm/build.win64x64/squeak.cog.spur“ make: *** [../common/Makefile:271: build/vm/ADPCMCodecPlugin.lib] Error 2 <exit code nonzero> ```
Additional notes: - When I run `SqueakConsole.exe` from Cygwin, the output listed above is appended by a "Segmentation fault" line. When run in PowerShell, this line is not displayed, but everything else looks identically. - Running `Squeak.exe` (without "Console") did not work better, but as is known does not log errors to the console. - Despite I passed the image path to the executable, I have to choose it manually in a dialog. - Same problems when using `squeak.stack.spur` instead of `squeak.cog.spur`. So this is not a JIT problem (is this correct?).
If anyone succeeds to build, we should really encapsulate the necessary tech stack. I believe this could make things really easier ... 😅
Hi Christoph,
please read my message here:
http://forum.world.st/Win64-Builds-broken-slow-build-times-tp5116826p5120506...
It explains the bug and how to fix it.
_,,,^..^,,,_ (phone)
On Sep 1, 2020, at 9:34 AM, Christoph Thiede notifications@github.com wrote:
Hi all,
here are my current results of building the spur versions on Windows, using commit 16ffd5b + patch from #498 (comment)
cygwin32/cygwin64 for build.win32x86: $ ./mvm -f
<lots of output with exit code zero> $ ./build/vm/SqueakConsole ..\relative\path\to\valid\squeak.image Could not open the Squeak image file <C:\absolute\path\to\valid\squeak.image> <...> Aborting... Smalltalk stack dump: <end of output> cygwin32 for build.win64x64: $ ./mvm -f <lots of output with exit code zero> $ ./build/vm/SqueakConsole ..\relative\path\to\valid\squeak.image <no output> cygwin64 for build.win64x64: $ ./mvm -f <less but still a lot of output> rm: cannot remove 'build/vm/ADPCMCodecPlugin.lib': No such file or directory make[1]: [/cygdrive/c/Users/Christoph/OneDrive/Dokumente/Squeak/Christoph/git/opensmalltalk-vm/build.win64x64/common/Makefile.plugin:139: build/vm/ADPCMCodecPlugin.lib] Error 1 (ignored) x86_64-w64-mingw32-ar rc build/vm/ADPCMCodecPlugin.lib build/ADPCMCodecPlugin/ADPCMCodecPlugin.o make[1]: x86_64-w64-mingw32-ar: No such file or directory make[1]: *** [/cygdrive/c/Users/Christoph/OneDrive/Dokumente/Squeak/Christoph/git/opensmalltalk- vm/build.win64x64/common/Makefile.plugin:140: build/vm/ADPCMCodecPlugin.lib] Error 127 make[1]: Leaving directory „/cygdrive/c/Users/Christoph/OneDrive/Dokumente/Squeak/Christoph/git/opensmalltalk- vm/build.win64x64/squeak.cog.spur“ make: *** [../common/Makefile:271: build/vm/ADPCMCodecPlugin.lib] Error 2 <exit code nonzero> Additional notes:
When I run SqueakConsole.exe from Cygwin, the output listed above is appended by a "Segmentation fault" line. When run in PowerShell, this line is not displayed, but everything else looks identically. Running Squeak.exe (without "Console") did not work better, but as is known does not log errors to the console. Despite I passed the image path to the executable, I have to choose it manually in a dialog. Same problems when using squeak.stack.spur instead of squeak.cog.spur. So this is not a JIT problem (is this correct?). If anyone succeeds to build, we should really encapsulate the necessary tech stack. I believe this could make things really easier ... 😅
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
Thanks Eliot,
[@nicolas-cellier-aka-nice wrote](http://forum.world.st/Win64-Builds-broken-slow-build-times-tp5116826p5120507...) that could fix the cygwin builds on his machine. This solution did not work for me, so is it possible that there is another problem?
Otherwise, I will try soon again to build using MSVC ...
Closed #510.
I have to apologize for a stupid rookie mistake. The 32-bit builds "did not work" for me because I was trying to open a 64-bit image file in it, which Marcel kindly made we aware of ...
So to correct the above description, I can say:
- cygwin32/cygwin64 for `build.win32x86`: works! - Still, `build.win64x64` is crashing despite applying Nicolas' patch, but this should be discussed in #498.
Because I did not ask a specific question, I'm going to close this now - yahoo, I can finally start developing for the OSVM Windows platform! :tada:
vm-dev@lists.squeakfoundation.org