www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Tango ready?

reply Joseph Bell <josephabell tx.rr.com> writes:
I tried downloading tango beta .95 and get it to install both under my 
gdc installation and dmd installation.  Both failed miserablly using 
lib/install-dmd.sh and lib/install-gdc.sh

 From the dmd installation it bombed here:
gcc -c -O -m32 critical.c -ocritical.o
dmd -c -release -O -inline -version=Posix -w deh2.d -ofdeh2.o
dmd -c -release -O -inline -version=Posix -w dmain2.d -ofdmain2.o
dmd -c -release -O -inline -version=Posix -w genobj.d -ofgenobj.o
dmd: toobj.c:315: virtual void ClassDeclaration::toObjFile(): Assertion 
`classinfo->structsize == 0x3C' failed.
make[1]: *** [genobj.o] Aborted
make[1]: Leaving directory `/usr/local/src/tango/lib/compiler/dmd'

 From the gdc installation it never would generate libtango.o in the lib 
directory.

Has anyone else successfully installed Tango?

Joe
Feb 03 2007
next sibling parent reply kris <foo bar.com> writes:
Joseph Bell wrote:
 I tried downloading tango beta .95 and get it to install both under my 
 gdc installation and dmd installation.  Both failed miserablly using 
 lib/install-dmd.sh and lib/install-gdc.sh
 
  From the dmd installation it bombed here:
 gcc -c -O -m32 critical.c -ocritical.o
 dmd -c -release -O -inline -version=Posix -w deh2.d -ofdeh2.o
 dmd -c -release -O -inline -version=Posix -w dmain2.d -ofdmain2.o
 dmd -c -release -O -inline -version=Posix -w genobj.d -ofgenobj.o
 dmd: toobj.c:315: virtual void ClassDeclaration::toObjFile(): Assertion 
 `classinfo->structsize == 0x3C' failed.
 make[1]: *** [genobj.o] Aborted
 make[1]: Leaving directory `/usr/local/src/tango/lib/compiler/dmd'
 
  From the gdc installation it never would generate libtango.o in the lib 
 directory.
 
 Has anyone else successfully installed Tango?
 
 Joe

Tango has a 1004 compatible runtime component. That particular assertion problem is a mismatch between the 1004 runtime and a pre-1004 compiler (dmd 1.0?). It's effectively the same thing as if you ran a dmd 1.0 with a phobos 1004 :) Hope that gets you going again! - Kris p.s. there's also forums at Tango which generally get a very quick response. The IRC channel is usually immediate, if you have an IRC client. All noted here: http://www.dsource.org/projects/tango/wiki/Contact
Feb 03 2007
parent reply Justin C Calvarese <technocrat7 gmail.com> writes:
kris wrote:
 Joseph Bell wrote:
 I tried downloading tango beta .95 and get it to install both under my 
 gdc installation and dmd installation.  Both failed miserablly using 
 lib/install-dmd.sh and lib/install-gdc.sh

  From the dmd installation it bombed here:
 gcc -c -O -m32 critical.c -ocritical.o
 dmd -c -release -O -inline -version=Posix -w deh2.d -ofdeh2.o
 dmd -c -release -O -inline -version=Posix -w dmain2.d -ofdmain2.o
 dmd -c -release -O -inline -version=Posix -w genobj.d -ofgenobj.o
 dmd: toobj.c:315: virtual void ClassDeclaration::toObjFile(): 
 Assertion `classinfo->structsize == 0x3C' failed.
 make[1]: *** [genobj.o] Aborted
 make[1]: Leaving directory `/usr/local/src/tango/lib/compiler/dmd'

  From the gdc installation it never would generate libtango.o in the 
 lib directory.

 Has anyone else successfully installed Tango?

 Joe

Tango has a 1004 compatible runtime component. That particular assertion problem is a mismatch between the 1004 runtime and a pre-1004 compiler (dmd 1.0?). It's effectively the same thing as if you ran a dmd 1.0 with a phobos 1004 :) Hope that gets you going again! - Kris

