www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - dmd v0.94

reply Regan Heath <regan netwin.co.nz> writes:
------------kvDqzFtSa4vbkwNmbsoA8z
Content-Type: text/plain; format=flowed; charset=iso-8859-15
Content-Transfer-Encoding: 8bit

Unzip the attached zip and run doit.cmd (if you're on windows, if not 
compile all .d files and link them) the error reported is:

D:\D\src\build\temp\a>doit
D:\d\dmd\bin\..\..\dm\bin\link.exe *,test.exe,,user32+kernel32/co/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

md5.obj(md5)  Offset 00340H Record Type 00C3
  Error 1: Previous Definition Different : 
_D4hash18digestStringT_G16h13digestStr
ingTFG16hZAa
--- errorlevel 1

I believe what is happening is that md4 and md5 both create an instance of 
the code in digestStringT needed to process a ubyte[16] and they then 
collide upon linking.

Help!

Regan.

-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
------------kvDqzFtSa4vbkwNmbsoA8z
Content-Disposition: attachment; filename=bug.zip
Content-Type: application/zip; name=bug.zip
Content-Transfer-Encoding: Base64

UEsDBBQAAAAIAAgC4zCETJaIGAEAAEICAAAGABEAaGFzaC5kVVQNAAcQUuVAQE7l
QBdQ5UCNUclOhDAYPpeEd/i9OCwBwUQviGfvzo1wILZAEyikiwuGd7e0hRk9mZCQ
fjtlnLAaCPSN6Avf8z1JxnloJIEXjQTnEL59b92ImdP3DafjPHEJQuJUSE5Z99uG
aUeEfDXM2fnRW9/wqv7LAbbsTnMi1CBNHEK0hQCnA2Gd7OGmhMxpkfyaydQGuMrq
EFRhMEWZXrRACSoVdNF8dH/FMF1MpdB05tKR7dIIIx9g+sUS7X219bYTDzY71bKd
SvJCn5+3JKBJso9CatNU1DmNtdDrQMFdCfnjoXPFlX0doYmbWOuYnnzaQ6XgFvKH
PRM5TRw7YL3u2r/x6XJtCQ0jsRxUHIf/3nDKTrbEdKz20jiRirPLb9pw/fwAUEsD
BBQAAAAIAHcD4z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YLFAAAAAgAcwLjMDb6
/bWrAAAA9wAAAAYACQAAAAAAAQAgALaBEQIAAG1haW4uZFVUBQAH2lLlQFBLAQIW
CxQAAAAIAHUD4zABIwqZSgAAAFIAAAAFAAkAAAAAAAEAIAC2gfECAABtZDUuZFVU
BQAHvlTlQFBLAQIWCxQAAAAIAJsD4zDN+0WFTwAAAFkAAAAIAAkAAAAAAAEAIAD/
gW8DAABkb2l0LmNtZFVUBQAHBlXlQFBLBQYAAAAABQAFADEBAAD1AwAAAAA=

------------kvDqzFtSa4vbkwNmbsoA8z--
Jul 02 2004
next sibling parent reply J C Calvarese <jcc7 cox.net> writes:
In article <opsaiglfdb5a2sq9 digitalmars.com>, Regan Heath says...
------------kvDqzFtSa4vbkwNmbsoA8z
Content-Type: text/plain; format=flowed; charset=iso-8859-15
Content-Transfer-Encoding: 8bit

Unzip the attached zip and run doit.cmd (if you're on windows, if not 
compile all .d files and link them) the error reported is:

D:\D\src\build\temp\a>doit
D:\d\dmd\bin\..\..\dm\bin\link.exe *,test.exe,,user32+kernel32/co/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

md5.obj(md5)  Offset 00340H Record Type 00C3
  Error 1: Previous Definition Different : 
_D4hash18digestStringT_G16h13digestStr
ingTFG16hZAa
--- errorlevel 1

I believe what is happening is that md4 and md5 both create an instance of 
the code in digestStringT needed to process a ubyte[16] and they then 
collide upon linking.

