www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Undefined identifier WIN32_FILE_ATTRIBUTE_DATA

reply "creatio" <creatio.x.14 gmail.com> writes:
I'm not sure if this is the correct forum. But It looks like I'm 
one of the few people that ran into this. I've recently upgraded 
to 2.60 and been getting this error when compiling:

Error: undefined identifier 
WIN32_FILE_ATTRIBUTE_DATA	D:\__dev\D\dmd2\src\phobos\std\file.d	530	

Now I have found the thread of Walter at 
http://www.digitalmars.com/d/archives/digitalmars/D/announce/D_version_of_M
croEmacs_24416.html 
, but it didn't help me much to solving my problem. Does anyone 
have an idea how I can fix this :-S

Thank you
Nov 11 2012
parent reply "Regan Heath" <regan netmail.co.nz> writes:
On Sun, 11 Nov 2012 08:03:40 -0000, creatio <creatio.x.14 gmail.com> wrote:

 I'm not sure if this is the correct forum. But It looks like I'm one of  
 the few people that ran into this. I've recently upgraded to 2.60 and  
 been getting this error when compiling:

 Error: undefined identifier  
 WIN32_FILE_ATTRIBUTE_DATA	D:\__dev\D\dmd2\src\phobos\std\file.d	530	

 Now I have found the thread of Walter at  
 http://www.digitalmars.com/d/archives/digitalmars/D/announce/D_version_of_M
croEmacs_24416.html  
 , but it didn't help me much to solving my problem. Does anyone have an  
 idea how I can fix this :-S
Try to reduce your code down to a sample which fails and post it here. R -- Using Opera's revolutionary email client: http://www.opera.com/mail/
Nov 11 2012
parent reply =?ISO-8859-15?Q?Martin_Dra=A8ar?= <drasar ics.muni.cz> writes:
Dne 11.11.2012 21:41, Regan Heath napsal(a):
 On Sun, 11 Nov 2012 08:03:40 -0000, creatio <creatio.x.14 gmail.com> wrote:

 I'm not sure if this is the correct forum. But It looks like I'm one
 of the few people that ran into this. I've recently upgraded to 2.60
 and been getting this error when compiling:

 Error: undefined identifier WIN32_FILE_ATTRIBUTE_DATA
 D:\__dev\D\dmd2\src\phobos\std\file.d    530

 Now I have found the thread of Walter at
 http://www.digitalmars.com/d/archives/digitalmars/D/announce/D_version_of_MicroEmacs_24416.html
 , but it didn't help me much to solving my problem. Does anyone have
 an idea how I can fix this :-S
Try to reduce your code down to a sample which fails and post it here. R
Hi Regan, rdmd --eval="import std.file;" --main Environment: DMD32 D Compiler v2.060, Windows 7 Pro 32bit Martin
Nov 12 2012
parent reply "Regan Heath" <regan netmail.co.nz> writes:
On Mon, 12 Nov 2012 21:22:16 -0000, Martin Dra=A8ar <drasar ics.muni.cz>=
  =

wrote:

 Dne 11.11.2012 21:41, Regan Heath napsal(a):
 On Sun, 11 Nov 2012 08:03:40 -0000, creatio <creatio.x.14 gmail.com> =
=
 wrote:

 I'm not sure if this is the correct forum. But It looks like I'm one=
 of the few people that ran into this. I've recently upgraded to 2.60=
 and been getting this error when compiling:

 Error: undefined identifier WIN32_FILE_ATTRIBUTE_DATA
 D:\__dev\D\dmd2\src\phobos\std\file.d    530

 Now I have found the thread of Walter at
 http://www.digitalmars.com/d/archives/digitalmars/D/announce/D_versi=
on_of_MicroEmacs_24416.html
 , but it didn't help me much to solving my problem. Does anyone have=
 an idea how I can fix this :-S
Try to reduce your code down to a sample which fails and post it here=
.
 R
Hi Regan, rdmd --eval=3D"import std.file;" --main Environment: DMD32 D Compiler v2.060, Windows 7 Pro 32bit
I get no errors, in fact I get no output at all from that command line. Environment: DMD32 D Compiler v2.060, Windows 7 Pro 64bit R -- = Using Opera's revolutionary email client: http://www.opera.com/mail/
Nov 13 2012
parent reply Martin Drasar <drasar ics.muni.cz> writes:
On 13.11.2012 12:41, Regan Heath wrote:
 Hi Regan,

 rdmd --eval="import std.file;" --main

 Environment: DMD32 D Compiler v2.060, Windows 7 Pro 32bit
I get no errors, in fact I get no output at all from that command line. Environment: DMD32 D Compiler v2.060, Windows 7 Pro 64bit R
Hmm, that is might strange. I have just downloaded D installer from the website, installed it on Windows 7 Pro 64bit and ran the command and this is what I got:
 std.cpuid has been deprecated. It will be removed in January 2013. Please use
