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

module Exception issue on OS-X

Moderators: kris

Posted: 09/15/07 23:27:46

I just upgraded gdc to 0.24 and tango 0.99.1 and am now seeing the following issue. Seems like Exception.d should be found in either libgtango.a or libgphobos.a but gdc isn't able to find it for some reason. I went back and stepped through the instructions to see if I missed something in the build process and have blown away gdc and reinstalled from gdcmac after sweeping for remnants of older versions. Thoughts?

private import tango.io.Stdout; void main() {

Stdout("testing").newline;

}

/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../../include/d/4.0.1/tango/text/convert/Layout.d:29: module Exception cannot read file 'tango/core/Exception.d' Exit 1

Author Message

Posted: 09/18/07 19:20:47

I see exactly the same issue on a fresh install of gdc and Tango -- until last night I had never had any D environment whatsoever on this computer, so it is not a problem that only applies to upgrades from previous versions. I followed the manual install instructions to the letter.

On the bright side, this resolves my "Should I choose Phobos or Tango as my environment for learning D?" conundrum.

Posted: 09/18/07 22:23:51 -- Modified: 09/18/07 22:25:41 by
larsivi

As far as I can see, GDC don't find the source file for tango.core.Exception (it may very well be in the library). When you compile something in D, the imported source files (or headers) must always be available.

So the actual error here is probably that tango/core/Exception.di (should be a header file) is not actually installed. Could either (or both of you) be so kind to check whether this is the case?

Gregor is the mantainer of most things Tango and GDC, so I will notify him of this thread.

And sorry for not replying sooner, this disappeared off my radar while rollicking in Rome :P

Posted: 09/18/07 22:33:15

What method did you use to install? There are about eight different ways, and only a few are supportable - there is only one that I use, and it always works.

Posted: 09/18/07 22:51:54

This appears to come down to this bug: http://d.puremagic.com/issues/show_bug.cgi?id=1502

Until that bug is fixed, 0.99.1 can be built/installed with DSSS, and tonight I'll kludge the script to work with that bug.

Posted: 09/19/07 21:41:28

I can confirm that there is no Exception.d or .di installed anywhere under my D include directory.

$ ls /usr/include/d/4.0.1/tango/core
Array.d         ByteSwap.d      Tuple.d         Variant.d
Atomic.d        Signal.d        Type.d          Version.d
BitArray.d      Traits.d        Vararg.d        sync
$ find /usr/include/d -name 'Exception.*'
$

Are there instructions for installing Tango using DSSS anywhere, or is this a "figure it out from the manpage" affair for the moment? (I have yet to look at DSSS, having only just started looking at D in the last couple days, so maybe it's trivial and self-evident.)

Posted: 09/20/07 08:38:39

I believe it is supposed to be a "dsss net install tango" type of affair, although I have not tried it myself. Note that it goes for Tango from SVN trunk at the moment (AFAIK).

Posted: 09/20/07 21:46:50 -- Modified: 09/20/07 21:51:30 by
koreth

"dsss net install tango" gives me the following:

You have chosen to install Tango via DSSS. If you follow through, you
will no longer be able to build Phobos-based software. Uninstalling
tango via DSSS WILL NOT uninstall the tango core, so this operation
is difficult to undo. Are you sure you want to do this?

Much as I want to try Tango, I'm not sure I like the sound of that. Is it in fact difficult to revert to Phobos if I need to build some other app? It should just be a single .a file, right?

[edit] Eh, what the heck, I can always just reinstall D if I want Phobos again. Going for it. Thanks for the help.

Posted: 09/20/07 22:02:03

Hehe, no it really shouldn't be that difficult :) I guess it's only Gregor being an american, protecting himself against lawsuits ;)

Posted: 09/20/07 23:21:01

ROFL

Posted: 09/21/07 16:43:38

On Windows, "install-dmd.exe -uninstall" should remove Tango completely. And I believe this is the app DSSS uses to install/uninstall Tango. If the Unix shell scripts don't do the same thing, I suppose they could always be modified to do so?

Posted: 09/21/07 18:45:55

The *nix scripts should also do this, just for the record. Feel free to post bug reports if they don't :)

Posted: 10/10/07 15:21:06 -- Modified: 10/10/07 15:23:52 by
doob -- Modified 2 Times

I have the same error under linux using gdc but not under osx. I'm pretty sure I used the same install method on both osx and linux, http://www.dsource.org/projects/tango/wiki/UnixInstallGdc I cannot use dsss to build or install tango on linux because I got this error:

tango/io/Stdout.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.
Command /opt/dsss/bin/rebuild returned with code 256, aborting.
Error: Command failed, aborting.

I don't know if that is something with tango, dsss, rebuild or gdc

Posted: 10/10/07 21:14:47

E_NEEDSMOREINFORMATION

I need your platform.

(For reference, your platform is what you metaphorically stand on: The compiler, the OS and the architecture)

Posted: 10/10/07 21:53:43

doob: By any chance, would your linux machine be an amd64 (aka x86_64/x86-64)? And your mac probably isn't?

That's the exact error message GDC built on that architecture produces when I run into the famous vararg bug. At least, that's what I've been presuming is causing this error and keeping me from using Tango with GDC/amd64. (But even if that isn't the cause of this particular message that bug is still a deal-breaker for me since text formatting doesn't work because of it)

Posted: 10/12/07 14:24:58 -- Modified: 10/12/07 15:17:34 by
doob

My platforms:
Mac:
Intel Core 2 Duo 2 GHz (x86_64)
i686-apple-darwin8-gdc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5363)
(gdc 0.24, using dmd 1.020) (gdc installed using installer)
DSSS 0.71 (compiled)
Tango 0.99.2 (working, manual installation http://www.dsource.org/projects/tango/wiki/UnixInstallGdc)

Linux:
Intel Core 2 Duo E6600 (x86_64)
gentoo
gcc 4.1.2
gdc 0.24 (installed using portage)
DSSS 0.73 (compiled)
Tango 0.99.2 (not working, tried manual installation, dsss net install and local installation using dsss)

In linux, chrooted into an 32bit environment and using gcc 4.1.2-r2 works, using "dsss net install tango"

Posted: 10/12/07 15:23:39

Now I have an new error in the 64bit environment using "dsss net install tango":
tango/sys/linux/socket.d:67: static assert is false
Command /opt/dsss/bin/rebuild returned with code 256, aborting.
Error: Command failed, aborting.
Command /opt/dsss/bin/dsss returned with code 256, aborting.
Error: Command failed, aborting.