Bug 13774 – Multiple definition of `conv_50c_dc8` with three libraries and `std.file` import

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-11-25T13:57:39Z
Last change time
2019-07-23T01:29:58Z
Keywords
link-failure, pull, rejects-valid
Assigned to
Martin Nowak
Creator
Denis Shelomovskii

Comments

Comment #0 by verylonglogin.reg — 2014-11-25T13:57:39Z
The first library is Phobos. This code should build fine: m1.d & m2.d: --- import std.file; --- Command (for Windows): --- dmd -debug -lib m1.d dmd -debug -lib m2.d m1.lib --- m2.lib: Error: multiple definition of conv_50c_dc8: _D3std4conv52__T18emplaceInitializerTSАЕдfile15DirIterato∙АГкZАФ▒FNaNbNcNeKАЬ║4iАГ▓yАЫв and conv: _D3std4conv52__T18emplaceInitializerTSАЕдfile15DirIterato∙АГкZАФ▒FNaNbNcNeKАЬ║4iАГ▓yАЫв --- (command output is probably encoded in CP1251) This issue almost blocks Phobos usage in real projects as it breaks building libraries and linker error doesn't give any clue of its reason. Also see Issue 13359. Note: this report is about Phobos regression preventing its usage. Underlying compiler bug is some critical bug triggered by current Phobos version. Tools versions: dmd: c0e814350948feac34946c29186d17518ea954dd druntime: 2350ee4ec77d7b919454eb2f16d91b23c3891cb6 phobos: e46ccaae82d6ddbd0c98ac233562204c7007f296
Comment #1 by dlang-bugzilla — 2014-12-02T11:51:08Z
Comment #2 by code — 2014-12-02T23:04:15Z
(In reply to Vladimir Panteleev from comment #1) > Introduced in https://github.com/D-Programming-Language/dmd/pull/4102 This is actually caused by https://github.com/D-Programming-Language/dmd/pull/4099. The 4102 pull just fixed the collision detection, therefor it was identified when bisecting. The conflicting symbol is now added as COMDEF which (incorrectly?) doesn't set the pickAny parameter. https://github.com/D-Programming-Language/dmd/pull/4187
Comment #3 by github-bugzilla — 2014-12-03T04:44:26Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/7de68cd70f4f2b55f0ad9b98a217558f68b0e1c2 fix Issue 13774 - Multiple definition of ... - COMDEF symbols should set pickAny when being added to a library https://github.com/D-Programming-Language/dmd/commit/2044fdb74cf8328fd01b2d40dfbd8bc08185fefe Merge pull request #4187 from MartinNowak/fix13774 fix Issue 13774 - Multiple definition of ...
Comment #4 by github-bugzilla — 2014-12-03T11:15:23Z
Comment #5 by github-bugzilla — 2014-12-03T13:02:30Z
Comment #6 by github-bugzilla — 2015-02-18T03:40:45Z
Comment #7 by b2.temp — 2019-07-23T01:29:58Z
*** Issue 13359 has been marked as a duplicate of this issue. ***