www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - 64bit phobos on Windows?

reply Richard Webb <webby beardmouse.org.uk> writes:
I know that 64bit support on Windows is behind Linux etc for various reasons,
but i thought i'd tried building some things with -m64 just to test, and got a
bunch of errors like

std\file.d(223): Error: undefined identifier GetLastError
std\file.d(2067): Error: undefined identifier WIN32_FIND_DATA

Which appears to be because various things in Phobos use version(Win32), and
only 'Win64' is set in 64bit builds.
I guess that at least some of these should be using version(Windows) instead?
Feb 18 2011
parent reply dsimcha <dsimcha yahoo.com> writes:
== Quote from Richard Webb (webby beardmouse.org.uk)'s article
 I know that 64bit support on Windows is behind Linux etc for various reasons,
 but i thought i'd tried building some things with -m64 just to test, and got a
 bunch of errors like
 std\file.d(223): Error: undefined identifier GetLastError
 std\file.d(2067): Error: undefined identifier WIN32_FIND_DATA
 Which appears to be because various things in Phobos use version(Win32), and
 only 'Win64' is set in 64bit builds.
 I guess that at least some of these should be using version(Windows) instead?
Yea, also even if a working Win64 codegen/linker is still fairly far off, it would be nice to be able to test that code passes semantic analysis in 64 under Windows.
Feb 18 2011
parent reply Richard Webb <webby beardmouse.org.uk> writes:
Is a Windows 64 bit version of GDC any closer than a version of DMD? I guess
that
fixing Phobos will be useful there as well.
Feb 19 2011
parent reply Trass3r <un known.com> writes:
Compiling GDC on Windows is a PITA.
I wish someone released prebuilt versions.
Feb 19 2011
parent reply "Nick Sabalausky" <a a.a> writes:
"Trass3r" <un known.com> wrote in message news:op.vq5xlfto3ncmek enigma...
 Compiling GDC on Windows is a PITA.
 I wish someone released prebuilt versions.
Compiling GCC on Windows is a PITA.
Feb 19 2011
next sibling parent reply Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
That's why we have TDM: http://tdm-gcc.tdragon.net/

At least for GCC.
Feb 19 2011
parent reply "Nick Sabalausky" <a a.a> writes:
"Andrej Mitrovic" <andrej.mitrovich gmail.com> wrote in message 
news:mailman.1800.1298152676.4748.digitalmars-d puremagic.com...
 That's why we have TDM: http://tdm-gcc.tdragon.net/

 At least for GCC.
Ah cool. Kind of like a "DJGPP: The Next Generation"
Feb 19 2011
parent reply Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
I'm very interested in trying out GDC with D2 on Win32. I fear
compiling GDC is gonna be tricky though. Has anyone had success with
it? Hand me a few tips before I venture into the unknown, please! (and
if I'm successful I'll upload the binaries somewhere, maybe on
sourceforge).
Feb 19 2011
next sibling parent reply "Nick Sabalausky" <a a.a> writes:
"Andrej Mitrovic" <andrej.mitrovich gmail.com> wrote in message 
news:mailman.1802.1298158001.4748.digitalmars-d puremagic.com...
 I'm very interested in trying out GDC with D2 on Win32. I fear
 compiling GDC is gonna be tricky though. Has anyone had success with
 it? Hand me a few tips before I venture into the unknown, please! (and
 if I'm successful I'll upload the binaries somewhere, maybe on
 sourceforge).
Back when GDC was under its previous leadership, I made two separate attempts to merge GDC with DevKitARM (ie, homebrew for Nintendo platforms). I achieved partial success, but everything about the experience was such a royal PITA that I'm more than a little hesitent to go anywhere near GCC again (especially compiling GCC). Eveything's probably out-of-date enough to useless by now, but FWIW I wrote a little bit about it here: http://www.semitwist.com/articles/article/view/d-on-gba-nds-progress-thanks-to-oopman
Feb 19 2011
next sibling parent "Nick Sabalausky" <a a.a> writes:
"Nick Sabalausky" <a a.a> wrote in message 
news:ijpmbc$25vv$1 digitalmars.com...
 "Andrej Mitrovic" <andrej.mitrovich gmail.com> wrote in message 
 news:mailman.1802.1298158001.4748.digitalmars-d puremagic.com...
 I'm very interested in trying out GDC with D2 on Win32. I fear
 compiling GDC is gonna be tricky though. Has anyone had success with
 it? Hand me a few tips before I venture into the unknown, please! (and
 if I'm successful I'll upload the binaries somewhere, maybe on
 sourceforge).
