digitalmars.D.learn - strange bug: (not) calling module ctors; help with "master" needed
- ketmar (18/18) Jul 19 2016 i'm using git master (updated daily), and recently found very
- Steven Schveighoffer (5/23) Jul 19 2016 It's affecting phobos devs too, we are aware of the issue:
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
Jul 19 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.soIt'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
Jul 19 2016
On Tuesday, 19 July 2016 at 15:18:20 UTC, Steven Schveighoffer wrote:It's affecting phobos devs too, we are aware of the issue: https://issues.dlang.org/show_bug.cgi?id=16291i see, thank you. my searching foo failed to find that issue. i guess i have to use digger to find the commit that broke that... oh...
Jul 19 2016
On Tuesday, 19 July 2016 at 15:18:20 UTC, Steven Schveighoffer wrote:Please add what you can to the report.ok, i found why it doesn't work with static libs. not sure what to do next, though... added the info to bugzilla.
Jul 19 2016