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.
Created attachment 96662 [details, diff] 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.
Thank you very much for the patch :)
Created attachment 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.
Created attachment 118366 [details, diff] xfoil-6.96-gfortran.patch
fixed in cvs with a few changes from the proposed patch.