Back when GDC was under its previous leadership, I made two separate attempts to merge GDC with DevKitARM (ie, homebrew for Nintendo platforms). I achieved partial success, but everything about the experience was such a royal PITA that I'm more than a little hesitent to go anywhere near GCC again (especially compiling GCC). Eveything's probably out-of-date enough to useless by now, but FWIW I wrote a little bit about it here: http://www.semitwist.com/articles/article/view/d-on-gba-nds-progress-thanks-to-oopman
Of course, this was all D1, though. (Actually, it might have even been pre-D1).
Feb 19 2011
prev sibling parent reply Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
On 2/20/11, Nick Sabalausky <a a.a> wrote:
 Eveything's probably out-of-date enough to useless by now, but FWIW I wrote
 a little bit about it here:

 http://www.semitwist.com/articles/article/view/d-on-gba-nds-progress-thanks-to-oopman
Okay, I've collected a few links to get me started. Thanks for your link as well. Btw, D on a Game Boy? That is way too cool!
Feb 19 2011
parent "Nick Sabalausky" <a a.a> writes:
"Andrej Mitrovic" <andrej.mitrovich gmail.com> wrote in message 
news:mailman.1803.1298161166.4748.digitalmars-d puremagic.com...
 On 2/20/11, Nick Sabalausky <a a.a> wrote:
 Eveything's probably out-of-date enough to useless by now, but FWIW I 
 wrote
 a little bit about it here:

 http://www.semitwist.com/articles/article/view/d-on-gba-nds-progress-thanks-to-oopman
