|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.ide digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript electronics |
digitalmars.D - Compiling DMD for *nix platforms
Does anyone know how to build DMD from source? I am using gdc on Mac OS X and I am finding that it does not support all the bizarre syntax features I am throwing at it, probably because it is based on version 1 of the D language. I'd like to try out DMD, and luckily source code comes in the archives on the download page (http://www.digitalmars.com/d/download.html). Unfortunately, there is no build script to make the compiler, and just trying to run g++ on all the .c files in the source directory is no good. May 04 2008
On Mon, May 5, 2008 at 7:48 AM, Leo Singer <aronnax umd.edu> wrote:Does anyone know how to build DMD from source? I am using gdc on Mac OS X and I am finding that it does not support all the bizarre syntax features I am throwing at it, probably because it is based on version 1 of the D language. I'd like to try out DMD, and luckily source code comes in the archives on the download page (http://www.digitalmars.com/d/download.html). Unfortunately, there is no build script to make the compiler, and just trying to run g++ on all the .c files in the source directory is no good. May 04 2008
Anders Bergh wrote:On Mon, May 5, 2008 at 7:48 AM, Leo Singer <aronnax umd.edu> wrote:Does anyone know how to build DMD from source? I am using gdc on Mac OS X and I am finding that it does not support all the bizarre syntax features I am throwing at it, probably because it is based on version 1 of the D language. I'd like to try out DMD, and luckily source code comes in the archives on the download page (http://www.digitalmars.com/d/download.html). Unfortunately, there is no build script to make the compiler, and just trying to run g++ on all the .c files in the source directory is no good. May 05 2008
== Quote from Anders Bergh (anders1 gmail.com)'s articleYou can't compile dmd because it's not 100% open source, only the frontend is. If you download the latest gdc code using svn then you can do something like this to enable D 2 support: ./gcc/d/setup-gcc --enable-d-language=2 (or so, I don't remember) May 06 2008
I followed the instructions in the INSTALL file on the repository, downloading
the newest 4.1 release of
GCC, which happened to be 4.1.2. I ran the setup script, and then ran gcc's
configure script, then ran
make. The following link command causes make to fail:
c++ -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -
pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition
-Wmissing-format-attribute
-DHAVE_CONFIG_H -I. -I. -I../.././gcc -I../.././gcc/. -I../.././gcc/../include
-I./../intl -
I../.././gcc/../libcpp/include -I. -I. -I../.././gcc -I../.././gcc/.
-I../.././gcc/../include -I./../intl -
I../.././gcc/../libcpp/include -I../.././gcc/d -I../.././gcc/d/dmd -Id
-D_GNU_SOURCE=1 -D_DH=1 -
DD_NO_TRAMPOLINES=1 -DELFOBJ=1 -DLIBPHOBOS=\"-lgphobos\" -DLIBPHOBOS_PROFILE=\"-
lgphobos\" -DD_GCC_VER=41 -Wno-missing-braces -fmessage-length=0 -o cc1d \
d/id.gen.o d/impcnvtab.gen.o attribs.o cppdefault.o stub-objc.o prefix.o
darwin-c.o
d/access.dmd.o d/array.dmd.o d/attrib.dmd.o d/cast.dmd.o d/class.dmd.o
d/cond.dmd.o
d/constfold.dmd.o d/dchar.dmd.o d/declaration.dmd.o d/delegatize.dmd.o
d/doc.dmd.o
d/dsymbol.dmd.o d/dump.dmd.o d/entity.dmd.o d/enum.dmd.o d/expression.dmd.o
d/func.dmd.o
d/gnuc.dmd.o d/hdrgen.dmd.o d/html.dmd.o d/identifier.dmd.o d/import.dmd.o
d/init.dmd.o
d/inline.dmd.o d/interpret.dmd.o d/lexer.dmd.o d/lstring.dmd.o d/macro.dmd.o
d/mangle.dmd.o
d/mars.dmd.o d/mem.dmd.o d/mtype.dmd.o d/module.dmd.o d/opover.dmd.o
d/optimize.dmd.o
d/parse.dmd.o d/root.dmd.o d/scope.dmd.o d/statement.dmd.o d/staticassert.dmd.o
d/stringtable.dmd.o d/struct.dmd.o d/template.dmd.o d/todt.dmd.o d/toobj.dmd.o
d/typinf.dmd.o
d/unialpha.dmd.o d/utf.dmd.o d/version.dmd.o d/d-lang.glue.o d/d-decls.glue.o
d/d-codegen.glue.o
d/d-objfile.glue.o d/d-irstate.glue.o d/d-glue.glue.o d/d-convert.glue.o
d/d-todt.glue.o d/d-gcc-
real.glue.o d/d-gt.cglue.o d/d-builtins.cglue.o d/d-misc.cglue.o
d/d-builtins2.glue.o d/symbol.glue.o
d/asmstmt.glue.o d/dt.glue.o d/d-c-stubs.cglue.o main.o libbackend.a
../libcpp/libcpp.a
../libcpp/libcpp.a ./../intl/libintl.a -liconv ../libiberty/libiberty.a
Undefined symbols:
"AggregateDeclaration::buildDtor(Scope*)", referenced from:
ClassDeclaration::semantic(Scope*) in class.dmd.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [cc1d] Error 1
make[1]: *** [all-gcc] Error 2
make: *** [all] Error 2
Any ideas?
I compiling on Mac OS X 10.5.2.
May 06 2008
Leo Singer wrote:Undefined symbols: May 07 2008
== Quote from Anders F Björklund (afb algonet.se)'s articleLeo Singer wrote:Undefined symbols: May 07 2008
Leo Singer wrote:Which version of GDC and which language was this ? trunk/D2 ? Maybe you need to add d/clone.dmd.o to D_DMD_OBJS, or wait... May 07 2008
Anders F Björklund Wrote:But it is getting very off-topic, so suggest you continue any problems with building GDC trunk in the D.gnu newsgroup ? May 07 2008
On 2008-05-07 09:41:22 +0200, Leo Singer <aronnax umd.edu> said:== Quote from Anders F Björklund (afb algonet.se)'s articleLeo Singer wrote:Undefined symbols: May 07 2008
== Quote from Anders F Björklund (afb algonet.se)'s articleYour GCC versions and setup seems OK, it seems like symbols from "clone.c" are missing in the library creation though ? Which version of GDC and which language was this ? trunk/D2 ? Maybe you need to add d/clone.dmd.o to D_DMD_OBJS, or wait... May 07 2008
On Wed, May 7, 2008 at 8:03 AM, Leo Singer <aronnax umd.edu> wrote:Sweet! That's exactly what I want. I've heard some rumors about using gcc's backends for other platforms to use D on embedded systems. That's exactly why I'm interested in D. What would need to be done to make a cross-compiler for <insert favorite gcc backend here>? May 06 2008
On Wed, May 7, 2008 at 8:58 AM, Leo Singer <aronnax umd.edu> wrote: May 07 2008
|