delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/06/08/12:50:34

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-0.2 required=5.0 tests=AWL,BAYES_50,J_CHICKENPOX_53,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <579808.20759.qm@web25003.mail.ukl.yahoo.com>
References: <579808 DOT 20759 DOT qm AT web25003 DOT mail DOT ukl DOT yahoo DOT com>
From: Gustavo Seabra <gustavo DOT seabra AT gmail DOT com>
Date: Mon, 8 Jun 2009 12:50:01 -0400
Message-ID: <f79359b60906080950s7b7ee3f9n7423b747db677aa6@mail.gmail.com>
Subject: Re: R: [1.7] output redirection problems with gfortran
To: Marco Atzeri <marco_atzeri AT yahoo DOT it>
Cc: cygwin AT cygwin DOT com
X-IsSubscribed: yes
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

On Mon, Jun 8, 2009 at 10:21 AM, Marco Atzeri<marco_atzeri AT yahoo DOT it> wrote:
>
> --- Lun 8/6/09, Gustavo Seabra =A0ha scritto:
>
>> Da: Gustavo Seabra
>> Oggetto: [1.7] output redirection problems with gfortran
>> A: cygwin AT cygwin DOT com
>> Data: Luned=EC 8 giugno 2009, 15:28
>> Hi All,
>>
>> I'm having a strange problem with gfortran here. I am
>> trying to run a
>> simple configure program, but it chokes on the fortran
>> compilation.
>> The test program it uses is very simple:
>>
>> $ cat testp.f
>> =A0 =A0 =A0 program testf
>> =A0 =A0 =A0 write(6,*) 'testing a Fortran
>> program'
>> =A0 =A0 =A0 end program testf
>>
>> It is being compiled with:
>>
>> $ gfortran -O0 -fno-second-underscore -o testp testp.f
>>
>> and it generates the executable "testp.exe":
>>
>> $ ./testp
>> =A0testing a Fortran program
>>
>> The problem comes in the testing. If I try to redirect this
>> output to
>> pretty much anything, I get nothing:
>>
>> $ ./testp | /bin/grep Fortran
>> $
>>
>> (It returns nothing.) I also tried changing the compiler
>> options to
>> remove the -fno-second-underscore or the -O0 options, with
>> no changes.
>>
>> The same happens if I try to redirect the output to a file,
>> or try to
>> tee the output: to a file, i.e., in both cases I only get
>> empty files:
>> $ ./testp >& testp.out
>> $ cat testp.out
>> $
>>
>> or
>>
>> $ ./testp 2>&1 | tee testp.out
>> $ cat testp.out
>> $
>>
>> I attached the output of=A0 cygcheck -s -v -r in this
>> message. Here are
>> some more details about the gfortran version being used:
>>
>> $ gfortran --version
>> GNU Fortran (GCC) 4.3.2 20080827 (beta) 2
> [SNIP]
>
>>
>> Gustavo Seabra
>
> Hi Gustavo,
> we already noticed such fault and it is on the "long" list of
> Dave Korn to look for.
>
> http://thread.gmane.org/gmane.os.cygwin/104875/focus=3D104963
>
> I suspect it is more 1.7 related than gfortran related
> as the test program is working on cygwin-1.5.
>
> Regards
> Marco

Thanks. Compiling with -static, as suggested by Dave Korn, worked for me.

--=20
Gustavo Seabra
Postdoctoral Associate
Quantum Theory Project - University of Florida
Gainesville - Florida - USA
---------------------------------------------------------------------------=
----------------
Q:      Why do mountain climbers rope themselves together?
A:      To prevent the sensible ones from going home.

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