Okay, I've collected a few links to get me started. Thanks for your link as well. Btw, D on a Game Boy? That is way too cool!
Heh, well, GBA at a minimum, which is ARM7. So it's not as if it's D->Z80 or anything like that, and with the GB line's switch from Z80 to ARM7, typical GB development switched from Asm to C/C++, so D isn't too big of a stretch. And I never did get things like D's structs or classes working, or any of the D runtime, or phobos or tango for that matter. Didn't even attempt garbage collection (I would more likely have just ripped out the GC. Despite its processing power, the GBA is still fairly low on memory. And so is the DS for that matter.) But yea, my game-development days were the primary reason I got interested in D in the first place. Everything in the game world was C/C++ (and still is, unless you count web-games, MS's XNA and in-engine scripting - none of which I count), and by the early 2000's I had come to see C/C++ as an irritating anachronism (Header files? In 200X? Really?). But unlike all the other popular languages at the time (remember when VC's were allegedly "the undeniable future, period"?), D was the *only* modern language that actually had the *potential* to be used on such platforms.
Feb 19 2011
prev sibling parent reply Trass3r <un known.com> writes:
 I'm very interested in trying out GDC with D2 on Win32. I fear
 compiling GDC is gonna be tricky though. Has anyone had success with
 it? Hand me a few tips before I venture into the unknown, please! (and
 if I'm successful I'll upload the binaries somewhere, maybe on
 sourceforge).
You need msys and MinGW. https://bitbucket.org/goshawk/gdc/wiki/MinGWCompile
Feb 19 2011
parent reply Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
On 2/20/11, Trass3r <un known.com> wrote:
 I'm very interested in trying out GDC with D2 on Win32. I fear
 compiling GDC is gonna be tricky though. Has anyone had success with
 it? Hand me a few tips before I venture into the unknown, please! (and
 if I'm successful I'll upload the binaries somewhere, maybe on
 sourceforge).
You need msys and MinGW. https://bitbucket.org/goshawk/gdc/wiki/MinGWCompile
Got that, and I was just reading that page. But I'm confused about several things. The guide mentions the latest working version: D2.020 r167:6f2adfcabae6 GCC 4.3.5 Then it mentions we need a newer version of TDM-GCC: TDM GCC 4.5.0 I'm guessing this one will just be used to compile GCC+GDC. Got that installed. It mentions patch files: "For GCC 4.3.X, fixes out of memory bug." And has a link to this: "gcc-4.4.0-20080731-pex-win32.patch" Is that patch file for the 3.x series, for the memory bug? And which GCC sources, the one from TDM-GCC, 4.3.x series or not? Then it references TDM patches, but they're not links to patch files they're just plain text: "TDM-GCC patches." * [buildsys.patch] Minor build system hacks for Cygwin and mSYS * [ehstatic.patch] Allow exceptions from DLLs without shared GCC libraries * [headerpath.patch] Correctly detect backslashes as path separators in include paths * [make-rel-pref.patch] A patch to fix make_relative_prefix() semantics and a little-encountered relocation bug * [make-temp-file.patch] A patch to fix make_temp_file() semantics and a little-encountered environment bug So what's up with those? I can't find the TDM-GCC 4.3.5 sources on the TDM website, the latest in the 4.3.x series I could find is 4.3.3-tdm-1: http://sourceforge.net/projects/tdm-gcc/files/Sources/TDM%20Sources/Previous/ Then later in the guide it links to a completely different website with GCC sources: http://gcc.cybermirror.org/releases/ This is quite a mess! :D
Feb 19 2011
next sibling parent Johannes Pfau <spam example.com> writes:
Andrej Mitrovic wrote:
On 2/20/11, Trass3r <un known.com> wrote:
 I'm very interested in trying out GDC with D2 on Win32. I fear
 compiling GDC is gonna be tricky though. Has anyone had success with
 it? Hand me a few tips before I venture into the unknown, please!
 (and if I'm successful I'll upload the binaries somewhere, maybe on
 sourceforge).
You need msys and MinGW. https://bitbucket.org/goshawk/gdc/wiki/MinGWCompile
Got that, and I was just reading that page. But I'm confused about several things. The guide mentions the latest working version: D2.020 r167:6f2adfcabae6 GCC 4.3.5 Then it mentions we need a newer version of TDM-GCC: TDM GCC 4.5.0 I'm guessing this one will just be used to compile GCC+GDC. Got that installed. It mentions patch files: "For GCC 4.3.X, fixes out of memory bug." And has a link to this: "gcc-4.4.0-20080731-pex-win32.patch" Is that patch file for the 3.x series, for the memory bug? And which GCC sources, the one from TDM-GCC, 4.3.x series or not?
I guess it should apply to the TDM sources and the GCC sources. The bugzilla entry says that problem has been fixed in 2008. So if you use gcc 4.5.x sources you shouldn't need that patch anymore.
Then it references TDM patches, but they're not links to patch files
they're just plain text:
"TDM-GCC patches."
    * [buildsys.patch] Minor build system hacks for Cygwin and mSYS
    * [ehstatic.patch] Allow exceptions from DLLs without shared GCC
 libraries
    * [headerpath.patch] Correctly detect backslashes as path
separators in include paths
    * [make-rel-pref.patch] A patch to fix make_relative_prefix()
semantics and a little-encountered relocation bug
    * [make-temp-file.patch] A patch to fix make_temp_file() semantics
and a little-encountered environment bug

So what's up with those?
Those are in the TDM-GCC sources http://sourceforge.net/projects/tdm-gcc/files/Sources/TDM%20Sources/gcc-4.5= .1-tdmsrc-1.zip/download (In fact the tdm sources consist of only these patches and buildscripts). Maybe it would even make sense to apply all patches from tdm, I'm not sure if it could cause any problems.
I can't find the TDM-GCC 4.3.5 sources on the TDM website, the latest
in the 4.3.x series I could find is 4.3.3-tdm-1:
http://sourceforge.net/projects/tdm-gcc/files/Sources/TDM%20Sources/Previo=
us/
Then later in the guide it links to a completely different website
with GCC sources:
http://gcc.cybermirror.org/releases/
As the TDM sources are only patches you also need the upstream gcc sources located there. You then have to patch these sources with the tdm patches.
This is quite a mess! :D
I remember I got it working half a year ago, but since then many things changed and I'm not sure if gdc even compiles on windows now. I'd try to start with a 32 bit version first, because 64bit mingw will likely cause even more problems. --=20 Johannes Pfau
Feb 20 2011
prev sibling parent Johannes Pfau <spam example.com> writes:
Andrej Mitrovic wrote:
On 2/20/11, Trass3r <un known.com> wrote:
 I'm very interested in trying out GDC with D2 on Win32. I fear
 compiling GDC is gonna be tricky though. Has anyone had success with
 it? Hand me a few tips before I venture into the unknown, please!
 (and if I'm successful I'll upload the binaries somewhere, maybe on
 sourceforge).
You need msys and MinGW. https://bitbucket.org/goshawk/gdc/wiki/MinGWCompile
Got that, and I was just reading that page. But I'm confused about several things. The guide mentions the latest working version: D2.020 r167:6f2adfcabae6 GCC 4.3.5 Then it mentions we need a newer version of TDM-GCC: TDM GCC 4.5.0 I'm guessing this one will just be used to compile GCC+GDC. Got that installed. It mentions patch files: "For GCC 4.3.X, fixes out of memory bug." And has a link to this: "gcc-4.4.0-20080731-pex-win32.patch" Is that patch file for the 3.x series, for the memory bug? And which GCC sources, the one from TDM-GCC, 4.3.x series or not? Then it references TDM patches, but they're not links to patch files they're just plain text: "TDM-GCC patches." * [buildsys.patch] Minor build system hacks for Cygwin and mSYS * [ehstatic.patch] Allow exceptions from DLLs without shared GCC libraries * [headerpath.patch] Correctly detect backslashes as path separators in include paths * [make-rel-pref.patch] A patch to fix make_relative_prefix() semantics and a little-encountered relocation bug * [make-temp-file.patch] A patch to fix make_temp_file() semantics and a little-encountered environment bug So what's up with those? I can't find the TDM-GCC 4.3.5 sources on the TDM website, the latest in the 4.3.x series I could find is 4.3.3-tdm-1: http://sourceforge.net/projects/tdm-gcc/files/Sources/TDM%20Sources/Previo=
us/ Then the TDM-GCC patches for 4.3.3 also work for the upstream source version 4.3.5. This is quite common, if patches for older versions work fine with new upstream releases, there are often no new patches released.
Then later in the guide it links to a completely different website
with GCC sources:
http://gcc.cybermirror.org/releases/

This is quite a mess! :D
--=20 Johannes Pfau
Feb 20 2011
prev sibling parent reply Iain Buclaw <ibuclaw ubuntu.com> writes:
== Quote from Nick Sabalausky (a a.a)'s article
 "Trass3r" <un known.com> wrote in message news:op.vq5xlfto3ncmek enigma...
 Compiling GDC on Windows is a PITA.
 I wish someone released prebuilt versions.
Compiling GCC on Windows is a PITA.
Windows is a PITA, period. I tried using it as an everyday OS the other week. Something that I will never try again any time soon... Someone mentioned GDC on Win64. Someone has done it for D1, but I didn't bother merging half of the patches I was given. Mostly because they were too invasive/half complete. But that it can be done (minimally) is reassuring.
Feb 19 2011
next sibling parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
Disregard my TDM link, I didn't realize GCC has to be built from the
ground up for GDC (that's the impression I get from the looks of
things on the web).

Are there no GDC binaries for D2/Win32?
Feb 19 2011
prev sibling next sibling parent reply "Nick Sabalausky" <a a.a> writes:
"Iain Buclaw" <ibuclaw ubuntu.com> wrote in message 
news:ijpgap$1shk$1 digitalmars.com...
 == Quote from Nick Sabalausky (a a.a)'s article
 "Trass3r" <un known.com> wrote in message 
 news:op.vq5xlfto3ncmek enigma...
 Compiling GDC on Windows is a PITA.
 I wish someone released prebuilt versions.
Compiling GCC on Windows is a PITA.
Windows is a PITA, period. I tried using it as an everyday OS the other week. Something that I will never try again any time soon...
Heh :) Back in the early 90's I switched from my Apple IIc (which I still have a lot of respect for) to a brand new 486 with MS-DOS/Win 3.11, which was a big improvement. I've been using Windows ever since (Win 3.11 -> 95 -> 98 -> XP), so I guess Windows is just in my blood. The biggest troubles I have tend to be from open-source programs that consider targeting Cygwin or MSYS/MinGW to count as "supporting Windows". I spent a year or two trying to use OSX as my primary system and while I was impressed at first, the more I used it the more I grew to hate both it and Apple (As a company, they're like MS but even worse). There a lot of nice things about Linux, and it keeps improving. And my secondary system is a Linux box. But even though I hate Win7 (if I wanted my OS to be like OSX I'd still be using OSX - although it looks like "http://classicshell.sourceforge.net" might fix some of my Win7 complaints), Linux still isn't quite to the point where I'm ready to switch to it. I think one big part of it is that I've yet to find a file manager that I like as much as XP's Explorer. Dolphin's probably the best I've seen so far (beats the pants off of Nautilus), but there's still enough about it that bugs me. Not that Explorer doesn't have its problems, but "Better the devil you know".
Feb 19 2011
next sibling parent reply Trass3r <un known.com> writes:
 "http://classicshell.sourceforge.net" might fix some of my Win7  
 complaints),