Help!

Regan.

I agree that you seem to have found some sort of compiler or linker error, but did you realize there's a work-around? I compiled them all at once like this: dmd main.d hash.d md4.d md5.d This is my result: c:\dmd\bin\..\..\dm\bin\link.exe main+hash+md4+md5,,,user32+kernel32/noi; 00000000000000000000000000000000 d41d8cd98f00b204e9800998ecf8427e 00000000000000000000000000000000 DONE main (I don't know whether it's right or not, but it doesn't generate any errors.) jcc7
Jul 02 2004
parent Regan Heath <regan netwin.co.nz> writes:
On Fri, 2 Jul 2004 19:42:49 +0000 (UTC), J C Calvarese <jcc7 cox.net> 
wrote:

 In article <opsaiglfdb5a2sq9 digitalmars.com>, Regan Heath says...
 ------------kvDqzFtSa4vbkwNmbsoA8z
 Content-Type: text/plain; format=flowed; charset=iso-8859-15
 Content-Transfer-Encoding: 8bit

 Unzip the attached zip and run doit.cmd (if you're on windows, if not
 compile all .d files and link them) the error reported is:

 D:\D\src\build\temp\a>doit
 D:\d\dmd\bin\..\..\dm\bin\link.exe *,test.exe,,user32+kernel32/co/noi;
 OPTLINK (R) for Win32  Release 7.50B1
 Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

 md5.obj(md5)  Offset 00340H Record Type 00C3
  Error 1: Previous Definition Different :
 _D4hash18digestStringT_G16h13digestStr
 ingTFG16hZAa
 --- errorlevel 1

 I believe what is happening is that md4 and md5 both create an instance 
 of
 the code in digestStringT needed to process a ubyte[16] and they then
 collide upon linking.

 Help!

 Regan.

I agree that you seem to have found some sort of compiler or linker error, but did you realize there's a work-around?

No.
 I compiled them all at once like this:
 dmd main.d hash.d md4.d md5.d

Ahh of course.. so the bug only occurs when compiling seperately.
 This is my result:
 c:\dmd\bin\..\..\dm\bin\link.exe main+hash+md4+md5,,,user32+kernel32/noi;
 00000000000000000000000000000000
 d41d8cd98f00b204e9800998ecf8427e
 00000000000000000000000000000000
 DONE  main

 (I don't know whether it's right or not, but it doesn't generate any 
 errors.)

It's right, all the code to actually make a digest was removed from that sample. Thanks for this. Regan -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Jul 02 2004
prev sibling parent reply =?ISO-8859-15?Q?Julio_C=E9sar_Carrascal_Urquijo?= writes:
Yes, I've seen this same problem happening with template instance when 
the files where compiled separately.

The solution is either alias instances of the template in one file and 
use only the aliases or compile all files at the same time.

Regan Heath wrote:

 Unzip the attached zip and run doit.cmd (if you're on windows, if not 
 compile all .d files and link them) the error reported is:
 
 D:\D\src\build\temp\a>doit
 D:\d\dmd\bin\..\..\dm\bin\link.exe *,test.exe,,user32+kernel32/co/noi;
 OPTLINK (R) for Win32  Release 7.50B1
 Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved
 
 md5.obj(md5)  Offset 00340H Record Type 00C3
  Error 1: Previous Definition Different : 
 _D4hash18digestStringT_G16h13digestStr
 ingTFG16hZAa
 --- errorlevel 1
 
 I believe what is happening is that md4 and md5 both create an instance 
 of the code in digestStringT needed to process a ubyte[16] and they then 
 collide upon linking.
 
 Help!
 
 Regan.
 

-- Julio CÚsar Carrascal Urquijo
Jul 02 2004
next sibling parent Regan Heath <regan netwin.co.nz> writes:
On Fri, 02 Jul 2004 15:37:05 -0500, Julio CÚsar Carrascal Urquijo 
<adnoctum phreaker.net> wrote:

 Yes, I've seen this same problem happening with template instance when 
 the files where compiled separately.

 The solution is either alias instances of the template in one file and 
 use only the aliases

