Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 64886 - xmingw-gcc doesn't build fortran compiler
Summary: xmingw-gcc doesn't build fortran compiler
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Stefan Jones (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-21 12:28 UTC by Mark <Line72> Dillavou
Modified: 2004-09-22 11:13 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to add fortran use flags (patch.diff,395 bytes, patch)
2004-09-21 12:41 UTC, Mark <Line72> Dillavou
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark <Line72> Dillavou 2004-09-21 12:28:26 UTC
the xmingw-gcc build doesn't have any use flags to determine whether it should build the fortran compiler (g77), objective c, or java.  I haven't tried to build it with objective c or java, but have successfully built it with the fortran compiler.

Reproducible: Always
Steps to Reproduce:
1. emerge xmingw-gcc
2. 
3.

Actual Results:  
i386-mingw32msvc-g77 was not built

Expected Results:  
expect i386-mingw32msvc-g77 to be built and installed

I have attached a small diff which includes a fortran use flags.  This really
should be extended to include other options too.  I feel that this whole ebuild
should eventually be re-written, especially since if you didn't install
xmingw-runtime and xmingw-w32api first, it doesn't build a c++ compiler!  The
c++ should also be a use flags, and automatically install xmingw-runtime and
xmingw-w32api if needed.
Comment 1 Mark <Line72> Dillavou 2004-09-21 12:41:13 UTC
Created attachment 40121 [details, diff]
patch to add fortran use flags
Comment 2 Stefan Jones (RETIRED) gentoo-dev 2004-09-21 17:18:12 UTC
I hope you know the concept of bootstrapping a cross compiler.

Because to build xmingw-runtime you first need to build i386-mingw32msvc-gcc 
(the C compiler) first as it uses it to compile things.

But to build i386-mingw32msvc-g++ and maybe i386-mingw32msvc-g77 (not tested) you need xmingw-runtime.

Thus the chicken and the egg situation. So you need to emerge xmingw-gcc twice to get g++ (and maybe g77)

Could you unmerge xmingw-gcc and xmingw-runtime and then emerge xmingw-gcc with your patch? Does g77 build ok without xmingw-runtime or does it need it?
Comment 3 Mark <Line72> Dillavou 2004-09-21 18:14:23 UTC
Sorry, I didn't realize that the cross-compiled c compiler was used to compile things.  The:

use f77 && lang="${lang},f77"

could just be moved up a couple lines inside the block where it checks if xmingw-runtime is installed, and then build fortran on the second install.  Is there a better way to do this, so that xmingw-gcc is automatically built twice ?
Comment 4 Stefan Jones (RETIRED) gentoo-dev 2004-09-21 21:56:18 UTC
When bootstrapping a system you normally have to compile gcc twice, see the gentoo stage1 bootstrap building, gcc is emerged twice.

About making it automatic, not sure if portage supports it and will just annoy people who only want gcc so do not want to emerge gcc twice.

Will just add a comment at the end of the ebuild I think.

Will add the fortran stuff after I have tested it out, and check it does or does not need xmingw-runtime.
Comment 5 Mark <Line72> Dillavou 2004-09-22 04:23:50 UTC
the fortran stuff did not compile for me unless I had runtime already installed.
Comment 6 Stefan Jones (RETIRED) gentoo-dev 2004-09-22 11:13:35 UTC
See xmingw-gcc-3.4.1-r1.ebuild

Added and tested the compiler, it compiles a trivial bit of fortran code and it runs fine under wine.

Thanks