If Tango requires DMD 1.004+, I think it should say so on the relevant web page(s), such as one or more of these: http://www.dsource.org/projects/tango/wiki/Download http://www.dsource.org/projects/tango/wiki/TopicBuildingTango http://www.dsource.org/projects/tango/wiki/TopicInstallTango If it's already mentioned in bunch of other places, I'm sorry I missed them. -- jcc7
Feb 03 2007
parent reply kris <foo bar.com> writes:
Justin C Calvarese wrote:
 If Tango requires DMD 1.004+, I think it should say so on the relevant 
 web page(s), such as one or more of these:
 
 http://www.dsource.org/projects/tango/wiki/Download
 http://www.dsource.org/projects/tango/wiki/TopicBuildingTango
 http://www.dsource.org/projects/tango/wiki/TopicInstallTango
 
 If it's already mentioned in bunch of other places, I'm sorry I missed 
 them.
 

Done. Thanks!
Feb 04 2007
parent reply Frits van Bommel <fvbommel REMwOVExCAPSs.nl> writes:
kris wrote:
 Justin C Calvarese wrote:
 If Tango requires DMD 1.004+, I think it should say so on the relevant 
 web page(s), such as one or more of these:

 http://www.dsource.org/projects/tango/wiki/Download
 http://www.dsource.org/projects/tango/wiki/TopicBuildingTango
 http://www.dsource.org/projects/tango/wiki/TopicInstallTango

 If it's already mentioned in bunch of other places, I'm sorry I missed 
 them.

Done. Thanks!

