D.gnu - DSSS install of gdc-gcc-4.1 fails on OS X
- Steven Grimm (37/37) Sep 21 2007 Following the advice in the tutorial videos on the DSSS page, I ran
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (10/23) Sep 22 2007 FSF GCC has several issues on Mac OS X, this might be one of them ?
- Steven Grimm (17/19) Sep 22 2007 I had tried specifying an alternate prefix from the installer, but gdc
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (4/20) Sep 22 2007 Right you are, those directories already existed here (from another
- Brendan (6/6) Dec 15 2007 Hi Steven,
Following the advice in the tutorial videos on the DSSS page, I ran "dsss net install gdc-gcc-4.1" to get a fresh install of gdc on my machine. It downloaded and compiled a bunch of stuff, but then errored out: MLIBS=`/private/tmp/DSSS_gdc-gcc-4.1/4.1/gcc-4.1.2/build/./gcc/xgcc -B/private/tmp/DSSS_gdc-gcc-4.1/4.1/gcc-4.1.2/build/./gcc/ -B/Users/d/d/i386-apple-darwin8.10.1/bin/ -B/Users/d/d/i386-apple-darwin8.10.1/lib/ -isystem /Users/d/d/i386-apple-darwin8.10.1/include -isystem /Users/d/d/i386-apple-darwin8.10.1/sys-include --print-multi-lib \ | sed -e 's/;.*$//' -e '/^\.$/d' -e 's/^/_/'` ; \ for mlib in '' $MLIBS ; do \ strip -o libgcc_s.10.4.dylib_T${mlib} \ -s ../../gcc/config/i386/darwin-libgcc.10.4.ver -c -u \ libgcc_s${mlib}.1.dylib || exit 1 ; \ done strip: can't open file: /private/tmp/DSSS_gdc-gcc-4.1/4.1/gcc-4.1.2/build/gcc/libgcc_s.1.dylib (No such file or directory) make[2]: *** [libgcc_s.10.4.dylib] Error 1 make[1]: *** [all-gcc] Error 2 make: *** [all] Error 2 + exit 1 Command ./dsssgdc returned with code 256, aborting. Is this a known issue on OS X? Is installing gdc using DSSS only supported under Linux? If this problem is something new, I'll be happy to provide any information that'll help diagnose the problem; just let me know what's useful. Also, I note with some suspicion that it thinks it's building for the i386 architecture, when in fact it should be i686 -- probably not a huge difference but I assume the i686 target would generate different code to take advantage of new instructions, etc. I'm happy to live with i386 for now if I can get it to work at all. I had previously downloaded an OS X installer for gdc, which worked (and is how I got a DSSS binary) but it installed itself in /usr and I'd rather install in a user account for now so I can easily package up the environment and copy it to other machines. Thanks for any advice anyone can give me!
Sep 21 2007
Steven Grimm wrote:Is this a known issue on OS X? Is installing gdc using DSSS only supported under Linux? If this problem is something new, I'll be happy to provide any information that'll help diagnose the problem; just let me know what's useful.FSF GCC has several issues on Mac OS X, this might be one of them ? The regular builds of GDC instead uses the Apple GCC, e.g. gcc-5363.Also, I note with some suspicion that it thinks it's building for the i386 architecture, when in fact it should be i686 -- probably not a huge difference but I assume the i686 target would generate different code to take advantage of new instructions, etc. I'm happy to live with i386 for now if I can get it to work at all.The Apple build does --with-arch=nocona --with-tune=generic for i686, the platform has been arch i686 since Mac OS X 10.4 (Intel Darwin version 7 and earlier instead used arch i386) Probably doesn't make a huge difference, just like you say.I had previously downloaded an OS X installer for gdc, which worked (and is how I got a DSSS binary) but it installed itself in /usr and I'd rather install in a user account for now so I can easily package up the environment and copy it to other machines.Beyond the fact that you can install it to a different prefix, you can get the tarball version at http://dgcc.sourceforge.net/ --anders
Sep 22 2007
Anders F Björklund wrote:Beyond the fact that you can install it to a different prefix, you can get the tarball version at http://dgcc.sourceforge.net/I had tried specifying an alternate prefix from the installer, but gdc didn't work; when I tried to compile anything, I'd get object.d: module object cannot read file 'object.d' I just tried again, ran gdc under ktrace (OS X's strace equivalent, more or less) and tracked down the problem: the installer needs to create an additional directory when you're not installing in /usr. $ mkdir -p <install base>/lib/gcc/i686-apple-darwin8/4.0.1 fixed the problem for me. The root cause is that gdc uses <prefix>/lib/gcc/i686-apple-darwin8/4.0.1/../../../../include/d/4.0.1 as the default include directory; if the directory structure under /lib doesn't exist, it can't find its include files. If you install in /usr, that directory already exists, so everything works. Will file a bug against the Mac GDC project, but hopefully this will help anyone who finds my original bug report via a search engine or whatever. -Steve
Sep 22 2007
Steven Grimm wrote:I had tried specifying an alternate prefix from the installer, but gdc didn't work; when I tried to compile anything, I'd get object.d: module object cannot read file 'object.d' I just tried again, ran gdc under ktrace (OS X's strace equivalent, more or less) and tracked down the problem: the installer needs to create an additional directory when you're not installing in /usr. $ mkdir -p <install base>/lib/gcc/i686-apple-darwin8/4.0.1 fixed the problem for me. The root cause is that gdc uses <prefix>/lib/gcc/i686-apple-darwin8/4.0.1/../../../../include/d/4.0.1 as the default include directory; if the directory structure under /lib doesn't exist, it can't find its include files. If you install in /usr, that directory already exists, so everything works.Right you are, those directories already existed here (from another installation) when I tried it. It'll be added to the 0.25 postflight... --anders
Sep 22 2007
Hi Steven, I am having the same issue as you did when installing gdc using dsss. I'm extremely new to D. I have gdc installed from the dmg, but was trying to get the whole dsss thing to work. Can you quickly explain what you changed to get it to work on OSX? Thanks
Dec 15 2007