[Issue 424] Unexpected OPTLINK Termination at EIP=0044C37B

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Oct 15 20:07:49 PDT 2006


http://d.puremagic.com/issues/show_bug.cgi?id=424





------- Comment #2 from someanon at yahoo.com  2006-10-15 22:07 -------
(In reply to comment #1)
> While important, I don't think it's a blocker. 30,000 lines of code in one
> module is unusually large, and can be split into smaller source files.
> 

It is a blocker at least for one user :-)

OK, let me elaborate a little more where I come from, and all the problems I've
encountered:

When I started to use D on a hobby project, I organize the source code into
modules as everyone typically does, but because of bug 386:

http://d.puremagic.com/issues/show_bug.cgi?id=386

I was so frustrated that I cannot get my code compile separately, and the
compiler error message is useless, each time I spent hours and hours on them
and cannot get them fixed. So I write some script to concat all my source files
(togather with some generated ones) into a single huge .d file, and comment out
all the 'module' and 'import' statements.  Then everything works.

After bug 386 is fixed. I tried to compile each source file separately again,
now I no longer have 'import conflicts' problems, but I still cannot get many
of the file compiled, the compiler just hangs: I guess it run into some
infinite loop.  But unfortunately I cannot isolate the issue to send you a test
case.

(search "infinite loop" on digitalmars.com will show some user report: e.g.
http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=42668
But I'm not sure, it's the same issue as mine.)

Then I went back to my original approach to generate a huge source file (and it
works); but maybe as my project grows, at certain point, it stops to link on
Windows.  (On Linux, it's fine).

And this is a OPTLINK problem. I hope you can fix it. Or as a workaround: if
the generate obj is too large (> 16,000 fixups, I really don't understand what
does it mean), can the compiler split the obj into several obj files? e.g.
foo1.obj, foo2.obj, ...

If you ask the user the split the generated source files, first it's tedious,
and it maybe run into some compiler problem, like the import one again.

So please fix this issue:

1) remove the (> 16,000 fixups) constraint.  It is a bug anyway.
2) or, the compiler automatically generate multiple .obj files, if (> 16,000
fixups)

Thanks.


-- 




More information about the Digitalmars-d-bugs mailing list