workaround for `The module 'foo.bar' is already defined` when recompiling objects?

timotheecour via Digitalmars-d digitalmars-d at puremagic.com
Sun Jun 11 00:09:33 PDT 2017


On Sunday, 11 June 2017 at 05:21:23 UTC, Timothee Cour wrote:
> ```

NOTE: this is on linux, and the above simple case doesn't 
reproduce
the error, but my test case is similar albeit from a larger 
program
that's hard to reduce.

the code that crashes is in druntime:
/**
  * Check for module collisions. A module in a shared library 
collides
  * with an existing module if it's ModuleInfo is interposed 
(search
  * symbol interposition) by another DSO.  Therefor two modules 
with the
  * same name do not collide if their DSOs are in separate symbol 
resolution
  * chains.
  */
void checkModuleCollisions(in ref dl_phdr_info info, in
immutable(ModuleInfo)*[] modules,
                            in void[] copyRelocSection) nothrow

Could someone please explain:

* what that means
* what's the simplest example that would exhibit this error
* what's a workaround ? (where i want to do partial recompilation)


More information about the Digitalmars-d mailing list