Bug 646 – GDC does not set version(Windows) by default.
Status
RESOLVED
Resolution
WORKSFORME
Severity
blocker
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2006-12-04T03:06:00Z
Last change time
2015-06-09T01:31:14Z
Assigned to
dvdfrdmn
Creator
default_357-line
Comments
Comment #0 by default_357-line — 2006-12-04T03:06:44Z
GDC does not set version(Windows) by default (Win32 however it does). It also (as of the current version as well as svn) does not allow you to set -fversion(Windows), claiming Windows is reserved and cannot be set.
This forces users to change the standard headers (to use version(Win32), which is curiously set) in order to use phobos at all.
See also http://lists.puremagic.com/pipermail/d.gnu/2006-November/000492.html
Comment #1 by afb — 2006-12-04T04:15:46Z
> GDC does not set version(Windows) by default (Win32 however it does). It also
> (as of the current version as well as svn) does not allow you to set
> -fversion(Windows), claiming Windows is reserved and cannot be set.
> This forces users to change the standard headers (to use version(Win32), which
> is curiously set) in order to use phobos at all.
"DMD does not set version(Unix) by default (linux however it does). This
forces GDC to change the standard headers (to use version(Unix) and
change std.c.linux.linux to std.c.unix.unix), in order to use phobos at
all."
I think this issue runs deeper than just GDC using Win32 for MinGW OS ?
--anders
Comment #2 by dvdfrdmn — 2006-12-30T21:22:48Z
For the MinGW32 target, the GDC compiler itself enables version(Win32). version(Windows) comes from a separate file, phobos-ver-syms, which is created as part of Phobos library. That file get installed in the target-specific header directory.
versions(Windows) should be enabled. Can you see if you have the same problem with the pre-compiled binaries? If those work, something may have gone wrong with your build/install. See http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=D.gnu&artnum=2252
Comment #3 by default_357-line — 2006-12-31T05:29:42Z
(In reply to comment #2)
> For the MinGW32 target, the GDC compiler itself enables version(Win32).
> version(Windows) comes from a separate file, phobos-ver-syms, which is created
> as part of Phobos library. That file get installed in the target-specific
> header directory.
>
It's there, and contains the Windows line, but apparently gets ignored.
> versions(Windows) should be enabled. Can you see if you have the same problem
> with the pre-compiled binaries?
No, those seem to work.
> If those work, something may have gone wrong
> with your build/install.
Almost certainly. ^^
> See
> http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=D.gnu&artnum=2252
>
That didn't help, unfortunately.
Okay, as I see it there are three potential ways to configure the GDC prefix.
Existing win32 path, existing unix-style path, and nonexisting unix-style path.
Nonexisting unix-style path is right out, since MinGW needs some headers in its prefix directory. Existing win32 path leads to some really really odd configure errors nobody else seems to be getting. (I have to retry that)
Existing unix-style path, however, leads to the known version(Windows) issue.
I'm kinda out of ideas here. If there is no other way to get version(Windows) to work (there has to be! :hope: ) I'll try to find the GDC code responsible for version statements and do an ugly patch/kludge thing. It's not as if this build is meant for redistribution. ^^
Thanks for your answer. Greetings
Comment #4 by default_357-line — 2006-12-31T06:44:15Z
Okay, please disregard the previous post (figured it out).
It seems a combination of a win32-syntax target dir (C:/MinGW/gdc) and "make bootstrap" finally did the trick - previously I had only tried a plain "make".
Thanks for the link that got me on the right track.
Greetings