Issue 646 - GDC does not set version(Windows) by default.
Summary: GDC does not set version(Windows) by default.
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P1 blocker
Assignee: David Friedman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-04 03:06 UTC by FeepingCreature
Modified: 2015-06-09 01:31 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description FeepingCreature 2006-12-04 03:06:44 UTC
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 Anders F Bj 2006-12-04 04:15:46 UTC
> 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 David Friedman 2006-12-30 21:22:48 UTC
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 FeepingCreature 2006-12-31 05:29:42 UTC
(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 FeepingCreature 2006-12-31 06:44:15 UTC
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