Thanks for the link. The copy UI and status bar issues are indeed annoying.
Feb 19 2011
parent "Nick Sabalausky" <a a.a> writes:
"Trass3r" <un known.com> wrote in message news:op.vq6d47mm3ncmek enigma...
 "http://classicshell.sourceforge.net" might fix some of my Win7 
 complaints),
Thanks for the link. The copy UI and status bar issues are indeed annoying.
I've never actually tried Classic Shell since my sister's computer is the only Win7 machine I ever have access to. But if actually works well, then all it would need for me to seriously consider upgrading from XP to Win7 would be: 1. Fixes for the taskbar changes (ie, the first three bullet points on my super-whiny rant: http://www.semitwist.com/articles/article/view/why-i-refuse-to-upgrade-to-win7 ) 2. XP-style open/save dialog boxes (which doesn't appear likely: http://classicshell.sourceforge.net/faq.html#explorer_saveas ) 3. Maybe some de-unified back/forward buttons for Windows Explorer. (They sounded like a great idea when I first read about IE7, but after using IE7 extensively to test my sites I found I really hated it. Heck, they're one of the reasons I use FF2 instead of FF3.) 4. And maybe some way to rip out the driver-revocation "feature" and the DRMed-AV-gets-reduced-in-quality-at-the-drop-of-a-hat "feature". (I know these might not be big issues in practice, but I don't trust anything on *my* system being completely at the discresion of corporations. Come to think of it, this is pretty much the same reason I've never trusted HDMI - one little fart and the whole thing *intentially* craps out. It's like the broadcast flag, except the FCC never even had the opportunity to say "Umm, no. Fuck that.") If I did get Win7 and Classic Shell, I don't think there's a single thing on Classic Shell's Features page ( http://classicshell.sourceforge.net/features.html ) that I wouldn't use.
Feb 19 2011
prev sibling parent Bruno Medeiros <brunodomedeiros+spam com.gmail> writes:
On 19/02/2011 23:53, Nick Sabalausky wrote:
 But even though I hate Win7 (if I wanted my OS to be like OSX
 I'd still be using OSX - although it looks like
 "http://classicshell.sourceforge.net"  might fix some of my Win7 complaints),
 Linux still isn't quite to the point where I'm ready to switch to it. I
 think one big part of it is that I've yet to find a file manager that I like
 as much as XP's Explorer. Dolphin's probably the best I've seen so far
 (beats the pants off of Nautilus), but there's still enough about it that
 bugs me. Not that Explorer doesn't have its problems, but "Better the devil
 you know".
Oh man, don't get me started, I hate Windows 7 so much (I have to use it though, it's the least bad of all alternatives for me). And unlike you Nick it's less common for me to hate stuff, so this is a bit more significant :P But the issue is exactly the same. Technically Windows 7 is good (speed and stability), but the UI (same as Vista) is horrid, and I'm embarked on a very difficult quest to make it look as close as possible as my previous classic XP setup. I am already using three OS add-ons: Classic Shell, as you mentioned above; "7 Taskbar Tweaker", a small util to help ungroup similar items in the Windows taskbar; and that dll fix to allow custom themes to be installed , plus the Luna theme for Windows 7 (http://satukoro.deviantart.com/art/Luna-port-to-Windows-7-Aero-136960235) which unfortunately doesn't work entirely well. But even with all this it is still only halfway to what I had before with XP, and I haven't found a way to fix the remaining functionality aspects :SSSSS Man, I'd wish it was 10-20 years into a future where the successor of Android had become a viable and cool X86 OS... :P -- Bruno Medeiros - Software Engineer
Mar 23 2011
prev sibling next sibling parent reply =?UTF-8?B?QW5kZXJzIEYgQmrDtnJrbHVuZA==?= <afb algonet.se> writes:
Iain Buclaw wrote:
 I wish someone released prebuilt versions.
Compiling GCC on Windows is a PITA.
Windows is a PITA, period. I tried using it as an everyday OS the other week. Something that I will never try again any time soon...
Fortunately one can run MinGW on other platforms, even if compiling for Windows. By using Wine, one doesn't even have to run it on Windows... $ x86_64-w64-mingw32-gdmd -m32 hello.d $ wine hello.exe Hello, World! However, the 64-bit version of Wine doesn't work everywhere just yet and the 64-version of Phobos for Windows had lots of issues as well. So I didn't make a new prebuilt version for MinGW GCC 4.5.0 just yet... (which is identical to FSF GCC 4.5.0 afaik, no MinGW patches necessary) But the GCC 3.4.5* version is still on http://gdcwin.sourceforge.net/ Nobody volunteered to make a D2 version, and there's no GDC release yet. * http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/GCC/Version3/Current%20Release_%20gcc-3.4.5-20060117-3/
 Someone mentioned GDC on Win64. Someone has done it for D1, but I didn't bother
 merging half of the patches I was given. Mostly because they were too
 invasive/half complete. But that it can be done (minimally) is reassuring.
I made a GDC for Win64 MinGW during holidays, since I didn't want to start the new year with the same old 32-bit compilers as in 2007... http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=125675 It was able to run Hello World (Phobos), and Hello World (wxWidgets*) but I didn't bother patching it more than that. And lucky I didn't! * http://wxd.sourceforge.net/Hello.html Once those two were running 64-bit on all three platforms, I stopped. But I _could_ make a Win32 version of MinGW GCC 4.5.0* and DMD 1.064 ? * http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/GCC/Version4/gcc-4.5.0-1/ 64-bit versions for Mac OS X 10.6 and Fedora 14 are already available. To make a Win64 version, one need to change compiler from MinGW.org to http://mingw-w64.sourceforge.net/ but otherwise straight-forward: http://sourceforge.net/apps/trac/mingw-w64/wiki/Cross%20Win32%20and%20Win64%20compiler http://sourceforge.net/apps/trac/mingw-w64/wiki/Native%20Win64%20compiler --anders
Feb 20 2011
next sibling parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
If I get this thing working I'll post binaries and a batch/shell
script that does all the work automatically. I really don't understand
the point of using MSYS and then writing a 2-page guide even though
MSYS has a working shell interpreter. </rant>
Feb 20 2011
prev sibling parent reply Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
cc1d.exe crashed after an hour of building.

Right, I'll stop trying now.
Feb 20 2011
parent reply Iain Buclaw <ibuclaw ubuntu.com> writes:
== Quote from Andrej Mitrovic (andrej.mitrovich gmail.com)'s article
 cc1d.exe crashed after an hour of building.
 Right, I'll stop trying now.
Mutters something about needing to compile gmp, mpfr (and probably mpc for 4.5) before attempting to build gdc on Windows.
Feb 20 2011
next sibling parent reply Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
No I did that. And I've patched GCC 3.4.5.

This step causes the crash at the end: make STAGE1_CFLAGS="-g3 -O0"
2>&1 | tee build.log

Log:
checking If /gdc/dev/build/gcc/./gcc/gdc -B/gdc/dev/build/gcc/./gcc/
-L/gdc/dev/build/gcc/i686-pc-mingw32/winsup/mingw
-L/gdc/dev/build/gcc/i686-pc-mingw32/winsup/w32api/lib -isystem
/gdc/dev/gcc-4.3.5/winsup/mingw/include -isystem
/gdc/dev/gcc-4.3.5/winsup/w32api/include -B/mingw/i686-pc-mingw32/bin/
-B/mingw/i686-pc-mingw32/lib/ -isystem /mingw/i686-pc-mingw32/include
-isystem /mingw/i686-pc-mingw32/sys-include can compile D sources...
no
configure: error: can't compile D sources!
make[1]: *** [configure-target-libphobos] Error 1
make[1]: Leaving directory `/gdc/dev/build/gcc'
make: *** [all] Error 2

Maybe I'm just missing another step.

Do I have to apply the TDM-GCC patches over the GCC source downloaded
from http://gcc.cybermirror.org/releases/ ? The thing is, I can't find
the 3.4.5 release of TDM-GCC, which should have the patches:
http://sourceforge.net/projects/tdm-gcc/files/Sources/TDM%20Sources/Previous/
Feb 20 2011
parent =?UTF-8?B?IkrDqXLDtG1lIE0uIEJlcmdlciI=?= <jeberger free.fr> writes:
Andrej Mitrovic wrote:
 No I did that. And I've patched GCC 3.4.5.
=20
 This step causes the crash at the end: make STAGE1_CFLAGS=3D"-g3 -O0"
 2>&1 | tee build.log
=20
 Log:
 checking If /gdc/dev/build/gcc/./gcc/gdc -B/gdc/dev/build/gcc/./gcc/
 -L/gdc/dev/build/gcc/i686-pc-mingw32/winsup/mingw
 -L/gdc/dev/build/gcc/i686-pc-mingw32/winsup/w32api/lib -isystem
 /gdc/dev/gcc-4.3.5/winsup/mingw/include -isystem
 /gdc/dev/gcc-4.3.5/winsup/w32api/include -B/mingw/i686-pc-mingw32/bin/
 -B/mingw/i686-pc-mingw32/lib/ -isystem /mingw/i686-pc-mingw32/include
 -isystem /mingw/i686-pc-mingw32/sys-include can compile D sources...
 no
 configure: error: can't compile D sources!
 make[1]: *** [configure-target-libphobos] Error 1
 make[1]: Leaving directory `/gdc/dev/build/gcc'
 make: *** [all] Error 2
=20
 Maybe I'm just missing another step.
=20
There should be a file named =E2=80=9Cconfig.log=E2=80=9D in =E2=80=9C/g= dc/dev/build/gcc=E2=80=9D with more information on the error. Jerome --=20 mailto:jeberger free.fr http://jeberger.free.fr Jabber: jeberger jabber.fr
Feb 20 2011
prev sibling parent reply Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
Now I've tried GCC v3.4.5, applied gcc-4.4.0-20080731-pex-win32.patch,
applied the TDM GCC 3.4.5 patches, and I get the same thing:

---------------------------
cc1d.exe - Application Error
---------------------------
The application failed to initialize properly (0xc0000005). Click on
OK to terminate the application.
---------------------------
OK
---------------------------
Feb 20 2011
parent reply Iain Buclaw <ibuclaw ubuntu.com> writes:
== Quote from Andrej Mitrovic (andrej.mitrovich gmail.com)'s article
 Now I've tried GCC v3.4.5, applied gcc-4.4.0-20080731-pex-win32.patch,
 applied the TDM GCC 3.4.5 patches, and I get the same thing:
 ---------------------------
 cc1d.exe - Application Error
 ---------------------------
 The application failed to initialize properly (0xc0000005). Click on
 OK to terminate the application.
 ---------------------------
 OK
 ---------------------------
I (think) these are the (roughly followed) instructions that got me passed that very same memory error. https://bitbucket.org/goshawk/gdc/wiki/MinGWCompile Never managed to build phobos though. Deduced that something was not quite right with the build environment, but too useless at being a developer on Windows to figure out just why..
Feb 20 2011
next sibling parent reply Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
I'm sorry for hijacking this topic guys. :p

I am getting somewhere though. GDC changeset 475, using GCC 4.5.0 with
applied TDM-GCC 4.5.0 patches, with built gmp, mpc and mpftr. The
Windows build documentation needs an update (I'll fix it myself given
the chance).

I've gotten build errors after:
make STAGE1_CFLAGS="-g3 -O0" 2>&1 | tee build.log

this time its Phobos:
../../../../gcc-4.5.0/libphobos/rt/fpmath.d
../../../../gcc-4.5.0/libphobos/rt/fpmath.d: In function 'signbit':
../../../../gcc-4.5.0/libphobos/rt/fpmath.d:1:0: internal compiler
error: in build_ref_for_offset_1, at tree-sra.c:1405
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bitbucket.org/goshawk/gdc/issues> for instructions.
make[3]: *** [rt/fpmath.o] Error 1
make[3]: Leaving directory `/gdc/dev/build/gcc/i686-pc-mingw32/libphobos'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/gdc/dev/build/gcc/i686-pc-mingw32/libphobos'
make[1]: *** [all-target-libphobos] Error 2
make[1]: Leaving directory `/gdc/dev/build/gcc'
make: *** [all] Error 2

I guess I should file a bug report with the full log.
Feb 20 2011
parent bearophile <bearophileHUGS lycos.com> writes:
Andrej Mitrovic:

 I'm sorry for hijacking this topic guys. :p
 
 I am getting somewhere though. GDC changeset 475, using GCC 4.5.0 with
 applied TDM-GCC 4.5.0 patches, with built gmp, mpc and mpftr. The
 Windows build documentation needs an update (I'll fix it myself given
 the chance).
If you are interested, this is the GCC I use (I use the binary versions, but below there are sources too): http://nuwen.net/mingw.html Bye, bearophile
Feb 20 2011
prev sibling parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
K, I've reported the bug.
Feb 20 2011
prev sibling parent reply Bruno Medeiros <brunodomedeiros+spam com.gmail> writes:
On 19/02/2011 22:30, Iain Buclaw wrote:
 == Quote from Nick Sabalausky (a a.a)'s article
 "Trass3r"<un known.com>  wrote in message news:op.vq5xlfto3ncmek enigma...
 Compiling GDC on Windows is a PITA.
 I wish someone released prebuilt versions.
Compiling GCC on Windows is a PITA.
Windows is a PITA, period.
Well, yes, maybe. But I doubt that Compiling GCC on Windows being a PITA is actually realted to Windows being a PITA, generally. Correct me if I am wrong. -- Bruno Medeiros - Software Engineer
Feb 25 2011
parent reply =?UTF-8?B?IkrDqXLDtG1lIE0uIEJlcmdlciI=?= <jeberger free.fr> writes:
Bruno Medeiros wrote:
 On 19/02/2011 22:30, Iain Buclaw wrote:
 =3D=3D Quote from Nick Sabalausky (a a.a)'s article
 "Trass3r"<un known.com>  wrote in message
 news:op.vq5xlfto3ncmek enigma...
 Compiling GDC on Windows is a PITA.
 I wish someone released prebuilt versions.
Compiling GCC on Windows is a PITA.
Windows is a PITA, period.
=20 Well, yes, maybe. But I doubt that Compiling GCC on Windows being a PIT=
A
 is actually realted to Windows being a PITA, generally. Correct me if I=
 am wrong.
=20
You're right, it is related to the autotools being a PITA... Jerome --=20 mailto:jeberger free.fr http://jeberger.free.fr Jabber: jeberger jabber.fr
Feb 25 2011
parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
Cross-post from another thread:
Well I have some good news, I've finally managed to get GDC working
for D2 on Windows (using Msys). I owe it to Ian Buclaw and Daniel
Green for all the help. You can download an updated guide here:
http://dl.dropbox.com/u/9218759/gdcbuild_mingw.txt

Sorry again for having hijacked this thread. :)
Mar 05 2011