Bug 9576 – "Symbol Undefined" linker error on using `std.random.MinstdRand`

Status
RESOLVED
Resolution
WORKSFORME
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-02-23T01:34:00Z
Last change time
2013-02-27T09:53:46Z
Keywords
link-failure
Assigned to
nobody
Creator
verylonglogin.reg

Comments

Comment #0 by verylonglogin.reg — 2013-02-23T01:34:40Z
--- 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
Comment #1 by bugzilla — 2013-02-24T14:32:58Z
What version of dmd did this work in?
Comment #2 by verylonglogin.reg — 2013-02-24T22:12:38Z
At least dmd 2.061 bundle compiles it fine. Also I'm not sure about the exact source of the problem (dmd or phobos).
Comment #3 by andrej.mitrovich — 2013-02-25T09:49:47Z
(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
Comment #4 by verylonglogin.reg — 2013-02-27T05:59:47Z
(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
Comment #5 by andrej.mitrovich — 2013-02-27T07:59:32Z
(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?
Comment #6 by verylonglogin.reg — 2013-02-27T08:43:58Z
(In reply to comment #5) > I mean your code? dmd main.d
Comment #7 by verylonglogin.reg — 2013-02-27T09:32:29Z
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.
Comment #8 by andrej.mitrovich — 2013-02-27T09:53:46Z
(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.