Bug 1623

Summary: Add FORTRAN support back into the SDKs
Product: [Maemo Official Platform] Development platform Reporter: Simon Pickering <S.G.Pickering>
Component: generalAssignee: unassigned <nobody>
Status: RESOLVED WONTFIX QA Contact: dev-platform-general-bugs
Severity: enhancement    
Priority: High CC: andre_klapper, eero.tamminen, juha.kallioinen, luciano.wolf, michel.sylvan, pokey909, quim.gil, S.G.Pickering
Version: 3.2   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Simon Pickering (reporter) maemo.org 2007-07-06 16:52:37 UTC
The Maemo 2.x SDKs had FORTRAN (g77) support. The newer 3.x versions do not.
Previously the FORTRAN binaries were present in the rootstrap (i.e. in
/usr/bin) rather than part of the toolchain installation afaict.

In any case could we have FORTRAN back please?

Thanks,


Simon
Comment 1 Quim Gil nokia 2007-10-10 13:40:09 UTC
Question: why is it FORTRAN relevant for maemo?
Comment 2 Simon Pickering (reporter) maemo.org 2007-10-10 14:10:09 UTC
Quite simply a fair few mathematical routines were written in FORTRAN (e.g.
lapack, fftpack). These are used by a variety of software packages including
Octave and R.

