www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Is there a dmd.exe x86_64 out there?

reply Dlangofile <please no.com> writes:
Hi all,

I'm building a Docker Alpine linux image with wine, for being 
able to forge Windows executable from my laptop, without having 
to dual boot.

With my disappointment, I'm not able to run 32bit executable from 
the container right now, so the easy way is running a win64 
dmd.exe: someone can point me to a pre-build executable, based on 
the latest version?

Thanks
Jun 24 2016
parent reply rikki cattermole <rikki cattermole.co.nz> writes:
On 25/06/2016 5:57 AM, Dlangofile wrote:
 Hi all,

 I'm building a Docker Alpine linux image with wine, for being able to
 forge Windows executable from my laptop, without having to dual boot.

 With my disappointment, I'm not able to run 32bit executable from the
 container right now, so the easy way is running a win64 dmd.exe: someone
 can point me to a pre-build executable, based on the latest version?

 Thanks
Umm, x86_64 is backwards compatible with x86. So if 32bit build of dmd doesn't work, you have bigger problems.
Jun 24 2016
parent reply Dlangofile <please no.com> writes:
On Saturday, 25 June 2016 at 03:29:02 UTC, rikki cattermole wrote:
 On 25/06/2016 5:57 AM, Dlangofile wrote:
 Hi all,

 I'm building a Docker Alpine linux image with wine, for being 
 able to
 forge Windows executable from my laptop, without having to 
 dual boot.

 With my disappointment, I'm not able to run 32bit executable 
 from the
 container right now, so the easy way is running a win64 
 dmd.exe: someone
 can point me to a pre-build executable, based on the latest 
 version?

 Thanks
Umm, x86_64 is backwards compatible with x86. So if 32bit build of dmd doesn't work, you have bigger problems.
Well, frankly speaking I don't know! PE32+ executable (console) x86-64, for MS Windows -> working well PE32 executable (console) Intel 80386, for MS Windows -> not working at all I tried also to use a WINEARCH=win32, without success: I'm attaching the Dockerfile at the end, if someone wants to help more on that. In the meantime, any x86-64 DMD executable? What's the problem in having it available by default in the Windows distribution? Thanks /D FROM alpine:3.4 RUN apk --no-cache add wine freetype ncurses file ENV WINEARCH=win64 RUN wineboot ADD dmd2 /dmd2 CMD ["sh"]
Jun 25 2016
parent reply rikki cattermole <rikki cattermole.co.nz> writes:
On 25/06/2016 9:03 PM, Dlangofile wrote:
 On Saturday, 25 June 2016 at 03:29:02 UTC, rikki cattermole wrote:
 On 25/06/2016 5:57 AM, Dlangofile wrote:
 Hi all,

 I'm building a Docker Alpine linux image with wine, for being able to
 forge Windows executable from my laptop, without having to dual boot.

 With my disappointment, I'm not able to run 32bit executable from the
 container right now, so the easy way is running a win64 dmd.exe: someone
 can point me to a pre-build executable, based on the latest version?

 Thanks
Umm, x86_64 is backwards compatible with x86. So if 32bit build of dmd doesn't work, you have bigger problems.
Well, frankly speaking I don't know! PE32+ executable (console) x86-64, for MS Windows -> working well PE32 executable (console) Intel 80386, for MS Windows -> not working at all I tried also to use a WINEARCH=win32, without success: I'm attaching the Dockerfile at the end, if someone wants to help more on that. In the meantime, any x86-64 DMD executable? What's the problem in having it available by default in the Windows distribution? Thanks /D FROM alpine:3.4 RUN apk --no-cache add wine freetype ncurses file ENV WINEARCH=win64 RUN wineboot ADD dmd2 /dmd2 CMD ["sh"]
We need to see any errors produced from Wine. It is known that dmd does run under it. Which means something is wrong with your setup. As I said about x86_64 being backwards compatible with x86 (you can even run old 386 programs on a modern day cpu, go figure) so that isn't the problem. The reason why we do not provide a dmd compiled for 64bit is simply, 32bit works in pretty much all cases. The cases it doesn't involve very large code bases being compiled. The only platform this may not be true for is OSX where 32bit is long dead globally and 64bit is the only option. Sadly Windows and Linux still have 32bit cpus common in the last 10 years. I just had a look into Wine, I'm not sure if this helps[0]. Right now you're not creating a new Wine environment or configuring it. Otherwise, can you change over to a 32bit image instead of 64bit alpine? That probably will also fix it. [0] https://wiki.winehq.org/FAQ#How_do_I_create_a_32_bit_wineprefix_on_a_64_bit_system.3F
Jun 25 2016
parent reply Dlangofile <please no.com> writes:
On Saturday, 25 June 2016 at 09:39:21 UTC, rikki cattermole wrote:
 On 25/06/2016 9:03 PM, Dlangofile wrote:
 On Saturday, 25 June 2016 at 03:29:02 UTC, rikki cattermole 
 wrote:
 On 25/06/2016 5:57 AM, Dlangofile wrote:
 Hi all,

 I'm building a Docker Alpine linux image with wine, for 
 being able to
 forge Windows executable from my laptop, without having to 
 dual boot.

 With my disappointment, I'm not able to run 32bit executable 
 from the
 container right now, so the easy way is running a win64 
 dmd.exe: someone
 can point me to a pre-build executable, based on the latest 
 version?

 Thanks
Umm, x86_64 is backwards compatible with x86. So if 32bit build of dmd doesn't work, you have bigger problems.
Well, frankly speaking I don't know! PE32+ executable (console) x86-64, for MS Windows -> working well PE32 executable (console) Intel 80386, for MS Windows -> not working at all I tried also to use a WINEARCH=win32, without success: I'm attaching the Dockerfile at the end, if someone wants to help more on that. In the meantime, any x86-64 DMD executable? What's the problem in having it available by default in the Windows distribution? Thanks /D FROM alpine:3.4 RUN apk --no-cache add wine freetype ncurses file ENV WINEARCH=win64 RUN wineboot ADD dmd2 /dmd2 CMD ["sh"]
We need to see any errors produced from Wine. It is known that dmd does run under it. Which means something is wrong with your setup.
with WINEARCH=win64 err:winediag:nulldrv_CreateWindow Application tried to create a window, but no driver could be loaded. err:winediag:nulldrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly. wineconsole: Starting program "dmd.exe" failed. The command is invalid. with WINEARCH=win32 wine: '/root/.wine' is a 32-bit installation, it cannot support 64-bit applications.
 As I said about x86_64 being backwards compatible with x86 (you 
 can even run old 386 programs on a modern day cpu, go figure) 
 so that isn't the problem.
Maybe the Alpine Linux package for Wine has only 64-bit support...
 The reason why we do not provide a dmd compiled for 64bit is 
 simply, 32bit works in pretty much all cases. The cases it 
 doesn't involve very large code bases being compiled.
I understand, but what's exactly the problem in providing a 64bit version of the executable? Not providing it has just complicated my experience with D... :-)
 I just had a look into Wine, I'm not sure if this helps[0].
 Right now you're not creating a new Wine environment or 
 configuring it.
I think that the 'wineboot' command in the Dockerfile just do it: I can run Win64 console application...
 Otherwise, can you change over to a 32bit image instead of 
 64bit alpine?
 That probably will also fix it.
Probably yes, maybe with an Ubuntu image as a base. The point is that everyone in docker is switching to Alpine distributions, as an alpine based image is far smaller that the other options, and the official Docker image of Alpine is 64bit only....
Jun 25 2016
parent rikki cattermole <rikki cattermole.co.nz> writes:
On 25/06/2016 10:25 PM, Dlangofile wrote:
 On Saturday, 25 June 2016 at 09:39:21 UTC, rikki cattermole wrote:
 On 25/06/2016 9:03 PM, Dlangofile wrote:
 On Saturday, 25 June 2016 at 03:29:02 UTC, rikki cattermole wrote:
 On 25/06/2016 5:57 AM, Dlangofile wrote:
 Hi all,

 I'm building a Docker Alpine linux image with wine, for being able to
 forge Windows executable from my laptop, without having to dual boot.

 With my disappointment, I'm not able to run 32bit executable from the
 container right now, so the easy way is running a win64 dmd.exe:
 someone
 can point me to a pre-build executable, based on the latest version?

 Thanks
Umm, x86_64 is backwards compatible with x86. So if 32bit build of dmd doesn't work, you have bigger problems.
Well, frankly speaking I don't know! PE32+ executable (console) x86-64, for MS Windows -> working well PE32 executable (console) Intel 80386, for MS Windows -> not working at all I tried also to use a WINEARCH=win32, without success: I'm attaching the Dockerfile at the end, if someone wants to help more on that. In the meantime, any x86-64 DMD executable? What's the problem in having it available by default in the Windows distribution? Thanks /D FROM alpine:3.4 RUN apk --no-cache add wine freetype ncurses file ENV WINEARCH=win64 RUN wineboot ADD dmd2 /dmd2 CMD ["sh"]
We need to see any errors produced from Wine. It is known that dmd does run under it. Which means something is wrong with your setup.
with WINEARCH=win64 err:winediag:nulldrv_CreateWindow Application tried to create a window, but no driver could be loaded. err:winediag:nulldrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly. wineconsole: Starting program "dmd.exe" failed. The command is invalid. with WINEARCH=win32 wine: '/root/.wine' is a 32-bit installation, it cannot support 64-bit applications.
 As I said about x86_64 being backwards compatible with x86 (you can
 even run old 386 programs on a modern day cpu, go figure) so that
 isn't the problem.
Maybe the Alpine Linux package for Wine has only 64-bit support...
Maybe, Linux is finicky here library wise. Usually both arch binaries are required library wise and since Alpine is minimal.. easy to assume.
 The reason why we do not provide a dmd compiled for 64bit is simply,
 32bit works in pretty much all cases. The cases it doesn't involve
 very large code bases being compiled.
I understand, but what's exactly the problem in providing a 64bit version of the executable? Not providing it has just complicated my experience with D... :-)
You're the first in over six months to bring up this issue, so not a common requirement ;)
 I just had a look into Wine, I'm not sure if this helps[0].
 Right now you're not creating a new Wine environment or configuring it.
I think that the 'wineboot' command in the Dockerfile just do it: I can run Win64 console application...
Based on what I read, wineboot handles an instance lifetime e.g. restart. So killing of processes and getting mounts in for example. The link I gave has an example of a program that configures a new instance of Wine that is 32bit (since you can't change a 64bit one to 32bit) which is not the same thing.
 Otherwise, can you change over to a 32bit image instead of 64bit alpine?
 That probably will also fix it.
Probably yes, maybe with an Ubuntu image as a base. The point is that everyone in docker is switching to Alpine distributions, as an alpine based image is far smaller that the other options, and the official Docker image of Alpine is 64bit only....
Given this information, yeah it might be worthwhile to distribute a build of dmd that is 64bit for Windows. But this won't allow you to execute the produced programs under Wine. Since you can't execute 32bit programs and since you can't really install MSVC or the required programs/libraries from Microsoft your stuck there. So really you want to get this sorted out.
Jun 25 2016