co
 re.cpuid instead.
 C:\Program Files\D\dmd2\windows\bin\..\..\src\phobos\std\file.d(530): Error:
und
 efined identifier WIN32_FILE_ATTRIBUTE_DATA
Which is exactly the same error I have on 32bit machine. Martin
Nov 13 2012
parent reply "Regan Heath" <regan netmail.co.nz> writes:
On Tue, 13 Nov 2012 12:21:06 -0000, Martin Drasar <drasar ics.muni.cz>  
wrote:

 On 13.11.2012 12:41, Regan Heath wrote:
 Hi Regan,

 rdmd --eval="import std.file;" --main

 Environment: DMD32 D Compiler v2.060, Windows 7 Pro 32bit
I get no errors, in fact I get no output at all from that command line. Environment: DMD32 D Compiler v2.060, Windows 7 Pro 64bit R
Hmm, that is might strange. I have just downloaded D installer from the website, installed it on Windows 7 Pro 64bit and ran the command and this is what I got:
 std.cpuid has been deprecated. It will be removed in January 2013.  
 Please use co
 re.cpuid instead.
 C:\Program Files\D\dmd2\windows\bin\..\..\src\phobos\std\file.d(530):  
 Error: und
 efined identifier WIN32_FILE_ATTRIBUTE_DATA
Which is exactly the same error I have on 32bit machine.
Curiouser and curiouser. In my case I had (re)built phobos/druntime so, suspecting it might be causing issues I download a fresh copy of the installer, moved my old installation folder and replaced it with the new one. I still don't get any output/errors. If I add --force to the command line given, I get the std.cpuid deprecation warning, but no other output. I stripped my PATH right back to just about nothing and that made no difference. Can you get the same errors running dmd directly? I can't seem to get it to output the deprecation message.. R -- Using Opera's revolutionary email client: http://www.opera.com/mail/
Nov 13 2012
parent reply Martin Drasar <drasar ics.muni.cz> writes:
On 13.11.2012 15:00, Regan Heath wrote:

 Curiouser and curiouser.  In my case I had (re)built phobos/druntime so,
 suspecting it might be causing issues I download a fresh copy of the
 installer, moved my old installation folder and replaced it with the new
 one.
 
 I still don't get any output/errors.
 
 If I add --force to the command line given, I get the std.cpuid
 deprecation warning, but no other output.
 
 I stripped my PATH right back to just about nothing and that made no
 difference.
 
 Can you get the same errors running dmd directly?  I can't seem to get
 it to output the deprecation message..
 
 R
 
Odd... When running the dmd directly I only get the WIN32_FILE_ATTRIBUTE_DATA error, not the deprecation message. I have posted the rdmd command, because it was a bit shorter and easier to test than the dmd. This is my sc.ini if it helps anything: [Version] version=7.51 Build 020 [Environment] LIB="% P%\..\lib";\dm\lib DFLAGS="-I% P%\..\..\src\phobos" "-I% P%\..\..\src\druntime\import" LINKCMD=% P%\link.exe Martin
Nov 13 2012
parent reply "Regan Heath" <regan netmail.co.nz> writes:
On Tue, 13 Nov 2012 15:37:54 -0000, Martin Drasar <drasar ics.muni.cz>  
wrote:

 On 13.11.2012 15:00, Regan Heath wrote:

 Curiouser and curiouser.  In my case I had (re)built phobos/druntime so,
 suspecting it might be causing issues I download a fresh copy of the
 installer, moved my old installation folder and replaced it with the new
 one.

 I still don't get any output/errors.

 If I add --force to the command line given, I get the std.cpuid
 deprecation warning, but no other output.

 I stripped my PATH right back to just about nothing and that made no
 difference.

 Can you get the same errors running dmd directly?  I can't seem to get
 it to output the deprecation message..

 R
