D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 888 - -cov and _ModuleInfo linking bugs
Summary: -cov and _ModuleInfo linking bugs
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Linux
: P1 major
Assignee: Walter Bright
URL:
Keywords: link-failure
Depends on:
Blocks:
 
Reported: 2007-01-25 20:42 UTC by sa
Modified: 2013-11-15 20:30 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description sa 2007-01-25 20:42:31 UTC
On Linux, compile with -cov, then there's link error:

http://www.digitalmars.com/d/archives/digitalmars/D/bugs/6712.html

:(.data+0x93bc): more undefined references to `_D3std1c6stdlib12__ModuleInfoZ' follow
Comment 1 sa 2007-01-25 20:45:42 UTC
Same problem, tried with lastest 1.002.

Seems happen with large bases of code.

Small examples on: http://digitalmars.com/d/code_coverage.html 
works.
Comment 2 Walter Bright 2007-02-12 03:41:21 UTC
Fixed DMD 1.005
Comment 3 David Ferenczi 2007-02-16 12:35:18 UTC
Problem still exists with dmd-1.005
Comment 4 sa 2008-03-14 16:27:11 UTC
This problem still exist on Linux with v2.012.

Again, the small example sieve.d works fine; but bigger programs won't link.

Since this bug has been around for a while, raise the priority.
Comment 5 sa 2008-03-14 16:31:11 UTC
And error msg:

/project/dmd/bin/../lib/libphobos2.a(gc.o):(.data+0x30): multiple definition of `_D3std2gc12__ModuleInfoZ'

/project/dmd/bin/../lib/libphobos2.a(gc.o):(.data+0x0):first defined here

‘_D3std1c4time12__ModuleInfoZ’undefined

more undefined references to `_D3std1c6stdlib12__ModuleInfoZ' follow
Comment 6 sa 2008-03-14 16:35:06 UTC
I checked the library:

$ nm ../dmd/lib/libphobos2.a | grep _D3std1c4time12__ModuleInfoZ
$ nm ../dmd/lib/libphobos2.a | grep _D3std1c6stdlib12__ModuleInfoZ

$ nm ../dmd/lib/libphobos2.a | grep _D3std2gc12__ModuleInfoZ
00000000 D _D3std2gc12__ModuleInfoZ
00000030 D _D3std2gc12__ModuleInfoZ
         U _D3std2gc12__ModuleInfoZ
Comment 7 David Ferenczi 2009-09-10 06:01:02 UTC
I don't encounter the problem with v2.032 on Linux.
Comment 8 Andrej Mitrovic 2013-01-22 11:08:24 UTC
Status of this? Close with WORKSFORME if it's fixed.
Comment 9 Andrei Alexandrescu 2013-11-15 20:30:30 UTC
Please reopen if necessary.