1 |
Honza Macháček wrote: |
2 |
> I have just manually compiled Quantum ESPRESSO on my Athlon 2500+. |
3 |
> Since I have little experience in making ebuilds and not much time for |
4 |
> trying, I'm not sure if I can produce anything usable for Bugzilla. |
5 |
> Therefore I at least rely, what I did: |
6 |
|
7 |
Great! |
8 |
|
9 |
> 1. Tried playing with the ebuild from Spyderous overlay, thoug I don't |
10 |
> have ifc. All my attempts only crippled the ebuild and failed miserably. |
11 |
|
12 |
In theory my ebuild should work at least up through src_compile(), I |
13 |
think src_install() is still broken. It's a work in progress. |
14 |
|
15 |
> 2. Tried manual compilation of the sources from |
16 |
> http://www.pwscf.org/download.htm using gfortran of gcc-4.1.1 |
17 |
> (F90=gfortran ./configure && make all). Died of internal compiler error. |
18 |
|
19 |
Yep. I've filed a gcc bug for this -- |
20 |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27889 -- although I think |
21 |
there is another ICE in the same file. |
22 |
|
23 |
> 3. Looked at g95 (http://www.g95.org/src.shtml). Ugly source structure, |
24 |
> queer building sequence and essentially no version numbering. May be |
25 |
> best installed as an option of gcc (g95 USE flag?). |
26 |
|
27 |
Nah, needs to be a separate package since it's distributed separately |
28 |
and so forth, like gnat. I wouldn't mind having an ebuild for this, though. |
29 |
|
30 |
> 4. Looked at the gcc-4.1.1 ebuild. Heavy reading due to heavy use of the |
31 |
> toolchain eclass. Gave up ebuild adaptation. |
32 |
> |
33 |
> 5. Tried manual compilation of g95 with gcc-4.1.1 sources. Failed. |
34 |
> |
35 |
> 6. Tried manual compilation of g95 with gcc-4.0.3 sources, that |
36 |
> according to the webpage should work. Success. Installed in /usr/local |
37 |
> and added /usr/local/bin/g95 symlink to i686-pc-linux-gnu-g95. |
38 |
> Standalone ebuild for g95 would be probably better than merging it with |
39 |
> gcc after all, and easier to create too, yet still likely beyond my ability. |
40 |
|
41 |
Agreed, standalone is the way to go. Surprised it's broken on gcc 4.1. |
42 |
|
43 |
|
44 |
> 7. Tried manual compilation of ESPRESSO (./configure && make all). |
45 |
> Mostly worked, only tools crashed due to metadyn_pp referencing |
46 |
> undefined pgopen_. |
47 |
> |
48 |
> 8. Found on the web that pgopen should be found in the pgplot package. |
49 |
> Tried to emerge that, but failed for the lack of g77. |
50 |
> |
51 |
> 9. Mangled pgplot ebuild to recognize g95 and tried emerging again. g95 |
52 |
> was not accepted by the ebuild. |
53 |
|
54 |
You need to edit fortran.eclass to recognize g95. There are three places |
55 |
in there where you need to add a g95 bit -- two case statements and one |
56 |
OR list of all the compilers like "g95|g77|gfortran|icc|ifort" or so. |
57 |
|
58 |
> 10. Mangled pgplot ebuild to recognize gfortran and tried emerging |
59 |
> again. Failed due to syntax errors in arguments supplied to GRGI0[1-6] |
60 |
> functions. |
61 |
|
62 |
pgplot can't work with gfortran now because gfortran doesn't recognize |
63 |
%VAL -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23060. I've got a |
64 |
pgplot patch that deals with most of the rest of the issues, but waiting |
65 |
on that. |
66 |
|
67 |
> 11. Turned again to g95. Mangled fortran.eclass to recognize that (and |
68 |
> prioritize over gfortran, althoug not stating gfortran in the ebuild |
69 |
> might neutralize its default priority as well). Emerged pgplot. g95 |
70 |
> shouted warnings of ``Inconsistent types (INTEGER(4)/INTEGER(1)) in |
71 |
> actual argument lists'' in GRGI0[1-6] functions, but compiled the code. |
72 |
|
73 |
Ah, see you figured out the eclass here.. |
74 |
|
75 |
> 12. Tried manual compilation of ESPRESSO (./configure && make all). |
76 |
> Mostly worked, only tools crashed due to metadyn_pp referencing |
77 |
> undefined pgopen_. |
78 |
> |
79 |
> 13. Grepped the ESPRESSO source tree for pgopen_, found nothing. Grepped |
80 |
> for pgplot. Found libraries configuration mentioned in |
81 |
> pwtools/metadyn_pp.f90, but nowhere in makefiles or the configure script. |
82 |
|
83 |
Try 'grep -i pgopen -r .' in the espresso source. The underscore isn't |
84 |
in the Fortran, that's added by the compiler/linker. |
85 |
|
86 |
> 14. Edited make.sys, added -D__PGPLOT to DFLAGS and ``-lm -lc -lpgplot |
87 |
> -lX11'' to LIBS. Compiled successfuly. |
88 |
> |
89 |
> Now I have to first learn using ESPRESSO to test, wheather my build |
90 |
> actually works. If I manage to sum up my compilation steps into ebuilds |
91 |
> and patches, I'll put them on Bugzilla, but I'm affraid I cannot promise |
92 |
> that. |
93 |
|
94 |
I just don't think we can add it to the tree until a few more gfortran |
95 |
bugs get fixed. |
96 |
|
97 |
Thanks, |
98 |
Donnie |