F2C is an option, however it depends on what you're compiling as it only
accepts standard FORTRAN 77 code
(http://www.nikhef.nl/~templon/fortran/f2c.html).

Having g77 would just make life easier.

For an objective overview:
http://gcc.gnu.org/onlinedocs/gcc-3.4.6/g77/Advantages-Over-f2c.html

Simon
Comment 3 Quim Gil nokia 2007-10-10 14:33:37 UTC
Alright, but then it could be offered as a separate package for developers, not
necessarely tied to the SDK release. Am I right?

CCing Juha to know his opinion.
Comment 4 Simon Pickering (reporter) maemo.org 2007-10-10 14:43:45 UTC
Perhaps we're at crossed purposes here?

FORTRAN support, to me at least, means the availability of g77 in the (gcc)
toolchain (this brings with it any support libraries that are linked in when
FORTRAN code is compiled using g77/gcc). By definition this is for developers
so that's why I was asking for it in the SDK.

It is possible to add it on afterwards, but would presumably be easier if it
were just included when the base toolchain is compiled
(--enable-languages="c,c++,f77" or words to that effect).

I believe there were some FORTRAN/ABI issues and this presumes that these have
been resolved of course.
Comment 5 Juha Kallioinen nokia 2007-10-10 15:40:22 UTC
My sources tell me that it is not trivial to offer Fortran support with the
current development environment as a part of the toolchain we use.

As you know since 2.x our architecture has changed from ARM to ARMEL and the
ARMEL toolchain has some issues with Fortran. 

Currently Debian does not offer the g77 as a package for ARMEL, so we can't
easily port it from there to the rootstrap either.
Comment 6 Simon Pickering (reporter) maemo.org 2007-10-10 16:39:27 UTC
That's fair enough. Can we change the status to LATER (or something like that)
and look again once the next toolchain comes out/there's a Debian package
available/the ABI problems are resolved?

Thanks,

Simon
Comment 7 Juha Kallioinen nokia 2007-10-10 16:58:15 UTC
Yes let's keep this on the backlog and eyes open for fixes on this area.
Comment 8 Michel Salim 2007-10-31 22:57:16 UTC
Latest version of gcc comes with gfortran instead, which is (mostly) Fortran
95-compatible. Debian has it packaged for ARM -- is that old-style ARM or
ARMEL?

http://packages.debian.org/gfortran
Comment 9 Simon Pickering (reporter) maemo.org 2007-11-01 01:46:41 UTC
I think this needs GCC 4.x.x while the maemo sdk uses a GCC 3.x.x toolchain. 

Thanks for the pointer anyway.
Comment 10 Eero Tamminen nokia 2008-09-01 15:39:55 UTC
*** Bug 930 has been marked as a duplicate of this bug. ***
Comment 11 Andre Klapper maemo.org 2008-09-08 14:40:47 UTC
(In reply to comment #9)
> I think this needs GCC 4.x.x while the maemo sdk uses a GCC 3.x.x toolchain. 

According to http://maemo-sdk.garage.maemo.org/ , maemo SDK+ Beta-1.5 release
includes GCC 4.2.1.

In any case, reopening to get rid of the deprecated RESOLVED LATER resolution.
Comment 12 Andre Klapper maemo.org 2008-10-14 13:34:50 UTC
(In reply to comment #9)
> I think this needs GCC 4.x.x while the maemo sdk uses a GCC 3.x.x toolchain. 

(In reply to comment #11)
> According to http://maemo-sdk.garage.maemo.org/ , maemo SDK+ Beta-1.5 release
> includes GCC 4.2.1.

Simon, is now fixed or at least easier by having gcc 4.x.x available?
Comment 13 Andre Klapper maemo.org 2008-11-12 17:29:03 UTC
Simon: ping
Comment 14 Quim Gil nokia 2008-12-25 14:36:45 UTC
What is the resolution of this report?

Setting High priority only as a reminder.
Comment 15 Simon Pickering (reporter) maemo.org 2008-12-25 15:56:18 UTC
Am not in front of my build machine, but if g77 or gfortran is available in the
Fremantle SDK then let's close this; otherwise can we have it added in please?

Merry Christmas :-)
Comment 16 Quim Gil nokia 2009-01-08 17:16:23 UTC
(In reply to comment #15)
> Am not in front of my build machine, but if g77 or gfortran is available in the
> Fremantle SDK then let's close this; otherwise can we have it added in please?

Can someone check, please?
Comment 17 Eero Tamminen nokia 2009-01-08 17:42:40 UTC
(In reply to comment #16)
> (In reply to comment #15)
>> Am not in front of my build machine, but if g77 or gfortran is available in
>> the Fremantle SDK then let's close this; otherwise can we have it added in
>> please?

gfortran (or g77) doesn't come as part of Fremantle GCC.


(In reply to comment #8)
> Latest version of gcc comes with gfortran instead, which is (mostly) Fortran
> 95-compatible. Debian has it packaged for ARM -- is that old-style ARM or
> ARMEL?
> http://packages.debian.org/gfortran

For Etch (having gcc 4.1) only non-EABI ARM, for Lenny (having gcc 4.3), also
EABI ARMEL. Fremantle GCC version is 4.2.

Juha, does the GCC 4.2 Fortran part have still issues with EABI?
Comment 18 Juha Kallioinen nokia 2009-01-09 14:15:06 UTC
(In reply to comment #17)
> (In reply to comment #16)
> > (In reply to comment #15)
> >> Am not in front of my build machine, but if g77 or gfortran is available in
> >> the Fremantle SDK then let's close this; otherwise can we have it added in
> >> please?
> 
> gfortran (or g77) doesn't come as part of Fremantle GCC.
> 
> 
> (In reply to comment #8)
> > Latest version of gcc comes with gfortran instead, which is (mostly) Fortran
> > 95-compatible. Debian has it packaged for ARM -- is that old-style ARM or
> > ARMEL?
> > http://packages.debian.org/gfortran
> 
> For Etch (having gcc 4.1) only non-EABI ARM, for Lenny (having gcc 4.3), also
> EABI ARMEL. Fremantle GCC version is 4.2.
> 
> Juha, does the GCC 4.2 Fortran part have still issues with EABI?

All I know is that Codesourcery does not provide the fortran compiler from
their compiler distribution, only C and C++. There are no guarantees that
fortran will work (generate proper code).

If we make it available in the SDK it would also mean that we should maintain
it and take care of the possible bugs that are found. I'm not too excited about
that aspect.
Comment 19 Simon Pickering (reporter) maemo.org 2009-01-09 14:22:16 UTC
That's fine, I completely accept that supporting it will be extra hassle for
you guys. This is a niche thing (i.e. it's probably just me who wants it) so I
accept I'll just have to add it in myself or use f2c (which is supposed to be
half decent these days I think/hope ;). 

I'm happy for the bug to be closed as WONTFIX or similar.
Comment 20 Andre Klapper maemo.org 2009-01-09 14:56:30 UTC
WONTFIX as per comments 18 and 19.
Comment 21 pokey909 2009-12-06 18:56:13 UTC
(In reply to comment #19)
> That's fine, I completely accept that supporting it will be extra hassle for
> you guys. This is a niche thing (i.e. it's probably just me who wants it) so I
> accept I'll just have to add it in myself or use f2c (which is supposed to be
> half decent these days I think/hope ;). 
> 
> I'm happy for the bug to be closed as WONTFIX or similar.
> 

I just wanted to tell you, its NOT only you who misses Fortran support. Even
though GUI programmers wont ever miss Fortran, all guys wanting to implement
stuff that requires soem sort of machine learning, classification, signal
processing etc. will ALWAYS miss it. 
Lacking Fortran support will prevent the development of highly useful and
sophisticated apps for sure!

Potential uses: 
- Image based classification of locations
- Classification of movements
- Voice recognition
...

So, I hope this will get fixed in the near future. I consider it as a highly
relevant feature.

-- alex
Comment 22 Simon Pickering (reporter) maemo.org 2009-12-07 16:04:04 UTC
One thing that has worked for me in the past is f2c + fort77

I'm going to compile Octave this week so will need to push these packages to
the repo beforehand anyway.
Comment 23 pokey909 2009-12-07 21:46:14 UTC
Fortunatly, the new Ubuntu release has all the necessary binary ARMEL packages
to get SciPy running with BLAS/Lapack.
So for me, it is running at the moment (at least in scratchbox on ARMEL
target). So i guess it should also run on the real device.