D.gnu - Building Apple GCC with GDC
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (16/16) Dec 06 2006 I'm trying to build Apple's "Universal" gcc-5363,
- Paolo Invernizzi (5/30) Dec 06 2006 Actually, a step-by-step process (configure included) of the build
- David Friedman (27/52) Dec 06 2006 I have only done Universal builds with gcc-5341 on MacOS Intel. The
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (6/15) Dec 07 2006 Hmm, wonder if I did do that for the Apple build as well as FSF ?
- David Friedman (8/30) Dec 11 2006 I have found that the patch and method described at
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (14/18) Dec 11 2006 Yes, it built just fine now when I tried it again. The patching
- David Friedman (7/32) Dec 11 2006 You can move ligphobos.a and libgphobos.spec to
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (13/21) Dec 11 2006 OK, the reason it wasn't working was that I moved it to
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (11/17) Dec 11 2006 Another idea I've been toying around with is supplying a full
I'm trying to build Apple's "Universal" gcc-5363, but somehow it always fails in the install phase ? gnumake install RC_OS=macos RC_ARCHS='i386 ppc' TARGETS='i386 ppc' \ SRCROOT=`pwd` OBJROOT=`pwd`/build/obj \ DSTROOT=`pwd`/build/dst SYMROOT=`pwd`/build/sym I added "d" to the --enable-languages in build_gcc, otherwise it is using the GCC settings Apple chose. Tried building GDC 0.19 with gcc-5341 earlier, but didn't have much luck with that effort either... :( Downloaded the GCC source code tarball from Apple, and added the "d" directory and ran "setup-gcc.sh" http://www.opensource.apple.com/darwinsource/tarballs/other/gcc-5363.tar.gz http://www.opensource.apple.com/darwinsource/tarballs/other/gcc-5341.tar.gz How did you build gdc-0.19-macos-universal.tar.bz2 ? I would like to build a compiler from GDC SVN trunk. --anders
Dec 06 2006
Actually, a step-by-step process (configure included) of the build process would be very appreciated! --- Paolo Invernizzi Anders F Björklund wrote:I'm trying to build Apple's "Universal" gcc-5363, but somehow it always fails in the install phase ? gnumake install RC_OS=macos RC_ARCHS='i386 ppc' TARGETS='i386 ppc' \ SRCROOT=`pwd` OBJROOT=`pwd`/build/obj \ DSTROOT=`pwd`/build/dst SYMROOT=`pwd`/build/sym I added "d" to the --enable-languages in build_gcc, otherwise it is using the GCC settings Apple chose. Tried building GDC 0.19 with gcc-5341 earlier, but didn't have much luck with that effort either... :( Downloaded the GCC source code tarball from Apple, and added the "d" directory and ran "setup-gcc.sh" http://www.opensource.apple.com/darwinsource/tarballs/other/gcc-5363.tar.gz http://www.opensource.apple.com/darwinsource/tarballs/other/gcc-5341.tar.gz How did you build gdc-0.19-macos-universal.tar.bz2 ? I would like to build a compiler from GDC SVN trunk. --anders
Dec 06 2006
Anders F Björklund wrote:I'm trying to build Apple's "Universal" gcc-5363, but somehow it always fails in the install phase ? gnumake install RC_OS=macos RC_ARCHS='i386 ppc' TARGETS='i386 ppc' \ SRCROOT=`pwd` OBJROOT=`pwd`/build/obj \ DSTROOT=`pwd`/build/dst SYMROOT=`pwd`/build/sym I added "d" to the --enable-languages in build_gcc, otherwise it is using the GCC settings Apple chose. Tried building GDC 0.19 with gcc-5341 earlier, but didn't have much luck with that effort either... :( Downloaded the GCC source code tarball from Apple, and added the "d" directory and ran "setup-gcc.sh" http://www.opensource.apple.com/darwinsource/tarballs/other/gcc-5363.tar.gz http://www.opensource.apple.com/darwinsource/tarballs/other/gcc-5341.tar.gz How did you build gdc-0.19-macos-universal.tar.bz2 ? I would like to build a compiler from GDC SVN trunk. --andersI have only done Universal builds with gcc-5341 on MacOS Intel. The build environment on my G5 seems to be messed up so that I can't make i386 executables. gcc-5363 fails on x86_64 stuff. Hopefully, installing Xcode 2.4.1 will fix these problems (downloading now). Here are the build steps I use: src=`pwd`/gcc-5341 tar xzf .../gcc-5341.tar.gz cd $src/gcc tar xzf .../gdc-src.tar.gz cd $src ./gcc/d/setup-gcc.sh mkdir -p build/obj build/dst build/sym gnumake install RC_OS=macos RC_ARCHS='i386 ppc' TARGETS='i386 ppc' \ SRCROOT=`pwd` OBJROOT=`pwd`/build/obj DSTROOT=`pwd`/build/dst \ SYMROOT=`pwd`/build/sym >> build-log 2>&1 \ cd $src/build/obj/obj-i686-i686 $src/gcc/d/package/simple.sh --macos \ --with-install-root=$src/build/dst The setup-gcc.sh script will add 'd' to --enable-languages. If you did this manually, the rest of the patching of build_gcc may have failed... There is a bug in that lets this patch fail, but still says "GDC setup complete." If you still get errors, please send me a log. David
Dec 06 2006
David Friedman wrote:I have only done Universal builds with gcc-5341 on MacOS Intel. The build environment on my G5 seems to be messed up so that I can't make i386 executables. gcc-5363 fails on x86_64 stuff. Hopefully, installing Xcode 2.4.1 will fix these problems (downloading now).Thanks for the build info, will try it again on the Intel Mac...The setup-gcc.sh script will add 'd' to --enable-languages. If you did this manually, the rest of the patching of build_gcc may have failed... There is a bug in that lets this patch fail, but still says "GDC setup complete."Hmm, wonder if I did do that for the Apple build as well as FSF ?If you still get errors, please send me a log.Will do, and I will contribute my gdcmac/gdcwin packaging scripts. Basically it's the same, just wrapped with PackageMaker / NSIS... --anders
Dec 07 2006
Anders F Björklund wrote:David Friedman wrote:I have found that the patch and method described at http://gcc.gnu.org/ml/gcc-patches/2006-09/msg00997.html allows building on PowerPC. The resulting compiler will depend on SDK (unless overridden by -isysroot.) Also, I was able to build with gcc-5363 after installing the latest Xcode (only tried it on Intel.) DavidI have only done Universal builds with gcc-5341 on MacOS Intel. The build environment on my G5 seems to be messed up so that I can't make i386 executables. gcc-5363 fails on x86_64 stuff. Hopefully, installing Xcode 2.4.1 will fix these problems (downloading now).Thanks for the build info, will try it again on the Intel Mac...The setup-gcc.sh script will add 'd' to --enable-languages. If you did this manually, the rest of the patching of build_gcc may have failed... There is a bug in that lets this patch fail, but still says "GDC setup complete."Hmm, wonder if I did do that for the Apple build as well as FSF ?If you still get errors, please send me a log.Will do, and I will contribute my gdcmac/gdcwin packaging scripts. Basically it's the same, just wrapped with PackageMaker / NSIS... --anders
Dec 11 2006
David Friedman wrote:Yes, it built just fine now when I tried it again. The patching for build_gcc failed (against gcc-5363), but fixed it manually. For now I left the symlink gdc -> gdc-4.0 in the gdcmac archive, but think I will do it in the PKG post-install script instead... i.e. only supply gdc-4.0 and gdc-3.3 in the actual archives ? (and gdmd wrapper too, it will follow whatever "gdc" is using) Is there a way to relocate libgphobos.a to e.g. gcc folder, so that you can install both of GCC 3.3 and GCC 4.0 at once ? Thanks! --anders PS. Scrapping the "10.4-intel" and "universal" gdcmac versions, it will all go in the same 10.4 PKG/DMG version for GDC 0.20Thanks for the build info, will try it again on the Intel Mac...Also, I was able to build with gcc-5363 after installing the latest Xcode (only tried it on Intel.)
Dec 11 2006
Anders F Björklund wrote:David Friedman wrote:You can move ligphobos.a and libgphobos.spec to <prefix>/lib/gcc/<target>/<version> (where libgcc.a is). That said, I am planning to drop support for GCC 3.3 in the next (0.21) release. When I asked, I didn't get a response from anyone who was actually using it... DavidYes, it built just fine now when I tried it again. The patching for build_gcc failed (against gcc-5363), but fixed it manually. For now I left the symlink gdc -> gdc-4.0 in the gdcmac archive, but think I will do it in the PKG post-install script instead... i.e. only supply gdc-4.0 and gdc-3.3 in the actual archives ? (and gdmd wrapper too, it will follow whatever "gdc" is using) Is there a way to relocate libgphobos.a to e.g. gcc folder, so that you can install both of GCC 3.3 and GCC 4.0 at once ? Thanks! --anders PS. Scrapping the "10.4-intel" and "universal" gdcmac versions, it will all go in the same 10.4 PKG/DMG version for GDC 0.20Thanks for the build info, will try it again on the Intel Mac...Also, I was able to build with gcc-5363 after installing the latest Xcode (only tried it on Intel.)
Dec 11 2006
David Friedman wrote:OK, the reason it wasn't working was that I moved it to the old Apple GCC location instead of the new one I used. <duh> i.e. I moved it to /usr/lib/gcc/darwin/3.3/libgphobos.a, but it was looking in /usr/lib/gcc/powerpc-apple-darwin7/3.3.6... Works fine now.Scrapping the "10.4-intel" and "universal" gdcmac versions, it will all go in the same 10.4 PKG/DMG version for GDC 0.20You can move ligphobos.a and libgphobos.spec to <prefix>/lib/gcc/<target>/<version> (where libgcc.a is).That said, I am planning to drop support for GCC 3.3 in the next (0.21) release. When I asked, I didn't get a response from anyone who was actually using it...That should be OK, I am only using GCC 3.3 for my Mac OS X 10.3 builds and am planning to focus on Mac OS X 10.4 and 10.5 next. And if GDC 0.20 matches DMD 1.0 - then that should be valid for a while to come, I guess ? Besides, templates are broken anyway. Using C instead. --anders
Dec 11 2006
Another idea I've been toying around with is supplying a full GCC collection (i.e. C/C++/D) using GCC 4.0.3, for use with Mac OS X 10.2/10.3 and Windows/MinGW. Probably easier to do a vanilla FSF build for those, than using the "system" compiler ? So for the GDC 0.20 it's going to be GCC 3.3.6 / Apple gdc-5363 for Mac and MinGW GCC 3.4.2-20040916-1/3.4.5-20060117-1 for Win, but future versions might provide a full build using GCC 4.0.3 or perhaps even GCC 4.1 and 4.2 when GDC starts support those ? Will probably use /opt/gnu, and include a patched GDB as well... But it will come after wxD (and Code::Blocks) have been improved. --andersThat said, I am planning to drop support for GCC 3.3 in the next (0.21) release. When I asked, I didn't get a response from anyone who was actually using it...That should be OK, I am only using GCC 3.3 for my Mac OS X 10.3 builds and am planning to focus on Mac OS X 10.4 and 10.5 next.
Dec 11 2006