[OpenSmalltalk/opensmalltalk-vm] How to build on Win32 using WSL/Ubuntu | Missing headers (#510)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

[OpenSmalltalk/opensmalltalk-vm] How to build on Win32 using WSL/Ubuntu | Missing headers (#510)

Christoph Thiede-2
 

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.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] How to build on Win32 using WSL/Ubuntu | Missing headers (#510)

Christoph Thiede-2
 

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, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510#issuecomment-643653889", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510#issuecomment-643653889", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] How to build on Win32 using WSL/Ubuntu | Missing headers (#510)

marcel.taeumel
 
Hi Christoph.

WSL = 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 <[hidden email]>:

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-643653889


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, or unsubscribe.



Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] How to build on Win32 using WSL/Ubuntu | Missing headers (#510)

Christoph Thiede-2
In reply to this post by Christoph Thiede-2
 

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


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510#issuecomment-643657950", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510#issuecomment-643657950", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] How to build on Win32 using WSL/Ubuntu | Missing headers (#510)

Christoph Thiede-2
In reply to this post by Christoph Thiede-2
 

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/07161bcb145bc4c6b08c617df2c708e3a94597b6/.appveyor.yml#L162


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510#issuecomment-643662996", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510#issuecomment-643662996", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] How to build on Win32 using WSL/Ubuntu | Missing headers (#510)

Christoph Thiede-2
In reply to this post by Christoph Thiede-2
 

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/07161bcb145bc4c6b08c617df2c708e3a94597b6/.appveyor.yml#L162

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.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510#issuecomment-643666521", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510#issuecomment-643666521", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] How to build on Win32 using WSL/Ubuntu | Missing headers (#510)

Jakob Reschke-2
 
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 <[hidden email]> 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/07161bcb145bc4c6b08c617df2c708e3a94597b6/.appveyor.yml#L162

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.

Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] How to build on Win32 using WSL/Ubuntu | Missing headers (#510)

Christoph Thiede-2
In reply to this post by Christoph Thiede-2
 

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 :-)


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510#issuecomment-646657836", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510#issuecomment-646657836", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] How to build on Win32 using WSL/Ubuntu | Missing headers (#510)

Christoph Thiede-2
In reply to this post by Christoph Thiede-2
 

... 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? :-)


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510#issuecomment-646676717", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510#issuecomment-646676717", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] How to build on Win32 using WSL/Ubuntu | Missing headers (#510)

Christoph Thiede-2
In reply to this post by Christoph Thiede-2
 

Is it the win64 (64 bits) VM?

It's currently broken (crash at early startup).

There is an issue opened #498

It would be great to bissect...

AFAIK, the build using LLVM clange.exe is working OK though...

But this requires different build instructions...


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510#issuecomment-646799339", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510#issuecomment-646799339", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] How to build on Win32 using WSL/Ubuntu | Missing headers (#510)

Christoph Thiede-2
In reply to this post by Christoph Thiede-2
 

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?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510#issuecomment-646816887", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510#issuecomment-646816887", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] How to build on Win32 using WSL/Ubuntu | Missing headers (#510)

Christoph Thiede-2
In reply to this post by Christoph Thiede-2
 

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 ...


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510#issuecomment-646824874", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510#issuecomment-646824874", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] How to build on Win32 using WSL/Ubuntu | Missing headers (#510)

Christoph Thiede-2
In reply to this post by Christoph Thiede-2
 

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?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510#issuecomment-653500456", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/510#issuecomment-653500456", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>