www.digitalmars.com         C & C++   DMDScript  

D.gnu - gdc on cygwin

reply "Carlos Santander B." <csantander619 gmail.com> writes:
Since I don't know what gdc version is the most recent on cygwin, I 
decided to build it.
I downloaded the gcc sources (gcc, gcc-core, gcc-g++, gcc-java) and then 
gdc 0.9. Then (from /usr/src/gcc-3.4.1), this happens:

$ patch -p1 < d/patch-gcc-3.4.x
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -c gcc-gcc-3.4.0-orig/real.h gcc-gcc-3.4.0/real.h
|*** gcc-gcc-3.4.0-orig/real.h  Fri Oct 10 20:33:05 2003
|--- gcc-gcc-3.4.0/real.h       Mon Sep 27 14:06:40 2004
--------------------------
File to patch:

There's no gcc-gcc-3.4.0 or gcc-gcc-3.4.0-orig, but real.h and all the 
other files mentioned in the patch are in the gcc directory. If I change 
all the references, the output doesn't change.
Notice I've never compiled gcc and I have no experience with patch or 
diff or any other like that.

_______________________
Carlos Santander Bernal
Dec 29 2004
next sibling parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Carlos Santander B. wrote:

 There's no gcc-gcc-3.4.0 or gcc-gcc-3.4.0-orig, but real.h and all the 
 other files mentioned in the patch are in the gcc directory. If I change 
 all the references, the output doesn't change.
 Notice I've never compiled gcc and I have no experience with patch or 
 diff or any other like that.

The patch should be run from the gcc-3.4.?/gcc directory. -p1 makes it ignore the directory name, i.e. "gcc-gcc" You can use my Makefile to build all of this if you like: http://www.algonet.se/~afb/d/Makefile
 make prep
 make gdc
 sudo make gdc-install
 make phobos
 sudo make phobos-install
 make clean

It hasn't been tested on Cygwin yet, but works on Darwin/Linux ? --anders
Dec 30 2004
next sibling parent "Carlos Santander B." <csantander619 gmail.com> writes:
Anders F Björklund wrote:
 Carlos Santander B. wrote:
 
 There's no gcc-gcc-3.4.0 or gcc-gcc-3.4.0-orig, but real.h and all the 
 other files mentioned in the patch are in the gcc directory. If I 
 change all the references, the output doesn't change.
 Notice I've never compiled gcc and I have no experience with patch or 
 diff or any other like that.

The patch should be run from the gcc-3.4.?/gcc directory. -p1 makes it ignore the directory name, i.e. "gcc-gcc"

That seems to work. make is running right now without problems.
 You can use my Makefile to build all of this if you like:
 http://www.algonet.se/~afb/d/Makefile
 
 make prep
 make gdc
 sudo make gdc-install
 make phobos
 sudo make phobos-install
 make clean

It hasn't been tested on Cygwin yet, but works on Darwin/Linux ? --anders

I'll try it if I have more problems. Thanks! _______________________ Carlos Santander Bernal
Dec 30 2004
prev sibling parent reply Dale Dude <dale daledude.com> writes:
Anders F Björklund wrote:
 Carlos Santander B. wrote:
 
 There's no gcc-gcc-3.4.0 or gcc-gcc-3.4.0-orig, but real.h and all the 
 other files mentioned in the patch are in the gcc directory. If I 
 change all the references, the output doesn't change.
 Notice I've never compiled gcc and I have no experience with patch or 
 diff or any other like that.

The patch should be run from the gcc-3.4.?/gcc directory. -p1 makes it ignore the directory name, i.e. "gcc-gcc" You can use my Makefile to build all of this if you like: http://www.algonet.se/~afb/d/Makefile
 make prep
 make gdc
 sudo make gdc-install
 make phobos
 sudo make phobos-install
 make clean

It hasn't been tested on Cygwin yet, but works on Darwin/Linux ? --anders

