This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libgfortran problem


I, finally, build libgfortran library. But a simple hello world program on
running
on the BOARD is giving SEGMENTATION FAULT.
The program is -
<PROG_BEGIN name=hello.f>
PRINT *, "Hello World"
END
</PROG_END>
And the compile command is
~$gfortran --free-form -static hello.f -ohello

The hello is generated finely but the sigfault is thrown.
1. What may the problem be?
2. Are there different sets of start up files used in the case 
of fortran than that of C? Like what needs to be initialized at
start up?   


Steve Kargl wrote:
> 
> On Thu, Jan 19, 2012 at 10:55:05PM -0800, vikramsp wrote:
>> Thanks Steve.
> 
> Please, don't top-post.  You lose context when you do.
> 
>> 1) gcc version - gcc-4.1.2 (gcc-4.5.1 is being used for compiling
>> gcc-4.1.2)
> 
> Why 4.1.2?  gfortran in that version is rather buggy compared
> to, well, anything newer.  If you have 4.5.1, why not use 
> gfortran that comes with it?
> 
>> 2) OS - fedora 14
>> 3) Previously the source tree for gcc-4.1.2 wasn't having FORTRAN
>> support at all i.e. no libgfortran or fortran folder was there.
>> I just added them in the source tree and tried to compiled with
>> --enable-languages=c,fortran.
> 
> Did add them in the right place?
> 
>> The fortran compiler driver is generated but libraries are not and no
>> error
>> is thrown.
>> it seems that compiler is not even looking inside libgfortran directory.
> 
> This does not answer the question that I ask.
> 
>> 4) Yes.
>> 
>> Now what could be the problem?
>> 
> 
> I can't tell because you failed to answer 
> 
>>>   3) exactly how you tried to build gcc
> 
> Try 
> 
> mkdir tmp
> cd tmp
> fetch ftp://ftp.gnu.org/gnu/gcc/gcc-4.1.2/gcc-4.1.2.tar.bz2
> tar -jxf gcc-4.1.2.tar.bz2
> mkdir obj
> cd obj
> ../gcc-4.1.2/configure --enable-languages=c,fortran --enable-bootstrap
> make bootstrap
> 
> 
> 
> -- 
> Steve
> 
> 


-----
Thanks,
 - vikramsp
-- 
View this message in context: http://old.nabble.com/libgfortran-problem-tp33172405p33313077.html
Sent from the gcc - fortran mailing list archive at Nabble.com.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]