Odd... When running the dmd directly I only get the WIN32_FILE_ATTRIBUTE_DATA error, not the deprecation message. I have posted the rdmd command, because it was a bit shorter and easier to test than the dmd. This is my sc.ini if it helps anything: [Version] version=7.51 Build 020 [Environment] LIB="% P%\..\lib";\dm\lib DFLAGS="-I% P%\..\..\src\phobos" "-I% P%\..\..\src\druntime\import" LINKCMD=% P%\link.exe
Mine is the same (default, no modifications). I have added the dmd.exe path to PATH and I rely on the relative path references in the default sc.ini to find everything else. Looking at the rdmd source I realised it was creating files in %TEMP%\.rdmd and in there I found the source it was compiling: module temporary; import std.stdio, std.algorithm, std.array, std.ascii, std.base64, std.bigint, std.bitmanip, std.compiler, std.complex, std.concurrency, std.container, std.conv, std.cpuid, std.cstream, std.csv, std.datetime, std.demangle, std.encoding, std.exception, std.file, std.format, std.functional, std.getopt, std.json, std.math, std.mathspecial, std.md5, std.metastrings, std.mmfile, std.numeric, std.outbuffer, std.parallelism, std.path, std.process, std.random, std.range, std.regex, std.signals, std.socket, std.socketstream, std.stdint, std.stdio, std.stdiobase, std.stream, std.string, std.syserror, std.system, std.traits, std.typecons, std.typetuple, std.uni, std.uri, std.utf, std.variant, std.xml, std.zip, std.zlib; void main(char[][] args) { import std.file;; } I suspect the reason you only see the deprecation message with rdmd is the import of "std.cpuid" in the above. So, I believe that is one mystery solved but the main problem still isn't a problem on my machine for some reason. Does your dmd2\src\druntime\import\core\sys\windows\windows.d file have a definition of WIN32_FILE_ATTRIBUTE_DATA on line 448? R -- Using Opera's revolutionary email client: http://www.opera.com/mail/
Nov 13 2012
parent reply =?ISO-8859-15?Q?Martin_Dra=A8ar?= <drasar ics.muni.cz> writes:
Dne 13.11.2012 17:44, Regan Heath napsal(a):
 I suspect the reason you only see the deprecation message with rdmd is
 the import of "std.cpuid" in the above.  So, I believe that is one
 mystery solved but the main problem still isn't a problem on my machine
 for some reason.
Good... one down, one left.
 Does your dmd2\src\druntime\import\core\sys\windows\windows.d file have
 a definition of WIN32_FILE_ATTRIBUTE_DATA on line 448?
Yup, it is there. struct WIN32_FILE_ATTRIBUTE_DATA { DWORD dwFileAttributes; FILETIME ftCreationTime; FILETIME ftLastAccessTime; FILETIME ftLastWriteTime; DWORD nFileSizeHigh; DWORD nFileSizeLow; } alias WIN32_FILE_ATTRIBUTE_DATA* LPWIN32_FILE_ATTRIBUTE_DATA; The most annoying thing is that when you look at the std.file source, you see that 'public import core.sys.windows.windows' and if you click on 'Go to definition' in Visual studio it takes you right to windows.d file with that WIN32_FILE_ATTRIBUTE_DATA struct defined... Martin
Nov 13 2012
parent reply "Regan Heath" <regan netmail.co.nz> writes:
On Tue, 13 Nov 2012 22:52:42 -0000, Martin Dra=A8ar <drasar ics.muni.cz>=
  =

wrote:

 Dne 13.11.2012 17:44, Regan Heath napsal(a):
 Does your dmd2\src\druntime\import\core\sys\windows\windows.d file ha=
ve
 a definition of WIN32_FILE_ATTRIBUTE_DATA on line 448?
Yup, it is there. struct WIN32_FILE_ATTRIBUTE_DATA { DWORD dwFileAttributes; FILETIME ftCreationTime; FILETIME ftLastAccessTime; FILETIME ftLastWriteTime; DWORD nFileSizeHigh; DWORD nFileSizeLow; } alias * LPWIN32_FILE_ATTRIBUTE_DATA; The most annoying thing is that when you look at the std.file source, =
=
 you see that 'public import core.sys.windows.windows' and if you click=
=
 on 'Go to definition' in Visual studio it takes you right to windows.d=
=
 file with that WIN32_FILE_ATTRIBUTE_DATA struct defined...
