February 25, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9044


Dmitry Olshansky <dmitry.olsh@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dmitry.olsh@gmail.com


--- Comment #20 from Dmitry Olshansky <dmitry.olsh@gmail.com> 2013-02-24 20:42:14 PST ---
(In reply to comment #19)
> Can somebody confirm link failure in the last test case?

I can. For me it fails with stock dmd2.062. Here is the complete log:

Compiling xlib.lib...
Compiling x.obj...
Linking...
OPTLINK (R) for Win32  Release 8.00.12
Copyright (C) Digital Mars 1989-2010  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
psapi.lib
 Warning 2: File Not Found psapi.lib
xlib.lib(object)  Offset 0B1ACH Record Type 0091
 Error 1: Previous Definition Different :
_D58C:\dmd2\windows\bin\..\..\src\druntime\import\object.di.4612__ModuleInfoZ
xlib.lib(object)  Offset 0B239H Record Type 00C3
 Error 1: Previous Definition Different :
_D58C:\dmd2\windows\bin\..\..\src\druntime\import\object.di.467__arrayZ
xlib.lib(object)  Offset 0B266H Record Type 00C3
 Error 1: Previous Definition Different :
_D58C:\dmd2\windows\bin\..\..\src\druntime\import\object.di.468__assertFiZv
xlib.lib(object)  Offset 0B293H Record Type 00C3
 Error 1: Previous Definition Different :
_D58C:\dmd2\windows\bin\..\..\src\druntime\import\object.di.4615__unittest_failFiZv
Failed.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 11, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9044



--- Comment #21 from Denis Shelomovskij <verylonglogin.reg@gmail.com> 2013-03-11 12:56:43 MSK ---
This is definitely a dmd bug, not OPTLINK as it is also triggered when building a library (when dmd doesn't call linker).

`f` is a member function of a class:
---
void f()
{
    auto a = asJSON(["type": asJSON(to!string(type))]);
    auto b = asJSON(cycleData.map!(d => toJSON(d.height))().array());
    auto c = asJSON(zip(cycleData, sequence!`a[0] + n`(cast()
creationCycle)).filter!`!a[0].available`().map!(a => asJSON(a[1]))().array());
}
---

If any of 3 `f`'s lines are commented out the library compiles fine into `.lib` file. Otherwise dmd fails with:
---
xxx.lib: Error: multiple definition of object_32e_f8d:
_D65D:\D\dmd2head\windows\bin\..\..\src\druntime\import\object.di.81412__ModuleInfoZ
and object:
_D65D:\D\dmd2head\windows\bin\..\..\src\druntime\import\object.di.81412__ModuleInfoZ
xxx.lib: Error: multiple definition of object_32e_f8d:
_D65D:\D\dmd2head\windows\bin\..\..\src\druntime\import\object.di.8147__arrayZ
and object:
_D65D:\D\dmd2head\windows\bin\..\..\src\druntime\import\object.di.8147__arrayZ
xxx.lib: Error: multiple definition of object_32e_f8d:
_D65D:\D\dmd2head\windows\bin\..\..\src\druntime\import\object.di.8148__assertFiZv
and object:
_D65D:\D\dmd2head\windows\bin\..\..\src\druntime\import\object.di.8148__assertFiZv
xxx.lib: Error: multiple definition of object_32e_f8d:
_D65D:\D\dmd2head\windows\bin\..\..\src\druntime\import\object.di.81415__unittest_failFiZv
and object:
_D65D:\D\dmd2head\windows\bin\..\..\src\druntime\import\object.di.81415__unittest_failFiZv
---

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 11, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9044


Denis Shelomovskij <verylonglogin.reg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Random "Previous Definition |dmd sometimes produces
                   |Different" optlink failure  |object files with multiple
                   |(looks like a buffer        |definitions
                   |overflow bug somewhere)     |
           Severity|regression                  |critical


--- Comment #22 from Denis Shelomovskij <verylonglogin.reg@gmail.com> 2013-03-11 13:02:26 MSK ---
Looks like this is not a regression, this bug is triggered from time to time on the same code because of druntime/phobos changes.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 14, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9044



--- Comment #23 from Denis Shelomovskij <verylonglogin.reg@gmail.com> 2013-03-14 18:29:41 MSK ---
Ping.

This is a dmd issue, not OPTLINK one. And the fact it is not a REGRESSION doesn't mean we should continue releasing dmd with it included as it even worse than a regression as it is triggered randomly.

Personally I already suffer enough from OPTLINK and the fact dmd also produces corrupted object files looks too cruel. With all this words about language stability we have this issue which may accidentally brake build of every code base on every platform because of a any small code change.

I worked on only two non-toy D executables for the last 6 month and both are [partially] blocked because of this. For now I abandoned the first project and have managed to juggle with files to "detrigger" this issue in second one.

So I'm completely missing the point where are these issues with higher priority than this, abandoned, unvoted one? Probably I'm the most luckless D user who always suffer from these linking failures...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 30, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9044



--- Comment #24 from Denis Shelomovskij <verylonglogin.reg@gmail.com> 2013-04-30 16:07:00 MSD ---
Any plans on fixing this? In my unlucky hands even VisualD's cpp2d fails to build in debug mode because of the issue...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 20, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9044


Rainer Schuetze <r.sagitario@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |r.sagitario@gmx.de


--- Comment #25 from Rainer Schuetze <r.sagitario@gmx.de> 2013-05-20 06:13:05 PDT ---
I very much suspect that this is caused by the generated internal object file names of a library or other generated identifiers that are assumed to be unique, but clearly this is not guaranteed when building libraries in separate build steps.

I tried to generate a small test on that suspicion some time ago, but it didn't trigger a linker error then. I have figured it out now:

////////////////////////
module ab;

struct AB
{
     int a;
    int len() { return (new AB).a; }
}

unittest
{
}

////////////////////////
module ba;

struct BA
{
    int b;
    int len() { return (new BA).b; }
}

unittest
{
}

////////////////////////
import ab;
import ba;

int main()
{
    AB ab;
    BA ba;
    return ab.len() + ba.len();
}
////////////////////////

now building with dmd 2.062:

dmd -lib -of"alib.lib" ab.d
dmd -lib -of"blib.lib" ba.d
dmd -c main.d
dmd main.obj alib.lib blib.lib

yields:

OPTLINK (R) for Win32  Release 8.00.12
Copyright (C) Digital Mars 1989-2010  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
blib.lib(object)  Offset 013AEH Record Type 0091
 Error 1: Previous Definition Different :
_D59c:\l\dmd2\windows\bin\..\..\src\druntime\import\object.di.412__ModuleInfoZ
blib.lib(object)  Offset 0143CH Record Type 00C3
 Error 1: Previous Definition Different :
_D59c:\l\dmd2\windows\bin\..\..\src\druntime\import\object.di.47__arrayZ
blib.lib(object)  Offset 01469H Record Type 00C3
 Error 1: Previous Definition Different :
_D59c:\l\dmd2\windows\bin\..\..\src\druntime\import\object.di.48__assertFiZv
blib.lib(object)  Offset 01496H Record Type 00C3
 Error 1: Previous Definition Different :
_D59c:\l\dmd2\windows\bin\..\..\src\druntime\import\object.di.415__unittest_failFiZv
blib.lib(object)  Offset 00F6EH Record Type 0091
 Error 1: Previous Definition Different :
_D59c:\l\dmd2\windows\bin\..\..\src\druntime\import\object.di.312__ModuleInfoZ
blib.lib(object)  Offset 0103BH Record Type 00C3
 Error 1: Previous Definition Different :
_D59c:\l\dmd2\windows\bin\..\..\src\druntime\import\object.di.37__arrayZ
blib.lib(object)  Offset 01068H Record Type 00C3
 Error 1: Previous Definition Different :
_D59c:\l\dmd2\windows\bin\..\..\src\druntime\import\object.di.38__assertFiZv
blib.lib(object)  Offset 01095H Record Type 00C3
 Error 1: Previous Definition Different :
_D59c:\l\dmd2\windows\bin\..\..\src\druntime\import\object.di.315__unittest_failFiZv

also happens with current git-head.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 27, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9044



--- Comment #26 from Denis Shelomovskij <verylonglogin.reg@gmail.com> 2013-05-27 12:07:47 MSD ---
(In reply to comment #25)
> I very much suspect that this is caused by the generated internal object file names of a library or other generated identifiers that are assumed to be unique, but clearly this is not guaranteed when building libraries in separate build steps.

It also fails in dmd (not OPTLINK) when a library is generated using a single
`dmd -lib ...` call (see Comment 21).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 30, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9044


Martin Nowak <code@dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
                 CC|                            |code@dawg.eu
         Resolution|                            |DUPLICATE


--- Comment #27 from Martin Nowak <code@dawg.eu> 2013-05-30 08:02:26 PDT ---
*** This issue has been marked as a duplicate of issue 6461 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
1 2 3
Next ›   Last »