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

2016-07-19 Thread ketmar via Digitalmars-d-learn
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.


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

2016-07-19 Thread ketmar via Digitalmars-d-learn
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=16291


i 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...


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

2016-07-19 Thread Steven Schveighoffer via Digitalmars-d-learn

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


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

2016-07-19 Thread ketmar via Digitalmars-d-learn
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