Well.. druntime is built into a lib, and phobos is built using that lib.= = So, the only way I can imagine reproducing this error is by altering = dmd2\src\druntime\import\core\sys\windows\windows.d, rebuilding druntime= , = then rebuilding phobos and replacing the phobos.lib in dmd2\windows\lib.= BUT, doing so fails at the rebuild of phobos, giving the error: std\file.d(530): Error: undefined identifier WIN32_FILE_ATTRIBUTE_DATA, = = did you mean struct xxWIN32_FILE_ATTRIBUTE_DATA? So.. it's almost like in your case the rdmd/dmd command line is not usin= g = the pre-built phobos.lib, but trying to recompile std.file itself. I assume you have a dmd2\windows\lib\phobos.lib? What are the dates on = = various files.. is it possible you are time shifted in such a way which = is = confusing the compiler into ignoring phobos.lib and rebuilding from sour= ce? What happens if you run dumpobj (dmc\dm\bin) on phobos.lib, .e.g dumpobj -p phobos.lib > output.txt then open output.txt and look for WIN32_FILE_ATTRIBUTE_DATA. Bear in mi= nd = the output wraps the symbol names as needed so simply searching for = "WIN32_FILE_ATTRIBUTE_DATA" wont find anything. Searching for "WIN" and filtering manually I found: 81499 PUB386 1 4 3e 5f 44 34 63 6f 72 65 33 73 79 73 37 77 = ..>_D4core3sys7w 69 6e 64 6f 77 73 37 77 69 6e 64 6f 77 73 32 35 = indows7windows25 57 49 4e 33 32 5f 46 49 4c 45 5f 41 54 54 52 49 = WIN32_FILE_ATTRI 42 55 54 45 5f 44 41 54 41 36 5f 5f 69 6e 69 74 = BUTE_DATA6__init 5a 0 0 0 0 0 Z..... 87599 LNAMES 4a 5f 44 36 32 54 79 70 65 49 6e 66 6f 5f 53 34 = J_D62TypeInfo_S4 63 6f 72 65 33 73 79 73 37 77 69 6e 64 6f 77 73 = core3sys7windows 37 77 69 6e 64 6f 77 73 32 35 57 49 4e 33 32 5f = 7windows25WIN32_ 46 49 4c 45 5f 41 54 54 52 49 42 55 54 45 5f 44 = FILE_ATTRIBUTE_D 41 54 41 36 5f 5f 69 6e 69 74 5a ATA6__in= itZ 8776f CMD386 0 10 0 0 0 0 0 0 1 2 a 0 0 0 0 0 = ................ 0 0 0 32 0 0 0 3c 0 0 0 24 0 0 0 0 = ...2...<...$.... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 = ................ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 = ................ 0 0 0 0 0 0 0 63 6f 72 65 2e 73 79 73 2e = .......core.sys. 77 69 6e 64 6f 77 73 2e 77 69 6e 64 6f 77 73 2e = windows.windows. 57 49 4e 33 32 5f 46 49 4c 45 5f 41 54 54 52 49 = WIN32_FILE_ATTRI 42 55 54 45 5f 44 41 54 41 0 BUTE_DAT= A. 1bba05 LNAMES 5b 5f 44 33 73 74 64 34 66 69 6c 65 32 30 67 65 = [_D3std4file20ge 74 46 69 6c 65 41 74 74 72 69 62 75 74 65 73 57 = tFileAttributesW 69 6e 46 78 41 61 5a 53 34 63 6f 72 65 33 73 79 = inFxAaZS4core3sy 73 37 77 69 6e 64 6f 77 73 37 77 69 6e 64 6f 77 = s7windows7window 73 32 35 57 49 4e 33 32 5f 46 49 4c 45 5f 41 54 = s25WIN32_FILE_AT 54 52 49 42 55 54 45 5f 44 41 54 41 TRIBUTE_= DATA 1bba6b LNAMES 7a 5f 44 33 73 74 64 34 66 69 6c 65 32 30 67 65 = z_D3std4file20ge 74 46 80 83 89 41 74 74 72 69 62 75 74 65 73 57 = tF...AttributesW 69 6e 46 78 41 61 5a 53 34 63 6f 72 65 33 73 79 = inFxAaZS4core3sy 73 37 77 69 6e 64 6f 77 ff 73 32 35 57 49 4e 33 = s7window.s25WIN3 32 5f 46 49 4c 45 5f 41 54 54 52 49 42 55 54 45 = 2_FILE_ATTRIBUTE 5f 44 41 54 41 31 35 5f 5f 64 67 6c 69 74 65 72 = _DATA15__dgliter 61 6c 32 32 36 38 4d 46 5a 43 36 6f 62 6a 65 63 = al2268MFZC6objec 74 39 54 68 72 6f 77 61 62 6c 65 t9Throwa= ble 1bc1f1 EXTDEF 5b 5f 44 33 73 74 64 34 66 69 6c 65 32 30 67 65 = [_D3std4file20ge 74 46 69 6c 65 41 74 74 72 69 62 75 74 65 73 57 = tFileAttributesW 69 6e 46 78 41 61 5a 53 34 63 6f 72 65 33 73 79 = inFxAaZS4core3sy 73 37 77 69 6e 64 6f 77 73 37 77 69 6e 64 6f 77 = s7windows7window 73 32 35 57 49 4e 33 32 5f 46 49 4c 45 5f 41 54 = s25WIN32_FILE_AT 54 52 49 42 55 54 45 5f 44 41 54 41 0 = TRIBUTE_DATA. 1bc58c EXTDEF 5b 5f 44 33 73 74 64 34 66 69 6c 65 32 30 67 65 = [_D3std4file20ge 74 46 69 6c 65 41 74 74 72 69 62 75 74 65 73 57 = tFileAttributesW 69 6e 46 78 41 61 5a 53 34 63 6f 72 65 33 73 79 = inFxAaZS4core3sy 73 37 77 69 6e 64 6f 77 73 37 77 69 6e 64 6f 77 = s7windows7window 73 32 35 57 49 4e 33 32 5f 46 49 4c 45 5f 41 54 = s25WIN32_FILE_AT 54 52 49 42 55 54 45 5f 44 41 54 41 0 = TRIBUTE_DATA. 1bf00e EXTDEF 17 5f 44 31 31 54 79 70 65 49 6e 66 6f 5f 41 61 = ._D11TypeInfo_Aa 36 5f 5f 69 6e 69 74 5a 0 5b 5f 44 33 73 74 64 = 6__initZ.[_D3std 34 66 69 6c 65 32 30 67 65 74 46 69 6c 65 41 74 = 4file20getFileAt 74 72 69 62 75 74 65 73 57 69 6e 46 78 41 61 5a = tributesWinFxAaZ 53 34 63 6f 72 65 33 73 79 73 37 77 69 6e 64 6f = S4core3sys7windo 77 73 37 77 69 6e 64 6f 77 73 32 35 57 49 4e 33 = ws7windows25WIN3 32 5f 46 49 4c 45 5f 41 54 54 52 49 42 55 54 45 = 2_FILE_ATTRIBUTE 5f 44 41 54 41 0 _DATA. R -- = Using Opera's revolutionary email client: http://www.opera.com/mail/
Nov 14 2012
parent reply Martin Drasar <drasar ics.muni.cz> writes:
On 14.11.2012 15:28, Regan Heath wrote:
 Well.. druntime is built into a lib, and phobos is built using that
 lib.  So, the only way I can imagine reproducing this error is by
 altering dmd2\src\druntime\import\core\sys\windows\windows.d, rebuilding
 druntime, then rebuilding phobos and replacing the phobos.lib in
 dmd2\windows\lib.
 
 BUT, doing so fails at the rebuild of phobos, giving the error:
 std\file.d(530): Error: undefined identifier WIN32_FILE_ATTRIBUTE_DATA,
 did you mean struct xxWIN32_FILE_ATTRIBUTE_DATA?
 
 So.. it's almost like in your case the rdmd/dmd command line is not
 using the pre-built phobos.lib, but trying to recompile std.file itself.
 
 I assume you have a dmd2\windows\lib\phobos.lib?  What are the dates on
 various files.. is it possible you are time shifted in such a way which
 is confusing the compiler into ignoring phobos.lib and rebuilding from
 source?
