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

Ticket #336 (closed defect: fixed)

Opened 17 years ago

Last modified 16 years ago

Compilation errors with tango on x86_64

Reported by: Nietsnie Assigned to: kris
Priority: major Milestone: 0.99.3
Component: Core Functionality Version: 0.99.2 Don
Keywords: Cc:

Description (Last modified by sean)

From examples:

$ dsss build -I../
conduits/fileops.d => conduits/fileops
+ /usr/bin/rebuild -Idsss_imports/ -I. -S./ -I/usr/include/d -S/usr/lib/ -I../   -oqdsss_objs  conduits/fileops.d -ofconduits/fileops
WARNING: Module (null) does not have a module declaration. This can cause problems
         with rebuild's -oq option. If an error occurs, fix this first.
../tango/io/Print.d:120: function tango.text.convert.Layout.Layout!(char).Layout.convert (char[],...) does not match parameter types (uint delegate(char[]),TypeInfo[],ubyte[24][1],char[])
../tango/io/Print.d:120: Error: cannot implicitly convert expression (_argptr) of type ubyte[24][1] to char*
../tango/io/Print.d:132: function tango.text.convert.Layout.Layout!(char).Layout.convert (char[],...) does not match parameter types (uint delegate(char[]),TypeInfo[],ubyte[24][1],char[])
../tango/io/Print.d:132: Error: cannot implicitly convert expression (_argptr) of type ubyte[24][1] to char*
../tango/io/Print.d:165: function tango.text.convert.Layout.Layout!(char).Layout.convert (char[],...) does not match parameter types (uint delegate(char[]),TypeInfo[],ubyte[24][1],char[])
../tango/io/Print.d:165: Error: cannot implicitly convert expression (_argptr) of type ubyte[24][1] to char*
../tango/text/convert/Layout.d:129: function tango.text.convert.Layout.Layout!(char).Layout.convert (char[],...) does not match parameter types (TypeInfo[],ubyte[24][1],char[])
../tango/text/convert/Layout.d:129: Error: cannot implicitly convert expression (_arguments) of type TypeInfo[] to uint delegate(char[])
../tango/text/convert/Layout.d:129: Error: cannot implicitly convert expression (_argptr) of type ubyte[24][1] to TypeInfo[]
../tango/text/convert/Layout.d:129: Error: cannot implicitly convert expression (formatStr) of type char[] to char*
../tango/text/convert/Layout.d:129: Error: expected 4 arguments, not 3
../tango/text/convert/Layout.d:129: Error: cannot implicitly convert expression ((this.convert)(cast(uint delegate(char[]))_arguments,cast(TypeInfo[])_argptr,cast(char*)formatStr)) of type uint to char[]
../tango/text/convert/Layout.d:138: function tango.text.convert.Layout.Layout!(char).Layout.convert (char[],...) does not match parameter types (uint delegate(char[]),TypeInfo[],ubyte[24][1],char[])
../tango/text/convert/Layout.d:138: Error: cannot implicitly convert expression (_argptr) of type ubyte[24][1] to char*
Command /usr/bin/rebuild returned with exitcode 256, aborting.

Attachments

size_t.d (1.9 kB) - added by r.lph50 on 10/31/07 12:13:43.
Replace uint *ate with size_t *ate

Change History

03/16/07 22:15:52 changed by sean

  • description changed.

03/16/07 22:18:01 changed by sean

  • owner changed from sean to kris.

This seems potentially more of an issue with Layout than with how varargs are now handled in GDC. I'm going to hand this one off to Kris and maybe we can work together to find a solution.

06/02/07 08:23:30 changed by kris

  • status changed from new to assigned.
  • milestone set to 1.0.

GDC problem :(

(follow-up: ↓ 5 ) 08/28/07 06:35:37 changed by kris

does this still occur with GDC 0.24 ?

(in reply to: ↑ 4 ) 09/05/07 16:28:41 changed by Cyborg16

Replying to kris:

does this still occur with GDC 0.24 ?

Assuming this is the same problem I had (when trying to import tango.io.Console or other modules using Layout), it now works with gdc 0.24 and tango-src-SNAPSHOT-20070904. Can't really confirm it's the same bug though.

(follow-up: ↓ 11 ) 09/09/07 20:07:35 changed by kris

thx, cyborg16

(follow-up: ↓ 8 ) 09/12/07 18:08:13 changed by Nietsnie

Compilation seems to work now. Getting segfaults however :)

(in reply to: ↑ 7 ) 09/12/07 18:22:11 changed by kris

Replying to Nietsnie:

Compilation seems to work now. Getting segfaults however :)

Does the unittest in tango.text.convert.Layout pass?

(follow-up: ↓ 10 ) 09/12/07 19:30:15 changed by Nietsnie

Not sure it seems I may have broken something locally for 64bit (oops):

$ gdmd tango/text/convert/Layout.d -unittest -debug=UnitTest? tango/text/convert/Layout.d:0: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugs.gentoo.org/> for instructions.

(in reply to: ↑ 9 ) 09/18/07 16:19:45 changed by Cyborg16

Exactly the same here. I've just upgraded tango to 0.99.1 RC4, but had a similar problem with SNAPSHOT-20070904. I expect it's gdc, and I don't think I've broken it.

(in reply to: ↑ 6 ) 09/18/07 16:22:29 changed by Cyborg16

About what I said above, I think it only worked because Console no longer includes convert.Layout; I'm sure I still had problems with that file but neglected to say so before (thinking it was a different issue).

09/18/07 17:31:24 changed by miasma

FWIW, I filed a ticket about the Segfault bug via the D issue tracker few days ago. I was using the svn version of Tango. This seems to be a bug in GDC with varargs.

(follow-up: ↓ 14 ) 09/18/07 17:32:18 changed by kris

Did Console ever import Layout? If it did, that was a mistake, since Console.d is unformatted output. Just checking ...

(in reply to: ↑ 13 ) 09/19/07 16:03:03 changed by Cyborg16

Not sure tbh, but if it did it was an older version.

10/12/07 06:19:06 changed by kris

Added David Brown's patch for X86_64 (yes it's ugly, but it works until GDC is fixed)

10/31/07 12:13:43 changed by r.lph50

  • attachment size_t.d added.

Replace uint *ate with size_t *ate

10/31/07 12:16:14 changed by r.lph50

I've attached a patch which lets tango compile with my GDC on my x86_64 system. Only was a problem because something in tango.text.Unicode was passing in a size_t, but I think it is better as patched.

10/31/07 17:17:03 changed by kris

Thanks; I'll merge that tonight

11/01/07 03:24:11 changed by kris

(unicode should be patched instead of Utf)

11/03/07 03:10:35 changed by r.lph50

Hmm, is there a reason uint is used everywhere rather than size_t?

11/03/07 21:29:44 changed by kris

  • status changed from assigned to closed.
  • version set to 0.99.2 Don.
  • resolution set to fixed.
  • milestone changed from 1.0 to 0.99.3.

Closing fixes made so far. Reopen, or create another ticket if additional related issues come up.