X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
From: "Dave Korn" <dave.korn@artimi.com>
To: <cygwin@cygwin.com>
References: <47F1B87A.3050709@gmail.com> <47F538F3.CAFABB19@dessent.net> <47F71B44.8030404@gmail.com> <47F72A42.C56BC03F@dessent.net> <47F7F17E.1090202@gmail.com> <003901c89972$d08f41b0$2708a8c0@CAM.ARTIMI.COM> <47FBA00A.2090201@gmail.com>
Subject: RE: Compiling Cygwin on Linux
Date: Tue, 8 Apr 2008 19:47:26 +0100
Message-ID: <00c801c899a8$fd7dba90$2708a8c0@CAM.ARTIMI.COM>
MIME-Version: 1.0
Content-Type: text/plain; 	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <47FBA00A.2090201@gmail.com>
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Robert Eckhoff wrote on 08 April 2008 17:41:

> Below are the errors I received before I made their
> associated changes.
> Dave Korn wrote:
>> Robert Eckhoff wrote on 05 April 2008 22:39:
>> 
>> 
>>> directories. Winsup also had some source problems that I corrected.
>>> 
>>> ~/cygwin-1.5.25-11/winsup/cygwin/winsup.h:276
>>> -extern bool wsock_started;
>>> +extern "C" bool wsock_started;
>>> 
>>> 
> Before I made the change, Error:
> /home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/winsup.h:276: error:
> previous declaration of 'bool wsock_started' with 'C++' linkage
> /home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/autoload.cc:246
>> error:
> conflicts with new declaration with 'C' linkage

  How bizarre.  You said you were using a series 4 GCC, didn't you?  This
could be a bug or oversight in the code that generates the error - maybe it
should be downgraded to a warning.  Or maybe there's something coming up in
C++0x that applies linkage to variables.  I'll have to raise it on the gcc
list, thanks for the details.

>>> ~/cygwin-1.5.25-11/winsup/cygwin/syscall.cc:3238
>>> Uses goto's which breaks the build with gcc4.3. I rewrote the function
>>> to use if statements. 
>>> 
>> 
>>   What kind of problem does gcc4.3 have with gotos? There's nothing wrong
>> with them in general and lots of other functions in that file have them,
>> so maybe there's some underlying problem which is the actual thing that
>> needs fixing? 

> /home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/syscalls.cc:
> In function
> 'FILE* popen(const char*, const char*)':
> /home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/syscalls.cc:323 8: error:
> jump to label 'err'
> /home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/syscalls.cc:3230: error:  
> from here /home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/syscalls.cc:3233:
> error:   crosses initialization of 'fhandler_pipe* fh'
> /home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/syscalls.cc:323 8: error:
> jump to label 'err'
> /home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/syscalls.cc:3210: error:  
> from here /home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/syscalls.cc:3233:
> error:   crosses initialization of 'fhandler_pipe* fh'

  Ah, yes, that is potentially quite a nasty thing to happen.  I wonder if
there's a code path where it could end up using the uninitialised 'fh'?  I'll
take a look.


  BTW, you're stepping into unknown territory trying to build the DLL with
such a recent GCC.  The distro compiler is still on 3.4.4 for a number of
reasons (see archives passim ad nauseam), so you're probably the first to
discover these issues; thanks for the report!


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

