Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #1095 (closed defect: worksforme)

Opened 2 months ago

Last modified 1 month ago

xml document fails

Reported by: tdimiduk Assigned to: larsivi
Priority: major Milestone: 0.99.7
Component: Tango Version: 0.99.6 Jeff
Keywords: xml.document x86_64 gdc 0.24 Cc:

Description

I just installed tango 0.99.6 with the installer tango-0.99.6-gdcr214-forDSSS-gdc-x86_64-unknown-linux-gnu.sh and was trying to use the xml parser as stated in this example: http://www.dsource.org/projects/tango/wiki/Almanac/tango.text.xml/XPathQuickstart

I have also tried running it with a minimal program just

import tango.text.xml.Document;

void main () {

auto doc = new Document!(char);

}

In both cases, when I try to compile it with dsss I get a long list of errors relating to inability to do static initializers, I am attaching the compiler output I get.

Attachments

error.txt (5.8 kB) - added by tdimiduk on 05/09/08 11:15:04.

Change History

05/09/08 11:15:04 changed by tdimiduk

  • attachment error.txt added.

05/09/08 13:56:09 changed by larsivi

  • keywords changed from xml.document to xml.document x86_64.
  • owner changed from kris to larsivi.
  • status changed from new to assigned.

Hmm, this seems to possibly be specific to GDC x86_64 as it works with both DMD and GDC on 32 bit linux.

FWIW, I suspect that this is a problem with static initializers, and it would be good if anyone could try to create a minimal bug report, presumably for GDC.

05/21/08 11:48:49 changed by tdimiduk

I have pruned the code down to a minimal bug that gies the static initializer error:

public alias NodeImpl?* Node;

struct Visitor {

Node node;

}

struct NodeImpl? { }

void main () {

Node x; Visitor v = {x};

}

I have tested this on gdc 0.24 on both 64 and 32 bit linux, and both give the same error. Have I confused something, is this code valid D (I am still fairly new to the language)? If this is supposed to be valid I can submit it as a bug to gdc, or you can feel free to.

Hope this is helpful.

05/21/08 13:03:18 changed by larsivi

The above example compiles with

dmd -c xmlfoo.d

and

gdc -c xmlfoo.d

where DMD is 1.029 and GDC gdc (GCC) 4.1.3 20070831 (prerelease gdc 0.25, using dmd 1.021) (Ubuntu 0.25-4.1.2-16ubuntu1)

(this is on 32 bit linux) and so I assume that it is a problem with GDC 0.24 which is truly bad release. Will investigate a touch more before closing this.

05/21/08 13:06:11 changed by larsivi

  • keywords changed from xml.document x86_64 to xml.document x86_64 gdc 0.24.
  • status changed from assigned to closed.
  • resolution set to worksforme.

And it also compiles on the 64 bit system I have access to, closing.

05/23/08 13:21:24 changed by tdimiduk

Thank you for your investigation of this bug. I will look into upgrading to the prerelease gdc. Sorry for wasting your time with a bug that turned out to not be your fault.