Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
August 11, 2005 Missing module name std.c.stddef | ||||
---|---|---|---|---|
| ||||
In my trying to compile some library modules, I stumbled upon a mistake - the std\c\stddef.d file is missing this statement: module std.c.stddef; which led to "multiply defined" errors. Next problem: doing this and then rebuilding Phobos seems to invalidate snn.lib. ---------- D:\Data\Stewart\D\Tests\indigo>dmd datas_file.d E:\DMD\BIN\..\..\dm\bin\link.exe datas_file,,,user32+kernel32/noi; OPTLINK (R) for Win32 Release 7.50B1 Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved E:\DM\BIN\..\lib\SNN.lib(fputwc) Offset 09B94H Record Type 00C3 Error 1: Previous Definition Different : _putwc --- errorlevel 1 ---------- Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on on the 'group where everyone may benefit. |
August 12, 2005 Re: Missing module name std.c.stddef | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stewart Gordon | "Stewart Gordon" <smjg_1998@yahoo.com> wrote in message news:ddftlr$fj3$1@digitaldaemon.com... > In my trying to compile some library modules, I stumbled upon a mistake - the std\c\stddef.d file is missing this statement: > > module std.c.stddef; > > which led to "multiply defined" errors. > > Next problem: doing this and then rebuilding Phobos seems to invalidate snn.lib. > > ---------- > D:\Data\Stewart\D\Tests\indigo>dmd datas_file.d > E:\DMD\BIN\..\..\dm\bin\link.exe datas_file,,,user32+kernel32/noi; > OPTLINK (R) for Win32 Release 7.50B1 > Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved > > E:\DM\BIN\..\lib\SNN.lib(fputwc) Offset 09B94H Record Type 00C3 > Error 1: Previous Definition Different : _putwc > --- errorlevel 1 > ---------- Hmm. I put in the stddef fix, but I don't get this new error? |
August 12, 2005 Re: Missing module name std.c.stddef | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | Walter wrote: <snip> > Hmm. I put in the stddef fix, but I don't get this new error? It only seems to happen when I'm using Indigo and linking with an indigo.lib file generated using build. If I compile the sources together directly then it doesn't happen. So it looks as though build is playing silly donkeys.... Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on on the 'group where everyone may benefit. |
August 12, 2005 Re: Missing module name std.c.stddef | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stewart Gordon | On Fri, 12 Aug 2005 18:31:57 +0100, Stewart Gordon wrote: > Walter wrote: > <snip> >> Hmm. I put in the stddef fix, but I don't get this new error? > > It only seems to happen when I'm using Indigo and linking with an indigo.lib file generated using build. If I compile the sources together directly then it doesn't happen. So it looks as though build is playing silly donkeys.... > > Stewart. When using Build to rebuild the Phobos library, I've come across many mistakes in the Phobos code with respect to missing or wrong module statements. I have, twice, sent these errors to Walter and there has been no change in Phobos yet. Walter, here they are again... ** std\c\stddef needs "module std.c.stddef;" ** std\uni.d needs "module std.uni;" instead of "module uni;" ** All the Type Info modules need to heve the appropriate module statement. For example std\typeinfo\ti_char.d needs module "std.typeinfo.ti_char;" ** std\c\math.d needs "module std.c.math;" ** std\cstream.d needs "module std.cstream;" ** crc32.d needs "module crc32;" instead of "module crc;" ** Nearly all the files in internal and internal\gc have missing module statements. But I'm not sure what needs to be done here. ** The files internal\cast.d, internal\invariant.d, and internal\switch.d can not have module statements because their file names are reserved words in D. Nor can these modules ever be imported, because of the same reason. It seems that Phobos, as it is currently written, must be compiled in a specific manner so as to avoid these errors. Build arranges the order of compilation based on dependencies, but where there are no dependencies between two modules, the order is undefined. In short, Build should not be used to compile the Phobos library, until such time as the Phobos modules adhere to the standards of DMD. -- Derek Parnell Melbourne, Australia 13/08/2005 7:59:10 AM |
August 13, 2005 Re: Missing module name std.c.stddef | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stewart Gordon | Stewart Gordon wrote:
> Walter wrote:
> <snip>
>
>> Hmm. I put in the stddef fix, but I don't get this new error?
>
>
> It only seems to happen when I'm using Indigo and linking with an indigo.lib file generated using build. If I compile the sources together directly then it doesn't happen. So it looks as though build is playing silly donkeys....
>
> Stewart.
>
Same problem with dyndui.lib generated with build:
It caused symbol errors that were impossible to trace when linking with the created dyndui.lib later (undefined symbol errors from phobos - crc32 and some others). However it appears that a file linking with a non-build tool created dyndui.lib worked fine (this based on hearing that Ant seemed to have none of the problems I was experiencing when he used makefiles).
I presumed it was a defficiency somewhere in build, but I couldn't figure out the source of the problem after hours of troubleshooting because there were also defficiencies in phobos as described by Derek.
Cleaning up the phobos error did not solve the problem, strangely (full phobos recompile). That said, I haven't repeated the test with the most recent build version.
-JJR
|
August 13, 2005 Re: Missing module name std.c.stddef | ||||
---|---|---|---|---|
| ||||
Posted in reply to Derek Parnell | Derek Parnell wrote: <snip> > ** crc32.d needs "module crc32;" instead of "module crc;" Why is this in the root of Phobos and not under std or anything? > ** Nearly all the files in internal and internal\gc have missing module > statements. But I'm not sure what needs to be done here. > > ** The files internal\cast.d, internal\invariant.d, and internal\switch.d > can not have module statements because their file names are reserved words > in D. Nor can these modules ever be imported, because of the same reason. <snip> But they could be renamed so that they can have module statements.... Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on on the 'group where everyone may benefit. |
Copyright © 1999-2021 by the D Language Foundation