Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

Ticket #410 (closed defect: fixed)

Opened 14 years ago

Last modified 13 years ago

[Bug] LDC can not build gtkd

Reported by: bioinfornatics Assigned to: mwarning
Priority: major Milestone:
Component: unspecified Version: hg tip
Keywords: Cc: bioinfornatics@gmail.com

Description

i would like package gtkd for D programming with ldc but after talk with developper he said with ldc we can't build.

link ==> http://dsource.org/forums/viewtopic.php?t=5223
ticket ==> http://www.dsource.org/projects/gtkd/ticket/88

Attachments

gtkd_ldc_workaround.patch (35.8 kB) - added by john_i_ on 12/16/10 22:32:38.

Change History

07/09/10 21:53:24 changed by mwarning

Atm. ldc is based on the DMD 1.057 frontend, but dmd 1.057 works => it's no bug in the dmd frontend sources.

Here is the error I get using gtkD-1.3.2.zip:

ldc -O -Isrc -c src/gio/SimpleAsyncResult.d -ofsrc/gio/SimpleAsyncResult.o
ldc -O -Isrc -c src/gio/MountT.d -ofsrc/gio/MountT.o
src/gio/Mount.d(71): Error: class gio.Mount.Mount unable to resolve forward reference in definition
make: *** [src/gio/MountT.o] Error 1

08/03/10 21:51:37 changed by klickverbot

Just a quick note: There are still a couple of forward reference-related DStress regressions compared to DMD which could be a valuable tool for tracking this one down.

12/16/10 22:32:38 changed by john_i_

  • attachment gtkd_ldc_workaround.patch added.

12/16/10 22:33:43 changed by john_i_

I think I have tracked down the cause of this error, though I don't know how to fix ldc itself.

The problem appears to be the use of the template mixin feature in src/gio/Mount.d src/gio/SocketAddress.d and src/gio/Volume.d

They each use mixin to include the components of templates. From reading the D language specs, I think this usage of mixin it basically has the effect of including the contents of the templates inline with the class.

As a workaround, I commented out the "mixin", and in its place, copied and pasted the members of the templates they are using mixin on.

The attached patch to gtkD will allow it to compile on ldc, and the gtkd "TestWindow?" demo app to work.

So, my belief is that something is broken in ldc's implementation of "mixin" when used this way. I hope this helps solve the problem.

01/03/11 12:54:20 changed by klickverbot

Has somebody already managed to reduce this to a small test case suitable for actually debugging the compiler?

(follow-up: ↓ 6 ) 01/03/11 21:39:14 changed by bioinfornatics

with gtkd revision 797 i have this error:

ldc -g -O -op -inline -d -c -I .. Volume.d -Hd ../include/gtkd/gio -od ../../build/gtkd/gio/ -of Volume.o
../gio/Mount.d(71): Error: class gio.Mount.Mount interface function MountIF.getDefaultLocation isn't implemented

which revision you use?

(in reply to: ↑ 5 ) 01/04/11 22:10:03 changed by john_i_

bioinfornatics:

I used the current release of gtkd, 1.3.2.

klickverbot:

I will try to reproduce the problem in a small example.

01/04/11 22:23:04 changed by mwarning

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in this merge from the ldc2 branch: http://bitbucket.org/lindquist/ldc/changeset/deb477f5a16b

Copyright © 2008, LDC Development Team.