www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9576] New: "Symbol Undefined" linker error on using `std.random.MinstdRand`

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9576

           Summary: "Symbol Undefined" linker error on using
                    `std.random.MinstdRand`
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: link-failure
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: verylonglogin.reg gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg gmail.com> 2013-02-23
12:34:40 MSK ---
---
import std.random;

void main(string[] args)
{
    MinstdRand gen;
    gen.popFront();
}
---

Linker output:
---
main.obj(main)
 Error 42: Symbol Undefined
_D3std6random54__T24LinearCongruentialEngineTkVi48271Vi0Vi2147483647Z24LinearCongruentialEngine8popFrontMFNaNbZv
---

Demangled:
---
pure nothrow void std.random.LinearCongruentialEngine!(uint, 48271, 0,
2147483647).LinearCongruentialEngine.popFront()
---

dmd: 3bdb6dd142de510ca3254a4096ca38e4faadb254
druntime: af3e914ce5c9e7baad61e305886c7a5430674667
phobos: e2692d1d0f9bb0ef9a25722474e324e60e5fb32d

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 23 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9576


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla digitalmars.com


--- Comment #1 from Walter Bright <bugzilla digitalmars.com> 2013-02-24
14:32:58 PST ---
What version of dmd did this work in?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 24 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9576



--- Comment #2 from Denis Shelomovskij <verylonglogin.reg gmail.com> 2013-02-25
09:12:38 MSK ---
At least dmd 2.061 bundle compiles it fine.
Also I'm not sure about the exact source of the problem (dmd or phobos).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 24 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9576


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich gmail.com


--- Comment #3 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2013-02-25
09:49:47 PST ---
(In reply to comment #0)
 dmd: 3bdb6dd142de510ca3254a4096ca38e4faadb254
 druntime: af3e914ce5c9e7baad61e305886c7a5430674667
 phobos: e2692d1d0f9bb0ef9a25722474e324e60e5fb32d

I can't recreate this with these commits, nor in 2.062. Please specify: - How you compiled and linked - Which OS you're using -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 25 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9576



--- Comment #4 from Denis Shelomovskij <verylonglogin.reg gmail.com> 2013-02-27
16:59:47 MSK ---
(In reply to comment #3)
 I can't recreate this with these commits, nor in 2.062. Please specify:
 
 - How you compiled and linked

Using `make -fwin32.mak` targets as always.
 - Which OS you're using

Windows XP SP3 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 27 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9576



--- Comment #5 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2013-02-27
07:59:32 PST ---
(In reply to comment #4)
 (In reply to comment #3)
 I can't recreate this with these commits, nor in 2.062. Please specify:
 
 - How you compiled and linked

Using `make -fwin32.mak` targets as always.

I mean your code? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 27 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9576



--- Comment #6 from Denis Shelomovskij <verylonglogin.reg gmail.com> 2013-02-27
19:43:58 MSK ---
(In reply to comment #5)
 I mean your code?

dmd main.d -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 27 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9576


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME


--- Comment #7 from Denis Shelomovskij <verylonglogin.reg gmail.com> 2013-02-27
20:32:29 MSK ---
I just rebuild dmd/druntime/phobos with these commits. Everything works.
Looks like my mistake, sorry.
I really don't understand what happened as I always just pull and launch BAT
files to rebuild D environment.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 27 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9576



--- Comment #8 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2013-02-27
09:53:46 PST ---
(In reply to comment #7)
 I just rebuild dmd/druntime/phobos with these commits. Everything works.
 Looks like my mistake, sorry.
 I really don't understand what happened as I always just pull and launch BAT
 files to rebuild D environment.

Perhaps you didn't do `make -fwin32.mak clean`? I often get linker errors if I don't do a clean build when I checkout an earlier commit. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 27 2013