Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 147033
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Robin Johnson <robbat2@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Bob Johnson <ke6fis@arrl.net>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
fix-missing-rshift.patch Patch to 6.94-r1 to fix missing rshift intrinsic patch Bob Johnson 2006-09-10 22:40 0000 1.03 KB Details | Diff
xfoil-6.96.ebuild xfoil-6.96.ebuild text/plain Sébastien Fabbro 2007-05-06 17:36 0000 1.85 KB Details
xfoil-6.96-gfortran.patch xfoil-6.96-gfortran.patch patch Sébastien Fabbro 2007-05-06 17:36 0000 993 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 147033 depends on: Show dependency tree
Bug 147033 blocks: 117482
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-09-10 01:52 0000
gfortran -o xfoil xfoil.o xpanel.o xoper.o xtcam.o xgdes.o xqdes.o xmdes.o
xsolv
e.o xbl.o xblsys.o xpol.o xplots.o xgeom.o xutils.o modify.o polplt.o aread.o
na
ca.o spline.o plutil.o iopol.o gui.o sort.o dplot.o profil.o userio.o
../plotlib
/libPlt.a  -L/usr/X11R6/lib -lX11 -lblas
../plotlib/libPlt.a(ps_subs.o): In function `bitpat_':
ps_subs.f:(.text+0x77): undefined reference to `rshift_'
ps_subs.f:(.text+0xee): undefined reference to `rshift_'
collect2: ld returned 1 exit status
make: *** [xfoil] Error 1

!!! ERROR: sci-physics/xfoil-6.94-r1 failed.
Call stack:
  ebuild.sh, line 1539:   Called dyn_compile
  ebuild.sh, line 939:   Called src_compile
  xfoil-6.94-r1.ebuild, line 56:   Called die

!!! failed to build xfoil
!!! If you need support, post the topmost build error, and the call stack if
rel
evant.


This is apparently the result of this gcc issue:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19292

which is a meta-bug report that shows the fortran rshift intrinsic is not yet
implemented in gfortran, the new GCC 4 fortran replacement for the older F77
compiler.

rshift is only being called twice, and it's only right-shifting by 1 each time.
It shouldn't be too hard to fix the source code to avoid the use of the
intrinsic for the time being until the gfortran compiler gets fixed. I'll have
a look at it and see if I can come up with a patch.

------- Comment #1 From Bob Johnson 2006-09-10 22:40:19 0000 -------
Created an attachment (id=96662) [details]
Patch to 6.94-r1 to fix missing rshift intrinsic

I'm no fortran expert, but I found this URL:

http://gcc.gnu.org/onlinedocs/gcc-3.4.1/g77/IShft-Intrinsic.html#IShft%20Intrinsic

which seems to exist in 4.1.1 even though it is not in the online docs yet.
This patch replaces the rshift intrinsic with this ishft intrinsic. This code
seems to compile and run OK. I tried some test cases with this new version
versus the old code compiled with gcc 3.4.6 and everything appears to work. I'm
no expert with this code though so I would hardly call it an exhaustive
analysis. 

On a related note, I notice that xfoil is now at 6.96:

http://web.mit.edu/drela/Public/web/xfoil/

I downloaded this new code and see it has the same rshift issue. Making an
ebuild for this new code will be tricky since it doesn't use autoconfig and
requires Makefile modifications for paths to binaries, compiler, etc. etc.
I'm beginning to wonder if xfoil should even be in portage. It's so specialized
I suspect few Gentoo users even know what it's for. It's a pain to configure,
and if you *really* are going to use it you probably want to run a number of
test cases to verify that the compiler-du-jour on your Gentoo box is actually
producting correct output. If none of the developers have time to stay on top
of it maybe it shouldn't even be in the portage tree.

------- Comment #2 From Grégoire Favre 2006-09-17 07:48:27 0000 -------
Thank you very much for the patch :)

------- Comment #3 From Sébastien Fabbro 2007-05-06 17:36:06 0000 -------
Created an attachment (id=118365) [details]
xfoil-6.96.ebuild

Here is an ebuild for a newer version, with some changes and a patch for the
gfortran bug. It compiles fine on my amd64, but I have no idea on how to test
the package. Let me know if it works for you.

------- Comment #4 From Sébastien Fabbro 2007-05-06 17:36:50 0000 -------
Created an attachment (id=118366) [details]
xfoil-6.96-gfortran.patch

------- Comment #5 From Sébastien Fabbro 2007-05-23 20:18:09 0000 -------
fixed in cvs with a few changes from the proposed patch.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug