digitalmars.D - A new and exciting way in which DMD fails to build for me
- Meta (25/25) Jan 20 2015 I'm trying to build to build DMD and I've encountered a very
- ketmar via Digitalmars-d (3/36) Jan 20 2015 what is that "id.c" at all? i can't find such file in dmd git repo...
- Meta (4/42) Jan 20 2015 It's generated by idgen.exe, which is compiled from idgen.c. I'm
- ketmar via Digitalmars-d (9/14) Jan 20 2015 ah, sorry, i should read your post more carefully.
- Meta (5/19) Jan 20 2015 Yeah, it's strange. I guess it must be make-related, as the
- ketmar via Digitalmars-d (6/30) Jan 20 2015 this may be timestamp-related somehow, 'cause make looks only to
- Meta (3/9) Jan 20 2015 I just made a fresh clone and tried again, same thing happens.
- ketmar via Digitalmars-d (9/19) Jan 20 2015 hm. were from it got that "id.c" at all? isn't there old
- Meta (9/31) Jan 20 2015 The only things in my path when I run make are:
- Meta (3/10) Jan 20 2015 And of course that did fix it. Where in the world would it be
- Meta (10/22) Jan 20 2015 Never mind, there actually *is* another idgen in my path, even
- ketmar via Digitalmars-d (4/28) Jan 20 2015 if you'll make a PR, it would be good to change other invocations too:
- Meta (4/7) Jan 20 2015 I have; the PR is here if any driveby readers want to merge it:
- ketmar via Digitalmars-d (3/12) Jan 20 2015 heh, and it's already merged. that was really fast! ;-)
- eles (4/8) Jan 20 2015 that's why everybody loves make so much that they invented
- ketmar via Digitalmars-d (3/3) Jan 20 2015 On Tue, 20 Jan 2015 20:22:59 +0000
I'm trying to build to build DMD and I've encountered a very strange problem. When I run `make -fwin32.mak`, there are errors when it tries to compile id.c: id.c(298) : Error: 'idPool' is not a member of 'Lexer' ...etc. Sure enough, when I look in id.c, there are a bunch of these: stringof = Lexer::idPool("stringof"); But Lexer does not have an `idPool` member. I then looked in idgen.c for the offending line that must be wrongly inserting "Lexer" instead of "Identifier", but everything looks okay. Specifically this block: for (i = 0; i < sizeof(msgtable) / sizeof(msgtable[0]); i++) { const char *id = msgtable[i].ident; const char *p = msgtable[i].name; if (!p) p = id; fprintf(fp," %s = Identifier::idPool(\"%s\");\n", id, p); } Looks like it should print the correct line to id.c. I can confirm this by running idgen.exe manually; it produces the correct file. However, when I try deleting all the relevant files to make sure there is nothing old hanging around, then run make again, the same incorrect id.c is generated. This seems bizarre to me; what exactly is going on here?
Jan 20 2015
On Tue, 20 Jan 2015 20:14:42 +0000 Meta via Digitalmars-d <digitalmars-d puremagic.com> wrote:I'm trying to build to build DMD and I've encountered a very=20 strange problem. When I run `make -fwin32.mak`, there are errors=20 when it tries to compile id.c: =20 id.c(298) : Error: 'idPool' is not a member of 'Lexer' ...etc. =20 Sure enough, when I look in id.c, there are a bunch of these: =20 stringof =3D Lexer::idPool("stringof"); =20 But Lexer does not have an `idPool` member. I then looked in=20 idgen.c for the offending line that must be wrongly inserting=20 "Lexer" instead of "Identifier", but everything looks okay.=20 Specifically this block: =20 for (i =3D 0; i < sizeof(msgtable) / sizeof(msgtable[0]); i++) { const char *id =3D msgtable[i].ident; const char *p =3D msgtable[i].name; =20 if (!p) p =3D id; fprintf(fp," %s =3D Identifier::idPool(\"%s\");\n", id, p); } =20 Looks like it should print the correct line to id.c. I can=20 confirm this by running idgen.exe manually; it produces the=20 correct file. =20 However, when I try deleting all the relevant files to make sure=20 there is nothing old hanging around, then run make again, the=20 same incorrect id.c is generated. This seems bizarre to me; what=20 exactly is going on here?what is that "id.c" at all? i can't find such file in dmd git repo...
Jan 20 2015
On Tuesday, 20 January 2015 at 20:19:19 UTC, ketmar via Digitalmars-d wrote:On Tue, 20 Jan 2015 20:14:42 +0000 Meta via Digitalmars-d <digitalmars-d puremagic.com> wrote:It's generated by idgen.exe, which is compiled from idgen.c. I'm not sure why, exactly.I'm trying to build to build DMD and I've encountered a very strange problem. When I run `make -fwin32.mak`, there are errors when it tries to compile id.c: id.c(298) : Error: 'idPool' is not a member of 'Lexer' ...etc. Sure enough, when I look in id.c, there are a bunch of these: stringof = Lexer::idPool("stringof"); But Lexer does not have an `idPool` member. I then looked in idgen.c for the offending line that must be wrongly inserting "Lexer" instead of "Identifier", but everything looks okay. Specifically this block: for (i = 0; i < sizeof(msgtable) / sizeof(msgtable[0]); i++) { const char *id = msgtable[i].ident; const char *p = msgtable[i].name; if (!p) p = id; fprintf(fp," %s = Identifier::idPool(\"%s\");\n", id, p); } Looks like it should print the correct line to id.c. I can confirm this by running idgen.exe manually; it produces the correct file. However, when I try deleting all the relevant files to make sure there is nothing old hanging around, then run make again, the same incorrect id.c is generated. This seems bizarre to me; what exactly is going on here?what is that "id.c" at all? i can't find such file in dmd git repo...
Jan 20 2015
On Tue, 20 Jan 2015 20:22:59 +0000 Meta via Digitalmars-d <digitalmars-d puremagic.com> wrote:ah, sorry, i should read your post more carefully. did you deleted all the files in question, i.e. id.c id.h idgen.obj idgen.exe before trying to run make again?what is that "id.c" at all? i can't find such file in dmd git=20 repo...=20 It's generated by idgen.exe, which is compiled from idgen.c. I'm=20 not sure why, exactly.
Jan 20 2015
On Tuesday, 20 January 2015 at 20:33:58 UTC, ketmar via Digitalmars-d wrote:On Tue, 20 Jan 2015 20:22:59 +0000 Meta via Digitalmars-d <digitalmars-d puremagic.com> wrote:Yeah, it's strange. I guess it must be make-related, as the incorrect id.c is only generated when I run the makefile, but I don't understand make enough to discern if that's the case.ah, sorry, i should read your post more carefully. did you deleted all the files in question, i.e. id.c id.h idgen.obj idgen.exe before trying to run make again?what is that "id.c" at all? i can't find such file in dmd git repo...It's generated by idgen.exe, which is compiled from idgen.c. I'm not sure why, exactly.
Jan 20 2015
On Tue, 20 Jan 2015 20:37:03 +0000 Meta via Digitalmars-d <digitalmars-d puremagic.com> wrote:On Tuesday, 20 January 2015 at 20:33:58 UTC, ketmar via=20 Digitalmars-d wrote:this may be timestamp-related somehow, 'cause make looks only to timestamps to determine which file(s) should be rebuild. does this occurs if you cloning dmd repo in fresh place? i built windows version of dmd not so long ago and everything was ok.On Tue, 20 Jan 2015 20:22:59 +0000 Meta via Digitalmars-d <digitalmars-d puremagic.com> wrote:=20 Yeah, it's strange. I guess it must be make-related, as the=20 incorrect id.c is only generated when I run the makefile, but I=20 don't understand make enough to discern if that's the case.ah, sorry, i should read your post more carefully. did you deleted all the files in question, i.e. id.c id.h idgen.obj idgen.exe before trying to run make again?what is that "id.c" at all? i can't find such file in dmd=20 git repo...=20 It's generated by idgen.exe, which is compiled from idgen.c.=20 I'm not sure why, exactly.
Jan 20 2015
On Tuesday, 20 January 2015 at 20:50:49 UTC, ketmar via Digitalmars-d wrote:this may be timestamp-related somehow, 'cause make looks only to timestamps to determine which file(s) should be rebuild. does this occurs if you cloning dmd repo in fresh place? i built windows version of dmd not so long ago and everything was ok.I just made a fresh clone and tried again, same thing happens.
Jan 20 2015
On Tue, 20 Jan 2015 21:11:29 +0000 Meta via Digitalmars-d <digitalmars-d puremagic.com> wrote:On Tuesday, 20 January 2015 at 20:50:49 UTC, ketmar via=20 Digitalmars-d wrote:hm. were from it got that "id.c" at all? isn't there old "idgen.exe" lying somewhere in your %PATH%? win32.mak runs just "idgen", so sometimes when something is gone haywire it may call "idgen.exe" from some other place. i don't know why it uses simple "idgen" instead of ".\\idgen.exe". you can try to fix that like in make (it's around "id.h id.c : idgen.c" rule) and see if that changes anything.this may be timestamp-related somehow, 'cause make looks only to timestamps to determine which file(s) should be rebuild. does=20 this occurs if you cloning dmd repo in fresh place? i built windows=20 version of dmd not so long ago and everything was ok.=20 I just made a fresh clone and tried again, same thing happens.
Jan 20 2015
On Tuesday, 20 January 2015 at 21:37:08 UTC, ketmar via Digitalmars-d wrote:On Tue, 20 Jan 2015 21:11:29 +0000 Meta via Digitalmars-d <digitalmars-d puremagic.com> wrote:The only things in my path when I run make are: C:\D\dmd2\windows\bin C:\Program Files (x86)\Git\cmd C:\D\dm\bin Also, when I open a new shell window and type "where idgen.exe", it points to the one in the DMD folder. I'll try editing the makefile, however, and see if that works.On Tuesday, 20 January 2015 at 20:50:49 UTC, ketmar via Digitalmars-d wrote:hm. were from it got that "id.c" at all? isn't there old "idgen.exe" lying somewhere in your %PATH%? win32.mak runs just "idgen", so sometimes when something is gone haywire it may call "idgen.exe" from some other place. i don't know why it uses simple "idgen" instead of ".\\idgen.exe". you can try to fix that like in make (it's around "id.h id.c : idgen.c" rule) and see if that changes anything.this may be timestamp-related somehow, 'cause make looks only to timestamps to determine which file(s) should be rebuild. does this occurs if you cloning dmd repo in fresh place? i built windows version of dmd not so long ago and everything was ok.I just made a fresh clone and tried again, same thing happens.
Jan 20 2015
On Tuesday, 20 January 2015 at 21:57:56 UTC, Meta wrote:The only things in my path when I run make are: C:\D\dmd2\windows\bin C:\Program Files (x86)\Git\cmd C:\D\dm\bin Also, when I open a new shell window and type "where idgen.exe", it points to the one in the DMD folder. I'll try editing the makefile, however, and see if that works.And of course that did fix it. Where in the world would it be finding another idgen.exe?
Jan 20 2015
On Tuesday, 20 January 2015 at 22:03:27 UTC, Meta wrote:On Tuesday, 20 January 2015 at 21:57:56 UTC, Meta wrote:Never mind, there actually *is* another idgen in my path, even when it only includes the aforementioned locations. A rogue idgen.exe somehow snuck into the D:\dmd2\windows\bin folder, probably because the guide on the wiki suggests to do `copy *.exe <bin folder>`, and idgen gets copied along with a newly built DMD. It'll work fine the first time, but will fail all subsequent times. That's pretty evil, actually. That should be changed on the wiki, and maybe I'll make a PR for the makefile so it will use the local idgen.The only things in my path when I run make are: C:\D\dmd2\windows\bin C:\Program Files (x86)\Git\cmd C:\D\dm\bin Also, when I open a new shell window and type "where idgen.exe", it points to the one in the DMD folder. I'll try editing the makefile, however, and see if that works.And of course that did fix it. Where in the world would it be finding another idgen.exe?
Jan 20 2015
On Tue, 20 Jan 2015 22:15:43 +0000 Meta via Digitalmars-d <digitalmars-d puremagic.com> wrote:On Tuesday, 20 January 2015 at 22:03:27 UTC, Meta wrote:if you'll make a PR, it would be good to change other invocations too: "optabgen" and "impcnvgen".On Tuesday, 20 January 2015 at 21:57:56 UTC, Meta wrote:=20 Never mind, there actually *is* another idgen in my path, even=20 when it only includes the aforementioned locations. A rogue=20 idgen.exe somehow snuck into the D:\dmd2\windows\bin folder,=20 probably because the guide on the wiki suggests to do `copy *.exe=20 <bin folder>`, and idgen gets copied along with a newly built=20 DMD. It'll work fine the first time, but will fail all subsequent=20 times. That's pretty evil, actually. That should be changed on=20 the wiki, and maybe I'll make a PR for the makefile so it will=20 use the local idgen.The only things in my path when I run make are: C:\D\dmd2\windows\bin C:\Program Files (x86)\Git\cmd C:\D\dm\bin Also, when I open a new shell window and type "where=20 idgen.exe", it points to the one in the DMD folder. I'll try=20 editing the makefile, however, and see if that works.And of course that did fix it. Where in the world would it be=20 finding another idgen.exe?
Jan 20 2015
On Tuesday, 20 January 2015 at 22:25:18 UTC, ketmar via Digitalmars-d wrote:if you'll make a PR, it would be good to change other invocations too: "optabgen" and "impcnvgen".I have; the PR is here if any driveby readers want to merge it: https://github.com/D-Programming-Language/dmd/pull/4322
Jan 20 2015
On Tue, 20 Jan 2015 22:30:16 +0000 Meta via Digitalmars-d <digitalmars-d puremagic.com> wrote:On Tuesday, 20 January 2015 at 22:25:18 UTC, ketmar via=20 Digitalmars-d wrote:heh, and it's already merged. that was really fast! ;-)if you'll make a PR, it would be good to change other=20 invocations too: "optabgen" and "impcnvgen".=20 I have; the PR is here if any driveby readers want to merge it: =20 https://github.com/D-Programming-Language/dmd/pull/4322
Jan 20 2015
On Tuesday, 20 January 2015 at 20:50:49 UTC, ketmar via Digitalmars-d wrote:On Tue, 20 Jan 2015 20:37:03 +0000 Meta via Digitalmars-d <digitalmars-d puremagic.com> wrote:this may be timestamp-related somehow, 'cause make looks only to timestamps to determine which file(s) should be rebuild. doesthat's why everybody loves make so much that they invented scons...
Jan 20 2015
On Tue, 20 Jan 2015 20:22:59 +0000 Meta via Digitalmars-d <digitalmars-d puremagic.com> wrote: ah, and "id.obj", of course. ;-)
Jan 20 2015