Hi,
There seem to be two problems compiling cygrunsrv from source with gcc 3.2:
- gcc now complains that the default argument for the func parameter of
  error() in utils.cc is specified twice (once in the prototype and once
  in the definition).  Exact output below:
        g++    -c -o utils.o utils.cc
        utils.cc: In function `int error(reason_t, const char*, long unsigned int)':
        utils.cc:75: default argument given for parameter 2 of `int error(reason_t,
           const char* = 0, long unsigned int)'
        utils.h:65: after previous specification in `int error(reason_t, const char* =
           0, long unsigned int = 0)'
        make: *** [utils.o] Error 1
- Makefile uses gcc to link, which results in an "undefined symbol:
  ___gxx_personality_v0" errors.  Exact output below:
        gcc -o cygrunsrv.exe -s cygrunsrv.o crit.o utils.o
        cygrunsrv.o(.eh_frame+0x11):cygrunsrv.cc: undefined reference to 
`___gxx_personality_v0'
        crit.o(.eh_frame+0x11):crit.cc: undefined reference to `___gxx_personality_v0'
        utils.o(.eh_frame+0x11):utils.cc: undefined reference to 
`___gxx_personality_v0'
        collect2: ld returned 1 exit status
        make: *** [cygrunsrv.exe] Error 1

The attached patch fixes both of the above issues.
        Igor
===========================================================================
ChangeLog:
2003-02-18  Igor Pechtchanski <[EMAIL PROTECTED]>

        * utils.cc: (error) Fix function definition.
        * Makefile: Use correct linker in $(TARGET).exe rule.

-- 
                                http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_                [EMAIL PROTECTED]
ZZZzz /,`.-'`'    -.  ;-;;,_            [EMAIL PROTECTED]
     |,4-  ) )-,_. ,\ (  `'-'           Igor Pechtchanski
    '---''(_/--'  `-'\_) fL     a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
  -- /usr/games/fortune
--- ./Makefile-orig     2001-05-23 05:06:15.000000000 -0400
+++ ./Makefile  2003-02-18 14:55:18.000000000 -0500
@@ -18,7 +18,7 @@ OBJ=  cygrunsrv.o \
        utils.o
 
 $(TARGET).exe: $(OBJ)
-       $(CC) -o $@ $(LDFLAGS) $(OBJ)
+       $(CXX) -o $@ $(LDFLAGS) $(OBJ)
 
 install: $(TARGET).exe
        mkdir -p $(bindir) $(docdir)
--- ./utils.cc-orig     2002-02-26 06:22:29.000000000 -0500
+++ ./utils.cc  2003-02-18 14:52:13.000000000 -0500
@@ -71,7 +71,7 @@ char *reason_list[] = {
 };
 
 int
-error (reason_t reason, const char *func = NULL, DWORD win_err)
+error (reason_t reason, const char *func, DWORD win_err)
 {
   if (reason > UnrecognizedOption && reason < MaxReason)
     {
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply via email to