strange bug: (not) calling module ctors; help with "master" needed

Steven Schveighoffer via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jul 19 08:18:20 PDT 2016


On 7/19/16 11:08 AM, ketmar wrote:
> i'm using git master (updated daily), and recently found very strange
> thing.
>
> when i'm linking my programs with libphobos2.a, module ctor from
> "std.internal.phobosinit" is not called, but when i'm linking with .so,
> everything is ok.
>
> it is easy to check: `EncodingScheme.create("utf-8")` will fail if ctor
> is not called (as all that ctor does currently is registering codecs
> from std.encoding).
>
> i guess that not many people is using that, so it may slip unnoticed for
> some time. that, or something is very wrong with my local system (which
> is possible too, of course).
>
> so please, if somebody can build dmd master and check it to confirm (i
> hope ;-) the results, i'd be very grateful.
>
> my system is 32-bit GNU/Linux, with gold linker.
>
> switching between libs is done in dmd.conf, with:
> DFLAGS=-defaultlib=libphobos2.a
> or
> DFLAGS=-defaultlib=libphobos2.so

It's affecting phobos devs too, we are aware of the issue:

https://issues.dlang.org/show_bug.cgi?id=16291

Please add what you can to the report.

-Steve


More information about the Digitalmars-d-learn mailing list