I tried your Makefile and get the following error using gcc 3.4.1... cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ cc1plus: warning: command line option "-Wmissing-prototypes" is valid for Ada/C/ObjC but not for C++ 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:30: ./real.h:45: error: expected class-name before numeric constant ./real.h:45: error: expected `{' before numeric constant ./real.h:45: error: expected unqualified-id before numeric constant In file included from d/d-gcc-includes.h:52, from d/d-lang.cc:30: ./rtl.h:124: error: declaration of `rtx_def*rtunion_def::rtx' ./coretypes.h:41: error: changes meaning of `rtx' from `typedef struct rtx_def*rtx' ./rtl.h:125: error: declaration of `rtvec_def*rtunion_def::rtvec' ./coretypes.h:43: error: changes meaning of `rtvec' from `typedef struct rtvec_def*rtvec' d/d-lang.cc: In function `bool d_init()': d/d-lang.cc:176: warning: deprecated conversion from string constant to `char*' d/d-lang.cc:178: warning: deprecated conversion from string constant to `char*' d/d-lang.cc:181: warning: deprecated conversion from string constant to `char*' d/d-lang.cc:190: warning: deprecated conversion from string constant to `char*' d/d-lang.cc:194: warning: deprecated conversion from string constant to `char*' d/d-lang.cc:199: warning: deprecated conversion from string constant to `char*' d/d-lang.cc:204: warning: deprecated conversion from string constant to `char*' d/d-lang.cc:210: warning: deprecated conversion from string constant to `char*' d/d-lang.cc:239: warning: deprecated conversion from string constant to `char*' make[2]: *** [d/d-lang.glue.o] Error 1 make[2]: Leaving directory `/home/root/t/gcc-3.4.3/gcc' make[1]: *** [all-gcc] Error 2 make[1]: Leaving directory `/home/root/t/gcc-3.4.3' make: *** [gdc] Error 2
Jan 25 2005
parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Dale Dude wrote:

 It hasn't been tested on Cygwin yet, but works on Darwin/Linux ?

I tried your Makefile and get the following error using gcc 3.4.1...

 In file included from d/d-gcc-includes.h:52,
                  from d/d-lang.cc:30:
 ./rtl.h:124: error: declaration of `rtx_def*rtunion_def::rtx'
 ./coretypes.h:41: error: changes meaning of `rtx' from `typedef struct 
 rtx_def*rtx'
 ./rtl.h:125: error: declaration of `rtvec_def*rtunion_def::rtvec'
 ./coretypes.h:43: error: changes meaning of `rtvec' from `typedef struct 
 rtvec_def*rtvec'

Seems like the Makefile failed to apply the GCC patch, probably because you are missing the "patch" program ? I thought Make should catch this, but maybe I need to add an explicit "patch || exit" to the prep script... Anyway, you need to install GNU patch (and diff first. http://www.gnu.org/software/diffutils/diffutils.html --anders
Jan 26 2005
parent Dale Dude <dale daledude.com> writes:
Anders F Björklund wrote:
 Dale Dude wrote:
 
 It hasn't been tested on Cygwin yet, but works on Darwin/Linux ?

I tried your Makefile and get the following error using gcc 3.4.1...

 In file included from d/d-gcc-includes.h:52,
                  from d/d-lang.cc:30:
 ./rtl.h:124: error: declaration of `rtx_def*rtunion_def::rtx'
 ./coretypes.h:41: error: changes meaning of `rtx' from `typedef struct 
 rtx_def*rtx'
 ./rtl.h:125: error: declaration of `rtvec_def*rtunion_def::rtvec'
 ./coretypes.h:43: error: changes meaning of `rtvec' from `typedef 
 struct rtvec_def*rtvec'

Seems like the Makefile failed to apply the GCC patch, probably because you are missing the "patch" program ? I thought Make should catch this, but maybe I need to add an explicit "patch || exit" to the prep script... Anyway, you need to install GNU patch (and diff first. http://www.gnu.org/software/diffutils/diffutils.html --anders

You are right. The install of patch didn't seem to take the first time. Thanks for your useful Makefile! Regards, Dale
Jan 26 2005
prev sibling parent Brian Chapman <nospam-for-brian see-post-for-address.net> writes:
Speaking of Cygwin. I was trying to build phobos and I got this error 
right away:

gen_unix.c: In function `c_signal':
gen_unix.c:226: error: `SA_SIGINFO' undeclared (first use in this function)
gen_unix.c:226: error: (Each undeclared identifier is reported only once
gen_unix.c:226: error: for each function it appears in.)
gen_unix.c:248: error: `siginfo_t' undeclared (first use in this function)
gen_unix.c:248: error: parse error before "rec"
gen_unix.c:250: error: `rec' undeclared (first use in this function)
gen_unix.c:261: error: structure has no member named `sa_sigaction'
gen_unix.c:261: error: structure has no member named `sa_sigaction'
make: *** [config/gen_unix.o] Error 1

I'm not sure why this is happening. I looked into <signal.h> and 
<sys/signal.h> and it is most definitely defined. (?)
Feb 05 2005