Yes, I have it. Times are normal. All files are from yesterday when I installed the dmd.
 What happens if you run dumpobj (dmc\dm\bin) on phobos.lib, .e.g
   dumpobj -p phobos.lib > output.txt
 
 then open output.txt and look for WIN32_FILE_ATTRIBUTE_DATA.  Bear in
 mind the output wraps the symbol names as needed so simply searching for
 "WIN32_FILE_ATTRIBUTE_DATA" wont find anything.
 81499  PUB386  1  4 3e 5f 44 34 63 6f 72 65 33 73 79 73 37 77  
..>_D4core3sys7w
              69 6e 64 6f 77 73 37 77 69 6e 64 6f 77 73 32 35   indows7windows25
              57 49 4e 33 32 5f 46 49 4c 45 5f 41 54 54 52 49   WIN32_FILE_ATTRI
              42 55 54 45 5f 44 41 54 41 36 5f 5f 69 6e 69 74   BUTE_DATA6__init
              5a  0  0  0  0  0                                 Z.....
 
 87599  LNAMES 4a 5f 44 36 32 54 79 70 65 49 6e 66 6f 5f 53 34  
J_D62TypeInfo_S4
              63 6f 72 65 33 73 79 73 37 77 69 6e 64 6f 77 73   core3sys7windows
              37 77 69 6e 64 6f 77 73 32 35 57 49 4e 33 32 5f   7windows25WIN32_
              46 49 4c 45 5f 41 54 54 52 49 42 55 54 45 5f 44   FILE_ATTRIBUTE_D
              41 54 41 36 5f 5f 69 6e 69 74 5a                  ATA6__initZ
 
 8776f  CMD386  0 10  0  0  0  0  0  0  1  2  a  0  0  0  0  0  
................
               0  0  0 32  0  0  0 3c  0  0  0 24  0  0  0  0   ...2...<...$....
               0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0   ................
               0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  4   ................
               0  0  0  0  0  0  0 63 6f 72 65 2e 73 79 73 2e   .......core.sys.
              77 69 6e 64 6f 77 73 2e 77 69 6e 64 6f 77 73 2e   windows.windows.
              57 49 4e 33 32 5f 46 49 4c 45 5f 41 54 54 52 49   WIN32_FILE_ATTRI
              42 55 54 45 5f 44 41 54 41  0                     BUTE_DATA. 
^ These three I have the same.
 1bba05  LNAMES 5b 5f 44 33 73 74 64 34 66 69 6c 65 32 30 67 65  
