October 28, 2004
Hi there
I'm having trouble compiling gdc. Compile fails with the following error   message:

g++   -O2 -march=athlon-xp -mcpu=athlon-xp -pipe -msse -mmmx -m3dnow -mfpmath=sse -funroll-loops -ffast-math  -Wall -fomit-frame-pointer -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes    -DHAVE_CONFIG_H    -Id -I./d/dmd -I./d -D_GNU_SOURCE=1 -DD_PHOBOS_DIR=\"/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../..`echo /usr | sed -e 's|^/usr||' -e 's|/[^/]*|/..|g'`/include/d\" -DD_LIBDIR=\"/usr/lib\" -DD_CPU_VERSYM=\"X86\" -DD_OS_VERSYM=\"linux\" -DD_GCC_VER=33 -fmessage-length=0 -O0 -g -include ./d/dmd/total.h -o d/version.dmd.o -c d/dmd/version.c
In file included from d/dmd/stringtable.h:19,
                 from d/dmd/total.h:24,
                 from <command line>:14:
d/dmd/lstring.h:23: warning: ignoring #pragma warning
d/dmd/version.c: In member function `virtual void DebugSymbol::semantic(Scope*)':
d/dmd/version.c:61: warning: unused parameter `Scope*sc'
d/dmd/version.c: In member function `virtual void DebugSymbol::toCBuffer(OutBuffer*)':
d/dmd/version.c:67: warning: deprecated conversion from string constant to `char*'
d/dmd/version.c:72: warning: deprecated conversion from string constant to `char*'
d/dmd/version.c: In member function `virtual char* DebugSymbol::kind()':
d/dmd/version.c:78: warning: deprecated conversion from string constant to `char*'
d/dmd/version.c: In member function `virtual void VersionSymbol::semantic(Scope*)':
d/dmd/version.c:123: warning: unused parameter `Scope*sc'
d/dmd/version.c: In member function `virtual void VersionSymbol::toCBuffer(OutBuffer*)':
d/dmd/version.c:128: warning: deprecated conversion from string constant to `char*'
d/dmd/version.c:133: warning: deprecated conversion from string constant to `char*'
d/dmd/version.c: In member function `virtual char* VersionSymbol::kind()':
d/dmd/version.c:139: warning: deprecated conversion from string constant to `char*'
g++   -O2 -march=athlon-xp -mcpu=athlon-xp -pipe -msse -mmmx -m3dnow -mfpmath=sse -funroll-loops -ffast-math  -Wall -fomit-frame-pointer -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes    -DHAVE_CONFIG_H    -I. -Id -I. -I./d -I./config -I./../include -I./d -I./d/dmd -Id -D_GNU_SOURCE=1 -DD_PHOBOS_DIR=\"/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../..`echo /usr | sed -e 's|^/usr||' -e 's|/[^/]*|/..|g'`/include/d\" -DD_LIBDIR=\"/usr/lib\" -DD_CPU_VERSYM=\"X86\" -DD_OS_VERSYM=\"linux\" -DD_GCC_VER=33 -fmessage-length=0 -O0 -g -DGCC_SAFE_DMD=1 -o d/d-lang.glue.o -c d/d-lang.cc
In file included from d/dmd/stringtable.h:19,
                 from d/dmd/mtype.h:24,
                 from d/d-lang.cc:24:
d/dmd/lstring.h:23: warning: ignoring #pragma warning
In file included from d/d-gcc-includes.h:44,
                 from d/d-lang.cc:31:
real.h:45: error: parse error before `:' token
In file included from d/d-gcc-includes.h:52,
                 from d/d-lang.cc:31:
rtl.h:114: error: declaration of `rtx_def*rtunion_def::rtx'
config.h:9: error: changes meaning of `rtx' from `typedef struct rtx_def*rtx'
rtl.h:115: error: declaration of `rtvec_def*rtunion_def::rtvec'
config.h:11: error: changes meaning of `rtvec' from `typedef struct rtvec_def*rtvec'
d/d-lang.cc: In function `const char* d_init(const char*)':
d/d-lang.cc:177: warning: deprecated conversion from string constant to `char*'
d/d-lang.cc:179: warning: deprecated conversion from string constant to `char*'
d/d-lang.cc:182: warning: deprecated conversion from string constant to `char*'
d/d-lang.cc:191: warning: deprecated conversion from string constant to `char*'
d/d-lang.cc:195: warning: deprecated conversion from string constant to `char*'
d/d-lang.cc:200: warning: deprecated conversion from string constant to `char*'
d/d-lang.cc:205: warning: deprecated conversion from string constant to `char*'
d/d-lang.cc:238: warning: deprecated conversion from string constant to `char*'
d/d-lang.cc: In function `int d_decode_option(int, char**)':
d/d-lang.cc:377: warning: unused parameter `int argc'
gmake[1]: *** [d/d-lang.glue.o] Error 1
gmake[1]: Leaving directory `/var/tmp/portage/gdc-0.102/work/gcc-3.3.4/gcc'
gmake: *** [all-gcc] Error 2

I'm on gentoo with gcc 3.3.4. Any ideas? I think I followed the build instructions correctly. ;)
Anders Runesson
October 28, 2004
It looks like the patch has not been applied to the gcc directory.

David

Anders Runesson wrote:
> Hi there
> I'm having trouble compiling gdc. Compile fails with the following error   message:
> 
> g++   -O2 -march=athlon-xp -mcpu=athlon-xp -pipe -msse -mmmx -m3dnow -mfpmath=sse -funroll-loops -ffast-math  -Wall -fomit-frame-pointer -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes    -DHAVE_CONFIG_H    -Id -I./d/dmd -I./d -D_GNU_SOURCE=1 -DD_PHOBOS_DIR=\"/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../..`echo /usr | sed -e 's|^/usr||' -e 's|/[^/]*|/..|g'`/include/d\" -DD_LIBDIR=\"/usr/lib\" -DD_CPU_VERSYM=\"X86\" -DD_OS_VERSYM=\"linux\" -DD_GCC_VER=33 -fmessage-length=0 -O0 -g -include ./d/dmd/total.h -o d/version.dmd.o -c d/dmd/version.c
> In file included from d/dmd/stringtable.h:19,
>                  from d/dmd/total.h:24,
>                  from <command line>:14:
> d/dmd/lstring.h:23: warning: ignoring #pragma warning
> d/dmd/version.c: In member function `virtual void DebugSymbol::semantic(Scope*)':
> d/dmd/version.c:61: warning: unused parameter `Scope*sc'
> d/dmd/version.c: In member function `virtual void DebugSymbol::toCBuffer(OutBuffer*)':
> d/dmd/version.c:67: warning: deprecated conversion from string constant to `char*'
> d/dmd/version.c:72: warning: deprecated conversion from string constant to `char*'
> d/dmd/version.c: In member function `virtual char* DebugSymbol::kind()':
> d/dmd/version.c:78: warning: deprecated conversion from string constant to `char*'
> d/dmd/version.c: In member function `virtual void VersionSymbol::semantic(Scope*)':
> d/dmd/version.c:123: warning: unused parameter `Scope*sc'
> d/dmd/version.c: In member function `virtual void VersionSymbol::toCBuffer(OutBuffer*)':
> d/dmd/version.c:128: warning: deprecated conversion from string constant to `char*'
> d/dmd/version.c:133: warning: deprecated conversion from string constant to `char*'
> d/dmd/version.c: In member function `virtual char* VersionSymbol::kind()':
> d/dmd/version.c:139: warning: deprecated conversion from string constant to `char*'
> g++   -O2 -march=athlon-xp -mcpu=athlon-xp -pipe -msse -mmmx -m3dnow -mfpmath=sse -funroll-loops -ffast-math  -Wall -fomit-frame-pointer -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes    -DHAVE_CONFIG_H    -I. -Id -I. -I./d -I./config -I./../include -I./d -I./d/dmd -Id -D_GNU_SOURCE=1 -DD_PHOBOS_DIR=\"/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../..`echo /usr | sed -e 's|^/usr||' -e 's|/[^/]*|/..|g'`/include/d\" -DD_LIBDIR=\"/usr/lib\" -DD_CPU_VERSYM=\"X86\" -DD_OS_VERSYM=\"linux\" -DD_GCC_VER=33 -fmessage-length=0 -O0 -g -DGCC_SAFE_DMD=1 -o d/d-lang.glue.o -c d/d-lang.cc
> In file included from d/dmd/stringtable.h:19,
>                  from d/dmd/mtype.h:24,
>                  from d/d-lang.cc:24:
> d/dmd/lstring.h:23: warning: ignoring #pragma warning
> In file included from d/d-gcc-includes.h:44,
>                  from d/d-lang.cc:31:
> real.h:45: error: parse error before `:' token
> In file included from d/d-gcc-includes.h:52,
>                  from d/d-lang.cc:31:
> rtl.h:114: error: declaration of `rtx_def*rtunion_def::rtx'
> config.h:9: error: changes meaning of `rtx' from `typedef struct rtx_def*rtx'
> rtl.h:115: error: declaration of `rtvec_def*rtunion_def::rtvec'
> config.h:11: error: changes meaning of `rtvec' from `typedef struct rtvec_def*rtvec'
> d/d-lang.cc: In function `const char* d_init(const char*)':
> d/d-lang.cc:177: warning: deprecated conversion from string constant to `char*'
> d/d-lang.cc:179: warning: deprecated conversion from string constant to `char*'
> d/d-lang.cc:182: warning: deprecated conversion from string constant to `char*'
> d/d-lang.cc:191: warning: deprecated conversion from string constant to `char*'
> d/d-lang.cc:195: warning: deprecated conversion from string constant to `char*'
> d/d-lang.cc:200: warning: deprecated conversion from string constant to `char*'
> d/d-lang.cc:205: warning: deprecated conversion from string constant to `char*'
> d/d-lang.cc:238: warning: deprecated conversion from string constant to `char*'
> d/d-lang.cc: In function `int d_decode_option(int, char**)':
> d/d-lang.cc:377: warning: unused parameter `int argc'
> gmake[1]: *** [d/d-lang.glue.o] Error 1
> gmake[1]: Leaving directory `/var/tmp/portage/gdc-0.102/work/gcc-3.3.4/gcc'
> gmake: *** [all-gcc] Error 2
> 
> I'm on gentoo with gcc 3.3.4. Any ideas? I think I followed the build instructions correctly. ;)
> Anders Runesson