digitalmars.D.bugs - [Issue 3266] New: rdmd links core.thread twice
- d-bugmail puremagic.com (35/35) Aug 27 2009 http://d.puremagic.com/issues/show_bug.cgi?id=3266
- d-bugmail puremagic.com (9/9) Aug 27 2009 http://d.puremagic.com/issues/show_bug.cgi?id=3266
- d-bugmail puremagic.com (12/12) Jan 09 2011 http://d.puremagic.com/issues/show_bug.cgi?id=3266
http://d.puremagic.com/issues/show_bug.cgi?id=3266
Summary: rdmd links core.thread twice
Product: D
Version: 2.031
Platform: Other
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P2
Component: DMD
AssignedTo: nobody puremagic.com
ReportedBy: lat7h virginia.edu
Consider the following minimal code in threadbug.d:
import core.thread;
void main() { }
Running
rdmd threadbug.d
gives many linker error messages stating that the core.thread functions are
present in both the rdmd-generated temporary "threadbug.o" and the libphobos1.a
library file; for instance:
/usr/opt/dmd2/linux/lib/libphobos2.a(thread_42_258.o): In function
`_D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread':
core/thread.d:(.text._D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread+0x0):
multiple definition of
`_D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread'
/tmp/rdmd-threadbug.d-90B05FDCCD9547CEC2BBFC3765364CC0/threadbug.o:/usr/opt/dmd2/src/druntime/import/core/sys/posix/sched.d:(.text._D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread+0x0):
first defined here
Running
dmd -run threadbug.d
gives no errors.
It appears that rdmd's include-all-dependencies-in-the-o-file approach lacks
the proper exception for core.thread.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 27 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3266
Andrei Alexandrescu <andrei metalanguage.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |andrei metalanguage.com
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 27 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3266
Andrei Alexandrescu <andrei metalanguage.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
08:50:13 PST ---
This has been fixed a while ago. rdmd considers any module starting with
"core." a library module.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 09 2011









d-bugmail puremagic.com 