Cycle detected between modules with ctors/dtors

Mandeep mandeep at brars.co.in
Mon Apr 25 11:07:28 PDT 2011


On 04/25/2011 07:56 PM, Steven Schveighoffer wrote:
> On Sat, 23 Apr 2011 02:16:22 -0400, Mandeep <mandeep at brars.co.in> wrote:
>
>> Hi,
>>
>> I am trying to compile the code that was working with dmd 2.050 using
>> dmd 2.052.
>>
>> The code compiles but it gives me errors with message when trying to run:
>>
>> Cycle detected between modules with ctors/dtors
>
> The cyclic module import code was changed significantly in 2.051, due to
> this bug:
>
> http://d.puremagic.com/issues/show_bug.cgi?id=4384
>
> I would appreciate if you think the cycle is not correct to post a case
> of where cycle detection is flagging a cycle that shouldn't be
> considered a cycle.
>
> -Steve

The cases i could find were  pieces of bigger codebase with cycles 
coming out of more than 4-5 files with lot of code. I tried to repeat 
the code sequence with a couple of files with simplistic function but 
was not able to come out with a smaller test case for the above. Would 
try to come up with a test case again if i can. But i think moving 
around the code from static constructors as suggested in an earlier post 
in the thread helped.

Also, I think that the cyclic const/dest have a problem, because the 
same code was working find with 2.050.

Another bit of diff from my older scenario is that 2.050 was on 32 bit 
and i am using -m64 with 2.052, which i am not sure should be a problem.

Regards
Mandeep


More information about the Digitalmars-d-learn mailing list