I think I'll do this. Thanks.
 or compile all files at the same time.

Yeah.. JC told me this too. Thanks for your help, Regan
 Regan Heath wrote:

 Unzip the attached zip and run doit.cmd (if you're on windows, if not 
 compile all .d files and link them) the error reported is:

 D:\D\src\build\temp\a>doit
 D:\d\dmd\bin\..\..\dm\bin\link.exe *,test.exe,,user32+kernel32/co/noi;
 OPTLINK (R) for Win32  Release 7.50B1
 Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

 md5.obj(md5)  Offset 00340H Record Type 00C3
  Error 1: Previous Definition Different : 
 _D4hash18digestStringT_G16h13digestStr
 ingTFG16hZAa
 --- errorlevel 1

 I believe what is happening is that md4 and md5 both create an instance 
 of the code in digestStringT needed to process a ubyte[16] and they 
 then collide upon linking.

 Help!

 Regan.


-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Jul 02 2004
prev sibling parent reply Regan Heath <regan netwin.co.nz> writes:
On Fri, 02 Jul 2004 15:37:05 -0500, Julio CÚsar Carrascal Urquijo 
<adnoctum phreaker.net> wrote:

 Yes, I've seen this same problem happening with template instance when 
 the files where compiled separately.

 The solution is either alias instances of the template in one file and 
 use only the aliases or compile all files at the same time.

I just tried to do this with this example, I cannot seem to get it to work, can you show me how? Perhaps by changing my example and reposting it? Thanks, Regan
 Regan Heath wrote:

 Unzip the attached zip and run doit.cmd (if you're on windows, if not 
 compile all .d files and link them) the error reported is:

 D:\D\src\build\temp\a>doit
 D:\d\dmd\bin\..\..\dm\bin\link.exe *,test.exe,,user32+kernel32/co/noi;
 OPTLINK (R) for Win32  Release 7.50B1
 Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

 md5.obj(md5)  Offset 00340H Record Type 00C3
  Error 1: Previous Definition Different : 
 _D4hash18digestStringT_G16h13digestStr
 ingTFG16hZAa
 --- errorlevel 1

 I believe what is happening is that md4 and md5 both create an instance 
 of the code in digestStringT needed to process a ubyte[16] and they 
 then collide upon linking.

 Help!

 Regan.


-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Jul 03 2004
parent Regan Heath <regan netwin.co.nz> writes:
On Sun, 04 Jul 2004 12:31:33 +1200, Regan Heath <regan netwin.co.nz> wrote:

 On Fri, 02 Jul 2004 15:37:05 -0500, Julio CÚsar Carrascal Urquijo 
 <adnoctum phreaker.net> wrote:

 Yes, I've seen this same problem happening with template instance when 
 the files where compiled separately.

 The solution is either alias instances of the template in one file and 
 use only the aliases or compile all files at the same time.

I just tried to do this with this example, I cannot seem to get it to work, can you show me how? Perhaps by changing my example and reposting it?

I'm so slow sometimes.. I have worked it out, thanks for this idea. Regan
 Thanks,
 Regan

 Regan Heath wrote:

 Unzip the attached zip and run doit.cmd (if you're on windows, if not 
 compile all .d files and link them) the error reported is:

 D:\D\src\build\temp\a>doit
 D:\d\dmd\bin\..\..\dm\bin\link.exe *,test.exe,,user32+kernel32/co/noi;
 OPTLINK (R) for Win32  Release 7.50B1
 Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

 md5.obj(md5)  Offset 00340H Record Type 00C3
  Error 1: Previous Definition Different : 
 _D4hash18digestStringT_G16h13digestStr
 ingTFG16hZAa
 --- errorlevel 1

 I believe what is happening is that md4 and md5 both create an 
 instance of the code in digestStringT needed to process a ubyte[16] 
 and they then collide upon linking.

 Help!

 Regan.



-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Jul 03 2004