Please help with building gfortran 4.2.1 on OpenBSD
John Long
codeblue@inbox.lv
Fri Aug 31 08:05:00 GMT 2012
Steve,
On Thu, Aug 30, 2012 at 12:20:34PM -0700, Steve Kargl wrote:
> On Thu, Aug 30, 2012 at 06:46:07PM +0000, John Long wrote:
> > On Thu, Aug 30, 2012 at 11:05:08AM -0700, Steve Kargl wrote:
> > > On Thu, Aug 30, 2012 at 04:09:19PM +0000, John Long wrote:
> > > > Hi,
> > > >
> > > > OpenBSD has a system of scripts to build various software. Unfortunately
> > > > gfortran is not building on the current version of OpenBSD running on a
> > > > Fuloong (mips64el). I read there is a Fuloong in gcc's build farm so I
> > > > hope somebody has already figured this problem out and can tell me how to
> > > > fix it.
> > > >
> > > > I got the following error messages:
> > > >
> > > > /usr/ports/pobj/gfortran-4.2.1/gcc-4.2.1/gcc/
> > >
> > > This appears to be a build within the OpenBSD ports system
> > > framework.
> >
> > Yes, that is what I said. I am asking for help, not pointing fingers.
> >
> > > You'll probably need to ask whoever is responsible for the OpenBSD port
> > > for help.
> >
> > The port has no maintainer assigned to it so I hoped whoever is responsible
> > for gfortran would be interested in fixing it and then we could probably get
> > it back in the ports system on OpenBSD. I don't know whether it is broken on
> > other archs since nobody responded to my question on OpenBSD's ports@
> > mailing list.
> >
> > > gcc-4.2.1 was released 5 years ago, and gcc-4.2.x had reached
> > > its EOL some 3 years ago. I believe that it may be prudent to
> > > download gcc-4.7.1 from the GCC home page and build gfortran
> > > from outside of the OpenBSD port system. Instructions for
> > > building gcc can be found of the GCC website.
> >
> > I don't know but I am guessing a newer gfortran won't like the binutils
> > (2.15) or gcc (4.21) we already have installed. And it won't help others
> > since people normally use the ports tree. If it gets fixed there everyone
> > can use it. If not, everybody interested has to build it out of line and
> > that seems like a waste of effort and not very community-oriented.
>
> While there may be individuals subscribed to this
> list that run OpenBSD; AFAIK, none of the developers
> who actively participated in writing gfortran code
> run OpenBSD.
Understood.
> A peek at lang/gfortran/patches shows 61 patches are
> applied to the sources. gcc-4.2.x is EOL and those
> patches should have been sent upstream years ago.
> There is no chance that those patches, if needed,
> will ever be included in GCC 4.2 branch.
Thank you for taking the time to look into this. That sounds pretty grim.
> A peek at lang/gcc shows that one supposedly can build
> 4.2, 4.6, and 4.7 with that port
Unfortunately the newer gcc builds are often not supported (as in do not
build) on non-mainstream architectures. This was the first thing I checked
before posting to OpenBSD's ports mailing list and none of 4.2, 4.6, nor 4.7
will build on mips64el. They all give messages saying only amd64, i386,
powerpc, sparc, and sparc64 are supported. (4.2 also supports Alpha and VAX.)
> and the Makefile suggests that it includes gfortran support (although the
> port seem to rename the compiler to g95-*. Ouch!) It also appears that
> sthen@ and pascal@openbsd.org have updated lang/gcc in the last 2 days.
> You should probably directly ping those individuals.
I would guess the work they are doing is for the base gcc for future OpenBSD
releases and nobody is using Fortran now, at least not on mips. Do you mind
if I post your reply on OpenBSD's ports mailing list?
> As far as old binutils is concerned, there is devel/binutils.
I do not see any devel/binutils on my -current system. There are binutils
for arm-elf, avr, and msp430 though. I have tried to build a recent binutils
on other OS and they all seem to need a pretty recent binutils to build.
Again, thank you for taking the time to look into this. I realize you are
not responsible for making things work on every OS in the world but I
figured this would be the best list to try after the thundering silence on
OpenBSD ports. OpenBSD is coming up to a new release in November and
everybody is probably busy on more critical stuff for updating base.
Do you happen to know what the chances of success would be attempting to
download the 4.2.1 Fortran sources and compiling them in my gcc 4.2.1 tree?
I have never built gcc before (although I have built almost everything else)
and I am not a C programmer so if anything goes wrong I am not usually able
to fix it. I have no idea what the 61 patches are for, whether for security
issues or problems with actually building it.
I was hoping to use the mips box I am running this on as a development
box but if I can't get this resolved I may upgrade my Slackware box when
14.0 comes out because it will have gcc 4.7.1 including Fortran and I guess
that is a lot more recent than OpenBSD's gcc which is usually chosen based
on stability and security for production environments.
Thanks to you and everyone working on gcc and gfortran. It is really great
having these compilers available.
John Long
--
ASCII ribbon campaign ( ) Powered by Lemote Fuloong
against HTML e-mail X Loongson MIPS and OpenBSD
and proprietary / \ http://www.mutt.org
attachments Code Blue or Go Home!
More information about the Fortran
mailing list