delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/11/30/09:20:46

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Fri, 30 Nov 2007 15:20:08 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Cc: fortran AT gcc DOT gnu DOT org
Subject: Re: Failure in building GFortran on Cygwin
Message-ID: <20071130142008.GX30894@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com, fortran AT gcc DOT gnu DOT org
Mail-Followup-To: cygwin AT cygwin DOT com, fortran AT gcc DOT gnu DOT org
References: <Pine DOT CYG DOT 4 DOT 58 DOT 0711292328360 DOT 1532 AT homepc> <474F61CD DOT 1060405 AT verizon DOT net>
MIME-Version: 1.0
In-Reply-To: <474F61CD.1060405@verizon.net>
User-Agent: Mutt/1.5.16 (2007-06-09)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

[Forgot to CC the fortran list.  Re-sending...]

On Nov 29 17:05, Jerry DeLisle wrote:
> Angelo Graziosi wrote:
>> /tmp/gcc/libgfortran/intrinsics/system_clock.c: In function
>> 'system_clock_4':
>> /tmp/gcc/libgfortran/intrinsics/system_clock.c:67: error: storage size of
>> 'tzp' isn't known
>> /tmp/gcc/libgfortran/intrinsics/system_clock.c:67: warning: unused
>> variable 'tzp'
>> /tmp/gcc/libgfortran/intrinsics/system_clock.c: In function
>> 'system_clock_8':
>> /tmp/gcc/libgfortran/intrinsics/system_clock.c:130: error: storage size of
>> 'tzp' isn't known
>> /tmp/gcc/libgfortran/intrinsics/system_clock.c:130: warning: unused
>> variable 'tzp'
>> [...]
>> The Cygwin version is 1.5.25-2 (exp.).
> I can confirm this.  I saw it last wekend trying to do my regular cygwin 
> build of gfortran for the wiki.  The build died and I assumed I did 
> something wrong and was going to try back later.
>
> Well this is definitely a regression somewhere.  Its not on the gfortran 
> side which has not touched that file for several months.  It could be 
> something broke in the configure for cygwin.  The error occurs in a 
> conditional comapile:
>
> #if defined(HAVE_SYS_TIME_H) && defined(HAVE_GETTIMEOFDAY)
>
> I will open a PR to track this.

A simple testcase would have been much more helpful.

>From the name of the variable I assume that tzp is a `struct timezone'
variable.  Given that it's unused, and given that struct timezone is a
BSDism which isn't present in the POSIX standard(*), it might be a good
idea to just remove it entirely from the source or to keep it only when
the build target is a BSD system.

However, this *is* a problem in the newlib/cygwin headers.  Cygwin
exports a timezone function and a _timezone variable.  The timezone
function was an ill-advised invention in Cygwin way back in the last
century.  Unfortunately it has to be kept for backward compatibility.
Alas, we're stuck with the _timezone variable and we have to

  #define timezone _timezone

at one point in the headers.  The problem is that the above define
happens in a Cygwin specific header after the definition of `struct
timezone'.  So the usage of `struct timezone' in application code
results in a `struct _timezone', which is not defined and the above
error occurs.

AFAICS there are at least two ways to solve this problem, but I'm a bit
unsure right now, which is the better one.  Saty tuned.


Corinna


(*) gettimeofday's second parameter is void* in POSIX, see
    http://www.opengroup.org/onlinepubs/009695399/functions/gettimeofday.html

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

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