[_D3std4file20ge
              74 46 69 6c 65 41 74 74 72 69 62 75 74 65 73 57   tFileAttributesW
              69 6e 46 78 41 61 5a 53 34 63 6f 72 65 33 73 79   inFxAaZS4core3sy
              73 37 77 69 6e 64 6f 77 73 37 77 69 6e 64 6f 77   s7windows7window
              73 32 35 57 49 4e 33 32 5f 46 49 4c 45 5f 41 54   s25WIN32_FILE_AT
              54 52 49 42 55 54 45 5f 44 41 54 41               TRIBUTE_DATA
 
 1bba6b  LNAMES 7a 5f 44 33 73 74 64 34 66 69 6c 65 32 30 67 65  
z_D3std4file20ge
              74 46 80 83 89 41 74 74 72 69 62 75 74 65 73 57   tF...AttributesW
              69 6e 46 78 41 61 5a 53 34 63 6f 72 65 33 73 79   inFxAaZS4core3sy
              73 37 77 69 6e 64 6f 77 ff 73 32 35 57 49 4e 33   s7window.s25WIN3
              32 5f 46 49 4c 45 5f 41 54 54 52 49 42 55 54 45   2_FILE_ATTRIBUTE
              5f 44 41 54 41 31 35 5f 5f 64 67 6c 69 74 65 72   _DATA15__dgliter
              61 6c 32 32 36 38 4d 46 5a 43 36 6f 62 6a 65 63   al2268MFZC6objec
              74 39 54 68 72 6f 77 61 62 6c 65                  t9Throwable 
^ These two - the same content, but the address (or offset or what it is) is different. 1b8685 and 1b86eb respectively.
 1bc1f1  EXTDEF 5b 5f 44 33 73 74 64 34 66 69 6c 65 32 30 67 65  
[_D3std4file20ge
              74 46 69 6c 65 41 74 74 72 69 62 75 74 65 73 57   tFileAttributesW
              69 6e 46 78 41 61 5a 53 34 63 6f 72 65 33 73 79   inFxAaZS4core3sy
              73 37 77 69 6e 64 6f 77 73 37 77 69 6e 64 6f 77   s7windows7window
              73 32 35 57 49 4e 33 32 5f 46 49 4c 45 5f 41 54   s25WIN32_FILE_AT
              54 52 49 42 55 54 45 5f 44 41 54 41  0            TRIBUTE_DATA.
 
 1bc58c  EXTDEF 5b 5f 44 33 73 74 64 34 66 69 6c 65 32 30 67 65  
[_D3std4file20ge
              74 46 69 6c 65 41 74 74 72 69 62 75 74 65 73 57   tFileAttributesW
              69 6e 46 78 41 61 5a 53 34 63 6f 72 65 33 73 79   inFxAaZS4core3sy
              73 37 77 69 6e 64 6f 77 73 37 77 69 6e 64 6f 77   s7windows7window
              73 32 35 57 49 4e 33 32 5f 46 49 4c 45 5f 41 54   s25WIN32_FILE_AT
              54 52 49 42 55 54 45 5f 44 41 54 41  0            TRIBUTE_DATA.
 
 1bf00e  EXTDEF 17 5f 44 31 31 54 79 70 65 49 6e 66 6f 5f 41 61  
._D11TypeInfo_Aa
              36 5f 5f 69 6e 69 74 5a  0 5b 5f 44 33 73 74 64   6__initZ.[_D3std
              34 66 69 6c 65 32 30 67 65 74 46 69 6c 65 41 74   4file20getFileAt
              74 72 69 62 75 74 65 73 57 69 6e 46 78 41 61 5a   tributesWinFxAaZ
              53 34 63 6f 72 65 33 73 79 73 37 77 69 6e 64 6f   S4core3sys7windo
              77 73 37 77 69 6e 64 6f 77 73 32 35 57 49 4e 33   ws7windows25WIN3
              32 5f 46 49 4c 45 5f 41 54 54 52 49 42 55 54 45   2_FILE_ATTRIBUTE
              5f 44 41 54 41  0                                 _DATA. 
^ These three are different when I do the dump:
 1b8df4  EXTDEF 5b 5f 44 33 73 74 64 34 66 69 6c 65 32 30 67 65  
[_D3std4file20ge
              74 46 69 6c 65 41 74 74 72 69 62 75 74 65 73 57   tFileAttributesW
              69 6e 46 78 41 61 5a 53 34 63 6f 72 65 33 73 79   inFxAaZS4core3sy
              73 37 77 69 6e 64 6f 77 73 37 77 69 6e 64 6f 77   s7windows7window
              73 32 35 57 49 4e 33 32 5f 46 49 4c 45 5f 41 54   s25WIN32_FILE_AT
              54 52 49 42 55 54 45 5f 44 41 54 41  0 77 5f 44   TRIBUTE_DATA.w_D
              33 73 74 64 38 64 61 74 65 74 69 6d 65 31 37 46   3std8datetime17F
              49 4c 45 54 49 4d 45 54 6f 53 79 73 54 69 6d 65   ILETIMEToSysTime
              46 78 50 53 34 63 6f 72 65 33 73 79 73 37 77 69   FxPS4core3sys7wi
              6e 64 6f 77 73 37 77 69 6e 64 6f 77 73 38 46 49   ndows7windows8FI
              4c 45 54 49 4d 45 79 43 33 73 74 64 38 64 61 74   LETIMEyC3std8dat
              65 74 69 6d 65 38 54 69 6d 65 5a 6f 6e 65 5a 53   etime8TimeZoneZS
              33 73 74 64 38 64 61 74 65 74 69 6d 65 37 53 79   3std8datetime7Sy
              73 54 69 6d 65  0                                 sTime.
 
 1b918f  EXTDEF 5b 5f 44 33 73 74 64 34 66 69 6c 65 32 30 67 65  
[_D3std4file20ge
              74 46 69 6c 65 41 74 74 72 69 62 75 74 65 73 57   tFileAttributesW
              69 6e 46 78 41 61 5a 53 34 63 6f 72 65 33 73 79   inFxAaZS4core3sy
              73 37 77 69 6e 64 6f 77 73 37 77 69 6e 64 6f 77   s7windows7window
              73 32 35 57 49 4e 33 32 5f 46 49 4c 45 5f 41 54   s25WIN32_FILE_AT
              54 52 49 42 55 54 45 5f 44 41 54 41  0 77 5f 44   TRIBUTE_DATA.w_D
              33 73 74 64 38 64 61 74 65 74 69 6d 65 31 37 46   3std8datetime17F
              49 4c 45 54 49 4d 45 54 6f 53 79 73 54 69 6d 65   ILETIMEToSysTime
              46 78 50 53 34 63 6f 72 65 33 73 79 73 37 77 69   FxPS4core3sys7wi
              6e 64 6f 77 73 37 77 69 6e 64 6f 77 73 38 46 49   ndows7windows8FI
              4c 45 54 49 4d 45 79 43 33 73 74 64 38 64 61 74   LETIMEyC3std8dat
              65 74 69 6d 65 38 54 69 6d 65 5a 6f 6e 65 5a 53   etime8TimeZoneZS
              33 73 74 64 38 64 61 74 65 74 69 6d 65 37 53 79   3std8datetime7Sy
              73 54 69 6d 65  0                                 sTime.
 
 1bbc31  EXTDEF 17 5f 44 31 31 54 79 70 65 49 6e 66 6f 5f 41 75  
._D11TypeInfo_Au
              36 5f 5f 69 6e 69 74 5a  0 3f 5f 44 33 73 74 64   6__initZ.?_D3std
              38 64 61 74 65 74 69 6d 65 39 4c 6f 63 61 6c 54   8datetime9LocalT
              69 6d 65 36 6f 70 43 61 6c 6c 46 4e 61 4e 62 5a   ime6opCallFNaNbZ
              79 43 33 73 74 64 38 64 61 74 65 74 69 6d 65 39   yC3std8datetime9
              4c 6f 63 61 6c 54 69 6d 65  0  7 5f 77 63 73 6c   LocalTime.._wcsl
              65 6e  0 5b 5f 44 33 73 74 64 34 66 69 6c 65 32   en.[_D3std4file2
              30 67 65 74 46 69 6c 65 41 74 74 72 69 62 75 74   0getFileAttribut
              65 73 57 69 6e 46 78 41 61 5a 53 34 63 6f 72 65   esWinFxAaZS4core
              33 73 79 73 37 77 69 6e 64 6f 77 73 37 77 69 6e   3sys7windows7win
              64 6f 77 73 32 35 57 49 4e 33 32 5f 46 49 4c 45   dows25WIN32_FILE
              5f 41 54 54 52 49 42 55 54 45 5f 44 41 54 41  0   _ATTRIBUTE_DATA.
I had to do the dump on linux, because I could not found the dumpobj binary where you said it should be. I hope this gives a hint where the problem might be. Thanks, Martin
Nov 14 2012
parent reply "Regan Heath" <regan netmail.co.nz> writes:
On Wed, 14 Nov 2012 15:37:19 -0000, Martin Drasar <drasar ics.muni.cz>  
wrote:

 On 14.11.2012 15:28, Regan Heath wrote:
 Well.. druntime is built into a lib, and phobos is built using that
 lib.  So, the only way I can imagine reproducing this error is by
 altering dmd2\src\druntime\import\core\sys\windows\windows.d, rebuilding
 druntime, then rebuilding phobos and replacing the phobos.lib in
 dmd2\windows\lib.

 BUT, doing so fails at the rebuild of phobos, giving the error:
 std\file.d(530): Error: undefined identifier WIN32_FILE_ATTRIBUTE_DATA,
 did you mean struct xxWIN32_FILE_ATTRIBUTE_DATA?

 So.. it's almost like in your case the rdmd/dmd command line is not
 using the pre-built phobos.lib, but trying to recompile std.file itself.

 I assume you have a dmd2\windows\lib\phobos.lib?  What are the dates on
 various files.. is it possible you are time shifted in such a way which
 is confusing the compiler into ignoring phobos.lib and rebuilding from
 source?
Yes, I have it. Times are normal. All files are from yesterday when I installed the dmd.
 What happens if you run dumpobj (dmc\dm\bin) on phobos.lib, .e.g
   dumpobj -p phobos.lib > output.txt

 then open output.txt and look for WIN32_FILE_ATTRIBUTE_DATA.  Bear in
 mind the output wraps the symbol names as needed so simply searching for
 "WIN32_FILE_ATTRIBUTE_DATA" wont find anything.
...snip... I had to do the dump on linux, because I could not found the dumpobj binary where you said it should be. I hope this gives a hint where the problem might be.
I hope so to .. but I don't have a clue. I'm not at all familiar with the output of dumpobj so I can't really debug this any further. TBH I was banking on you not finding the symbols or them being radically different or something strange. Have you tried dmd in verbose mode, perhaps that'll give a clue. R -- Using Opera's revolutionary email client: http://www.opera.com/mail/
Nov 14 2012
parent reply =?ISO-8859-15?Q?Martin_Dra=A8ar?= <drasar ics.muni.cz> writes:
Dne 14.11.2012 18:18, Regan Heath napsal(a):
 I hope this gives a hint where the problem might be.
I hope so to .. but I don't have a clue. I'm not at all familiar with the output of dumpobj so I can't really debug this any further. TBH I was banking on you not finding the symbols or them being radically different or something strange.
Yeah, I was kind of expecting it as well... Low level gurus out there - HELP US! :-)
 Have you tried dmd in verbose mode, perhaps that'll give a clue.
Verbose output is attached, but I am afraid that it does not give much answers. The error is on the top, don't know why - if it is not redirected to a file, it is the last thing displayed. Anyway, thanks for your assistance. Martin
Nov 14 2012
parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
On 11/14/2012 9:49 PM, Martin Drašar wrote:
 Dne 14.11.2012 18:18, Regan Heath napsal(a):
 I hope this gives a hint where the problem might be.
I hope so to .. but I don't have a clue. I'm not at all familiar with the output of dumpobj so I can't really debug this any further. TBH I was banking on you not finding the symbols or them being radically different or something strange.
Yeah, I was kind of expecting it as well... Low level gurus out there - HELP US! :-)
 Have you tried dmd in verbose mode, perhaps that'll give a clue.
Verbose output is attached, but I am afraid that it does not give much answers. The error is on the top, don't know why - if it is not redirected to a file, it is the last thing displayed. Anyway, thanks for your assistance. Martin
[...]
 import    core.sys.windows.windows	(C:\Program 
Files\D\dmd2\windows\bin\..\..\src\druntime\import\core\sys\windows\windows.di) since dmd 2.060 most of the files in druntme/import are plain copies of the source .d files, not generated .di files. My guess is that you have copied dmd 2.060 over an older version which included the .di files and you are now left with a mixture of versions. I suggest you should reinstall dmd 2.060 into an empty directory.
Nov 14 2012
parent reply =?windows-1250?Q?Martin_Dra=9Aar?= <drasar ics.muni.cz> writes:
Dne 15.11.2012 7:45, Rainer Schuetze napsal(a):
 [...]

  >
  > import    core.sys.windows.windows    (C:\Program
 Files\D\dmd2\windows\bin\..\..\src\druntime\import\core\sys\windows\windows.di)


 since dmd 2.060 most of the files in druntme/import are plain copies of
 the source .d files, not generated .di files. My guess is that you have
 copied dmd 2.060 over an older version which included the .di files and
 you are now left with a mixture of versions.

 I suggest you should reinstall dmd 2.060 into an empty directory.
Hi, Rainer, you nailed it, thanks! I've managed to overwrite two older installations on both machines I was playing with. Clean installation did the trick. There should probably be a check for previously installed versions in the installer, so it will at least yell at you that there are problems waiting. Is there some place where I could fill an enhancement request? Martin
Nov 14 2012
parent Rainer Schuetze <r.sagitario gmx.de> writes:
On 11/15/2012 8:17 AM, Martin Drašar wrote:
 Dne 15.11.2012 7:45, Rainer Schuetze napsal(a):
 [...]

  >
  > import    core.sys.windows.windows    (C:\Program
 Files\D\dmd2\windows\bin\..\..\src\druntime\import\core\sys\windows\windows.di)



 since dmd 2.060 most of the files in druntme/import are plain copies of
 the source .d files, not generated .di files. My guess is that you have
 copied dmd 2.060 over an older version which included the .di files and
 you are now left with a mixture of versions.

 I suggest you should reinstall dmd 2.060 into an empty directory.
Hi, Rainer, you nailed it, thanks! I've managed to overwrite two older installations on both machines I was playing with. Clean installation did the trick.
In previous versions installing over an older version usually did not cause any troubles as long as you didn't use files that were not overwritten. dmd 2.060 is special in this regard.
 There should probably be a check for previously installed versions in
 the installer, so it will at least yell at you that there are problems
 waiting. Is there some place where I could fill an enhancement request?
Bug reports and enhancement requests go here: http://d.puremagic.com/issues/ Rainer
Nov 15 2012