From the download page: "The runtime portion of this release requires a v1.004 compatible compiler." Actually, that's just if you compiler actually *is* DMD, I think. In object.d, it has the v1.004 modification in a version(DigitalMars), so I think it'll probably break if used with a v1.004-compatible GDC... (Presumably this was done because GDC isn't v1.004-compatible yet?)
Feb 04 2007
next sibling parent Lars Ivar Igesund <larsivar igesund.net> writes:
Frits van Bommel wrote:

 kris wrote:
 Justin C Calvarese wrote:
 If Tango requires DMD 1.004+, I think it should say so on the relevant
 web page(s), such as one or more of these:

 http://www.dsource.org/projects/tango/wiki/Download
 http://www.dsource.org/projects/tango/wiki/TopicBuildingTango
 http://www.dsource.org/projects/tango/wiki/TopicInstallTango

 If it's already mentioned in bunch of other places, I'm sorry I missed
 them.

Done. Thanks!

From the download page: "The runtime portion of this release requires a v1.004 compatible compiler." Actually, that's just if you compiler actually *is* DMD, I think. In object.d, it has the v1.004 modification in a version(DigitalMars), so I think it'll probably break if used with a v1.004-compatible GDC... (Presumably this was done because GDC isn't v1.004-compatible yet?)

You're right about this of course :) I'll fix it soonish. Thanks! -- Lars Ivar Igesund blog at http://larsivi.net DSource & #D: larsivi Dancing the Tango
Feb 04 2007
prev sibling parent reply Carlos Santander <csantander619 gmail.com> writes:
Frits van Bommel escribió:
 kris wrote:
 Justin C Calvarese wrote:
 If Tango requires DMD 1.004+, I think it should say so on the 
 relevant web page(s), such as one or more of these:

 http://www.dsource.org/projects/tango/wiki/Download
 http://www.dsource.org/projects/tango/wiki/TopicBuildingTango
 http://www.dsource.org/projects/tango/wiki/TopicInstallTango

 If it's already mentioned in bunch of other places, I'm sorry I 
 missed them.

Done. Thanks!

From the download page: "The runtime portion of this release requires a v1.004 compatible compiler." Actually, that's just if you compiler actually *is* DMD, I think. In object.d, it has the v1.004 modification in a version(DigitalMars), so I think it'll probably break if used with a v1.004-compatible GDC... (Presumably this was done because GDC isn't v1.004-compatible yet?)

David updated it yesterday. The gdc-0.22-dev branch in svn is up to 1.004. -- Carlos Santander Bernal
Feb 04 2007
next sibling parent Joseph Bell <josephabell tx.rr.com> writes:
Thanks for all of the comments on both DMD and GDC - I didn't have the 
latest and greatest DMD so I moved it to the side and let the Tango 
installer take care of it.  All is well now.  Except for converting 
everything in my code :-)

Joe

Carlos Santander wrote:
 Frits van Bommel escribió:
 kris wrote:
 Justin C Calvarese wrote:
 If Tango requires DMD 1.004+, I think it should say so on the 
 relevant web page(s), such as one or more of these:

 http://www.dsource.org/projects/tango/wiki/Download
 http://www.dsource.org/projects/tango/wiki/TopicBuildingTango
 http://www.dsource.org/projects/tango/wiki/TopicInstallTango

 If it's already mentioned in bunch of other places, I'm sorry I 
 missed them.

Done. Thanks!

From the download page: "The runtime portion of this release requires a v1.004 compatible compiler." Actually, that's just if you compiler actually *is* DMD, I think. In object.d, it has the v1.004 modification in a version(DigitalMars), so I think it'll probably break if used with a v1.004-compatible GDC... (Presumably this was done because GDC isn't v1.004-compatible yet?)

David updated it yesterday. The gdc-0.22-dev branch in svn is up to 1.004.

Feb 04 2007
prev sibling parent reply Frits van Bommel <fvbommel REMwOVExCAPSs.nl> writes:
Carlos Santander wrote:
 Frits van Bommel escribió:
 kris wrote:
 Justin C Calvarese wrote:
 If Tango requires DMD 1.004+, I think it should say so on the 
 relevant web page(s), such as one or more of these:

 http://www.dsource.org/projects/tango/wiki/Download
 http://www.dsource.org/projects/tango/wiki/TopicBuildingTango
 http://www.dsource.org/projects/tango/wiki/TopicInstallTango

 If it's already mentioned in bunch of other places, I'm sorry I 
 missed them.

Done. Thanks!

From the download page: "The runtime portion of this release requires a v1.004 compatible compiler." Actually, that's just if you compiler actually *is* DMD, I think. In object.d, it has the v1.004 modification in a version(DigitalMars), so I think it'll probably break if used with a v1.004-compatible GDC... (Presumably this was done because GDC isn't v1.004-compatible yet?)

David updated it yesterday. The gdc-0.22-dev branch in svn is up to 1.004.

Then I'm willing to bet it won't work with current Tango unless it for some weird reason defines version=DigitalMars when parsing module 'object'. If I'm right, one of the error messages will be similar to "toobj.c:417: virtual void ClassDeclaration::toObjFile(): Assertion `classinfo->structsize == (0x3C+8)' failed." (that's the error DMD gave me when I tried to compile with an old object.d, with the line number changed to where the assertion is in the current gdc-0.22-dev branch) Tango's 'object' module is littered with version(DigitalMars) blocks to select stuff that changed in v1.004, and which the new gdc presumably will need as well. So in fact the current Tango release requires DMD v1.004 or GDC 0.21. Earlier GDC versions may also work if it's runtime-compatible, but that's about the extent of Tango portability between compilers at the moment.
Feb 04 2007
parent reply Lars Ivar Igesund <larsivar igesund.net> writes:
Frits van Bommel wrote:

 Carlos Santander wrote:
 Frits van Bommel escribió:
 kris wrote:
 Justin C Calvarese wrote:
 If Tango requires DMD 1.004+, I think it should say so on the
 relevant web page(s), such as one or more of these:

 http://www.dsource.org/projects/tango/wiki/Download
 http://www.dsource.org/projects/tango/wiki/TopicBuildingTango
 http://www.dsource.org/projects/tango/wiki/TopicInstallTango

 If it's already mentioned in bunch of other places, I'm sorry I
 missed them.

Done. Thanks!

From the download page: "The runtime portion of this release requires a v1.004 compatible compiler." Actually, that's just if you compiler actually *is* DMD, I think. In object.d, it has the v1.004 modification in a version(DigitalMars), so I think it'll probably break if used with a v1.004-compatible GDC... (Presumably this was done because GDC isn't v1.004-compatible yet?)

David updated it yesterday. The gdc-0.22-dev branch in svn is up to 1.004.

Then I'm willing to bet it won't work with current Tango unless it for some weird reason defines version=DigitalMars when parsing module 'object'. If I'm right, one of the error messages will be similar to "toobj.c:417: virtual void ClassDeclaration::toObjFile(): Assertion `classinfo->structsize == (0x3C+8)' failed." (that's the error DMD gave me when I tried to compile with an old object.d, with the line number changed to where the assertion is in the current gdc-0.22-dev branch) Tango's 'object' module is littered with version(DigitalMars) blocks to select stuff that changed in v1.004, and which the new gdc presumably will need as well. So in fact the current Tango release requires DMD v1.004 or GDC 0.21. Earlier GDC versions may also work if it's runtime-compatible, but that's about the extent of Tango portability between compilers at the moment.

Yes, we cannot require the user to use a compiler from SVN, neither update our codebase on it (if for nothing else than mantainance reasons). So the latest release needs GDC 0.21, and the Tango svn will not be updated until 0.22 is officially released. We may host contributed patches for those who want to follow the bleeding edge at all times, though. -- Lars Ivar Igesund blog at http://larsivi.net DSource & #D: larsivi Dancing the Tango
Feb 04 2007
parent Frits van Bommel <fvbommel REMwOVExCAPSs.nl> writes:
Lars Ivar Igesund wrote:
 Frits van Bommel wrote:
 So in fact the current Tango release requires DMD v1.004 or GDC 0.21.
 Earlier GDC versions may also work if it's runtime-compatible, but
 that's about the extent of Tango portability between compilers at the
 moment.

Yes, we cannot require the user to use a compiler from SVN, neither update our codebase on it (if for nothing else than mantainance reasons). So the latest release needs GDC 0.21, and the Tango svn will not be updated until 0.22 is officially released.

If only std.compiler was kept up-to-date, then you could just use static if conditions on the compiler version to automatically select the correct version... (Assuming the circular dependency won't be a problem) Of course, I use DMD anyway so I'm not personally affected by this.
Feb 04 2007
prev sibling next sibling parent Frits van Bommel <fvbommel REMwOVExCAPSs.nl> writes:
Joseph Bell wrote:
 I tried downloading tango beta .95 and get it to install both under my 
 gdc installation and dmd installation.  Both failed miserablly using 
 lib/install-dmd.sh and lib/install-gdc.sh
 
  From the dmd installation it bombed here:
 gcc -c -O -m32 critical.c -ocritical.o
 dmd -c -release -O -inline -version=Posix -w deh2.d -ofdeh2.o
 dmd -c -release -O -inline -version=Posix -w dmain2.d -ofdmain2.o
 dmd -c -release -O -inline -version=Posix -w genobj.d -ofgenobj.o
 dmd: toobj.c:315: virtual void ClassDeclaration::toObjFile(): Assertion 
 `classinfo->structsize == 0x3C' failed.
 make[1]: *** [genobj.o] Aborted
 make[1]: Leaving directory `/usr/local/src/tango/lib/compiler/dmd'

As kris said, the 'object' module for Tango seems to assume DMD 1.004 if you're using DMD. You could try commenting out the 'OffsetTypeInfo[] offTi;' line in the ClassInfo declaration, that seems to be the change that leads to that assertion. I'm not sure if there were any other significant changes though. Or you could, you know, upgrade DMD ;).
Feb 03 2007
prev sibling parent Gregor Richards <Richards codu.org> writes:
The GDC issue is my fault, I missed something in the installer.

Just `touch libtango.a`, it's not supposed to exist anyway.

  - Gregor Richards
Feb 03 2007