delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/04/27/21:11:50

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <408F0526.8090904@hq.astra.ph>
Date: Wed, 28 Apr 2004 09:13:10 +0800
From: Carlo Florendo <list-subscriber AT hq DOT astra DOT ph>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: blackbox does not compile with latest cygwin
References: <408C81CB DOT 6010206 AT hq DOT astra DOT ph> <6 DOT 1 DOT 0 DOT 6 DOT 0 DOT 20040425233831 DOT 037630e8 AT 127 DOT 0 DOT 0 DOT 1> <408CA7F6 DOT 3010502 AT hq DOT astra DOT ph> <Pine DOT GSO DOT 4 DOT 56 DOT 0404260840590 DOT 23752 AT slinky DOT cs DOT nyu DOT edu> <408DDC6F DOT 1060803 AT hq DOT astra DOT ph> <Pine DOT GSO DOT 4 DOT 56 DOT 0404271024570 DOT 3335 AT slinky DOT cs DOT nyu DOT edu>
In-Reply-To: <Pine.GSO.4.56.0404271024570.3335@slinky.cs.nyu.edu>
X-IsSubscribed: yes

Igor Pechtchanski wrote:

>>I installed the exact blackbox version as last time which is the latest
>>official release.  This latest official release has one file that calls
>>assert() but does not #include it.  I checked its include tree and, as
>>far as I looked, have not found the #include <assert.h> anywhere on the
>>tree.
>>    
>>
>
>Yes, because it expects <assert.h> to be included from one of the system
>headers.
>
Ok.  I see.  Now I'm starting to see the big picture.

>>Other files that call assert have the header included in them. The
>>strangest thing is that the same version compiles under the current
>>linux that I have (Redhat 9.0), the former cygwin, but *not* the latest
>>cygwin.
>>    
>>
>
>That's because some Cygwin system headers got changed to not include
><assert.h> where they previously did.
>
Bingo!  Thanks for this info or I would not be able to sleep being 
bothered by why it behaves differently across different
platforms.    Oh, I made the assumption that blackbox would compile 
under different platforms!  That's it!  I almost forgot that
different platforms have different characteristics and different issues!

>  
>
>>It compiles with the latest cygwin if I #include <assert.h> on
>>the file in question.
>>
>>Does this mean that there is a problem with gcc?   or configure?  I'm
>>confused now whether the problem resides in the packaging of blackbox,
>>in the way ./configure runs on the old cygwin, or on the way ./configure
>>runs on the new cygwin, or in Linux or even in gcc.    Why doesn't gcc
>>complain in the old cygwin and in Linux?
>>    
>>
>
>The problem is with blackbox.  Apparently, some of the Linux system
>headers[*] include <assert.h>, and so did some of the Cygwin ones.  So
>this particular file in blackbox relied on a needed header (<assert.h>) to
>be inluded from elsewhere (another header).  This is a bug.  Cygwin's
>headers got changed, and <assert.h> is no longer in the include chain, so
>blackbox broke.  The fix is to #include <assert.h> in the file that calls
>assert(). It may also be possible to do this through some configure magic
>if the project maintainers *really* want to avoid including <assert.h>
>twice in the project code, but why bother?
>
Absolutely.  Thanks for this wonderful explanation.  I really see the 
problem with blackbox now.

>>I could submit a patch to the blackbox maintainers but will have to tell
>>them that the reason for it is so that it will compile with the latest
>>cygwin.  Or could it be that ./configure needs to be patched?
>>
>>    
>>
>The reason for the patch is portability.  Sure, it will compile on the
>current Linux, but POSIX doesn't require any other header to include
><assert.h>, so blackbox should do it itself.  As I said above, I don't
>think you should bother with patching configure.
>	Igor
>[*] If you want to find out which header includes <assert.h> on Linux,
>simply preprocess the broken file on Linux using gcc -E and see where
>"assert.h" got included from.
>

Ok.  I will submit a patch to the blackbox maintainers and clarify this 
issue with its mailing list.  Thank  you
very much  Igor for this entire clarification. You cygwin people are 
really the best :)

Best Regards,

Carlo
------
Carlo Florendo
Astra Philippipnes Inc.
www.astra.ph


--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019