Bug 12775 – GIT HEAD : Linker errors after some commit

Status
RESOLVED
Resolution
WORKSFORME
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2014-05-20T16:08:00Z
Last change time
2014-06-08T05:03:36Z
Assigned to
nobody
Creator
temtaime

Comments

Comment #0 by temtaime — 2014-05-20T16:08:08Z
I cannot build phobos with druntime because of following errors. bin\phobos.lib: Error: multiple definition of traits: _D4core8internal6traits7__arrayZ and convert: _D4core8internal6traits7__arrayZ bin\phobos.lib: Error: multiple definition of traits: _D4core8internal6traits8__assertFiZv and convert: _D4core8internal6traits8__assertFiZv bin\phobos.lib: Error: multiple definition of traits: _D4core8internal6traits15__unittest_failFiZv and convert: _D4core8internal6traits15__unittest_failFiZv bin\phobos.lib: Error: multiple definition of stdarg: _D4core4stdc6stdarg7__arrayZ and demangle: _D4core4stdc6stdarg7__arrayZ bin\phobos.lib: Error: multiple definition of stdarg: _D4core4stdc6stdarg8__assertFiZv and demangle: _D4core4stdc6stdarg8__assertFiZv bin\phobos.lib: Error: multiple definition of stdarg: _D4core4stdc6stdarg15__unittest_failFiZv and demangle: _D4core4stdc6stdarg15__unittest_failFiZv bin\phobos.lib: Error: multiple definition of stdint: _D4core4stdc6stdint7__arrayZ and demangle: _D4core4stdc6stdint7__arrayZ bin\phobos.lib: Error: multiple definition of stdint: _D4core4stdc6stdint8__assertFiZv and demangle: _D4core4stdc6stdint8__assertFiZv bin\phobos.lib: Error: multiple definition of stdint: _D4core4stdc6stdint15__unittest_failFiZv and demangle: _D4core4stdc6stdint15__unittest_failFiZv bin\phobos.lib: Error: multiple definition of mutex: _D4core4sync5mutex7__arrayZ and barrier: _D4core4sync5mutex7__arrayZ bin\phobos.lib: Error: multiple definition of mutex: _D4core4sync5mutex8__assertFiZv and barrier: _D4core4sync5mutex8__assertFiZv bin\phobos.lib: Error: multiple definition of mutex: _D4core4sync5mutex15__unittest_failFiZv and barrier: _D4core4sync5mutex15__unittest_failFiZv bin\phobos.lib: Error: multiple definition of time: _D4core4time7__arrayZ and barrier: _D4core4time7__arrayZ bin\phobos.lib: Error: multiple definition of time: _D4core4time8__assertFiZv and barrier: _D4core4time8__assertFiZv bin\phobos.lib: Error: multiple definition of time: _D4core4time15__unittest_failFiZv and barrier: _D4core4time15__unittest_failFiZv bin\phobos.lib: Error: multiple definition of object_: _D6object7__arrayZ and atomic: _D6object7__arrayZ bin\phobos.lib: Error: multiple definition of object_: _D6object8__assertFiZv and atomic: _D6object8__assertFiZv bin\phobos.lib: Error: multiple definition of object_: _D6object15__unittest_failFiZv and atomic: _D6object15__unittest_failFiZv bin\phobos.lib: Error: multiple definition of deh_win32: _D2rt9deh_win327__arrayZ and dll: _D2rt9deh_win327__arrayZ bin\phobos.lib: Error: multiple definition of deh_win32: _D2rt9deh_win328__assertFiZv and dll: _D2rt9deh_win328__assertFiZv bin\phobos.lib: Error: multiple definition of deh_win32: _D2rt9deh_win3215__unittest_failFiZv and dll: _D2rt9deh_win3215__unittest_failFiZv
Comment #1 by temtaime — 2014-05-20T16:27:03Z
6d1882663b51dd72edeb62d78f2b23739713c3d5 seems causes that error. Can someone prove it or ever build dmd on windows right now ?
Comment #2 by andrej.mitrovich — 2014-05-20T16:39:23Z
Try to do a clean build. It works ok for me locally and the autotester is currently green: https://auto-tester.puremagic.com/
Comment #3 by andrej.mitrovich — 2014-05-20T16:44:31Z
I do however get a linker failure when using VC. Note that VC builds are not tested in the autotester. Log: ----- 2>parse.obj : error LNK2001: unresolved external symbol "public: __thiscall Nspace::Nspace(st ruct Loc,class Identifier *,struct Array<class Dsymbol *> *)" (??0Nspace@@QAE@ULoc@@PAVIden tifier@@PAU?$Array@PAVDsymbol@@@@@Z) [C:\dmd-git\dmd2\src\dmd\src\dmd_msc.vcxproj] 2>vcbuild\Win32\Release\dmd_msc.exe : fatal error LNK1120: 1 unresolved externals [C:\dmd-git \dmd2\src\dmd\src\dmd_msc.vcxproj] 2>Done Building Project "C:\dmd-git\dmd2\src\dmd\src\dmd_msc.vcxproj" (default targets) -- FA ILED. 1>Done Building Project "C:\dmd-git\dmd2\src\dmd\src\dmd_msc_vs10.sln" (default targets) -- F AILED. Build FAILED. "C:\dmd-git\dmd2\src\dmd\src\dmd_msc_vs10.sln" (default target) (1) -> "C:\dmd-git\dmd2\src\dmd\src\dmd_msc.vcxproj" (default target) (2) -> (Link target) -> parse.obj : error LNK2001: unresolved external symbol "public: __thiscall Nspace::Nspace( struct Loc,class Identifier *,struct Array<class Dsymbol *> *)" (??0Nspace@@QAE@ULoc@@PAVId entifier@@PAU?$Array@PAVDsymbol@@@@@Z) [C:\dmd-git\dmd2\src\dmd\src\dmd_msc.vcxproj] vcbuild\Win32\Release\dmd_msc.exe : fatal error LNK1120: 1 unresolved externals [C:\dmd-g it\dmd2\src\dmd\src\dmd_msc.vcxproj] 0 Warning(s) 2 Error(s) -----
Comment #4 by temtaime — 2014-05-30T08:08:59Z
I tried and modified my build files to add nspace. DMD build OK, but not phobos. How autotester can build DMD when there is #12755 ??? Someone can explain?
Comment #5 by yebblies — 2014-05-30T08:40:28Z
(In reply to Temtaime from comment #4) > I tried and modified my build files to add nspace. DMD build OK, but not > phobos. > How autotester can build DMD when there is #12755 ??? > Someone can explain? Because the issue is with your setup, not the upstream repositories. You need to pull the latest commits, clean everything, then rebuild DMD, druntime and phobos in that order.
Comment #6 by temtaime — 2014-05-30T09:12:18Z
AS for #12755 https://github.com/D-Programming-Language/druntime/blob/master/src/core/thread.di#L596 extern (C) void thread_scanAll( scope ScanAllThreadsFn scan ); https://github.com/D-Programming-Language/druntime/blob/master/src/core/thread.d#L2575 extern (C) void thread_scanAll( scope ScanAllThreadsFn scan ) nothrow Maybe something wrong with YOUR autotester instead ? I many times built DMD. I had multiple times checked my configuration for cleanness.
Comment #7 by yebblies — 2014-05-30T11:05:57Z
(In reply to Temtaime from comment #6) > AS for #12755 > > https://github.com/D-Programming-Language/druntime/blob/master/src/core/ > thread.di#L596 > > extern (C) void thread_scanAll( scope ScanAllThreadsFn scan ); > > https://github.com/D-Programming-Language/druntime/blob/master/src/core/ > thread.d#L2575 > > extern (C) void thread_scanAll( scope ScanAllThreadsFn scan ) nothrow > nothrow does not affect mangling of extern(C) functions. > Maybe something wrong with YOUR autotester instead ? That really doesn't seem very likely. > I many times built DMD. > > I had multiple times checked my configuration for cleanness. My guess is that druntime is not being rebuilt correctly, or phobos is being built with the wrong dmd. You can try things like renaming druntime.lib/phobos.lib so they are ignored or clearing PATH.
Comment #8 by yebblies — 2014-06-08T05:03:36Z
Closing since nobody can reproduce. Looks like a local setup problem.