The ebuild checks for appropriate Fortran Compilers but cannot decide: # USE="debug" emerge sci-libs/netcdf Calculating dependencies... done! >>> Emerging (1 of 1) sci-libs/netcdf-3.6.1 to / >>> checking ebuild checksums ;-) >>> checking auxfile checksums ;-) >>> checking miscfile checksums ;-) >>> checking netcdf-3.6.1.tar.gz ;-) ifort * You need one of these Fortran Compilers: ifc * Installed are: ifort MY_FORTRAN: "" MY_FORTRAN: "ifort" FORTRANC: "ifort" * Configuring for Intel Fortran... g77 * You need one of these Fortran Compilers: g77 * Installed are: g77 MY_FORTRAN: "ifort" MY_FORTRAN: "ifort" * Current Fortran Compiler is set to ifort, which is not usable with this package ! !!! ERROR: sci-libs/netcdf-3.6.1 failed. Call stack: ebuild.sh, line 1555: Called dyn_setup ebuild.sh, line 668: Called pkg_setup netcdf-3.6.1.ebuild, line 38: Called need_fortran 'g77' fortran.eclass, line 148: Called die I have installed dev-lang/ifc-9.0.021 and use gcc-3.4.6. As you see the ebuild finds the intel fortran compiler correctly but tries to go on with gcc3 where it conflicts with already set MY_FORTRAN. # emerge --info Portage 2.1-r1 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.16-gentoo-r13 i686) ================================================================= System uname: 2.6.16-gentoo-r13 i686 AMD Athlon(tm) XP 2000+ Gentoo Base System version 1.6.15 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] ccache version 2.3 [enabled] app-admin/eselect-compiler: [Not Present] dev-lang/python: 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.3 dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.13-r3 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O3 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo" CXXFLAGS="-march=athlon-xp -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distcc distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp.gentoo.mesh-solutions.com/gentoo/" LINGUAS="de en_US" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="x86 3dnow X alsa apache2 apm arts asf avi berkdb bitmap-fonts bzip2 cli crypt cups dlloader dri dvb dvd emboss encode exif ffmpeg foomaticdb fortran gdbm gif gimp gnokii gpm gtk gtk2 ifc imlib ipv6 irda isdnlog jpeg kde kdeenablefinal ldap libg++ libwww lirc mad mikmod mmx motif mp3 mpeg ncurses nls nptl nsplugin nvidia ogg opengl pam pcre pdflib perl png pppd python qt qt3 qt4 quicktime readline reflection scanner sdl session spell spl sse ssl tcpd tetex tiff truetype truetype-fonts type1-fonts udev usb vorbis win32codecs xinerama xml xmms xorg xv zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux linguas_de linguas_en_US userland_GNU video_cards_nvidia video_cards_nv video_cards_fbdev video_cards_vesa" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
It can decide just fine, you're trying to use an invalid (untested) Fortran compiler for this package: * You need one of these Fortran Compilers: g77 Try changing this line in the ebuild: need_fortran "gfortran ifc g77" to this: need_fortran gfortran ifc g77 Somebody didn't realize that compilers need to be passed in as separate arguments because need_fortran() parses $@, not $1.
> Try changing this line in the ebuild: > need_fortran "gfortran ifc g77" > to this: > need_fortran gfortran ifc g77 That's the problem. There is no such line in the ebuild. It calls need_fortran multiple times. First for intel ifc (which includes ifort automatically). If that does not work it checks for gfortran in gcc4. After that it checks for g77 in gcc3 nevermind what has been returned before.
After a sync I just realised that when I reported this bug there was another ebuild version than the current. This issue seems to have been fixed in bug #82431. There is no problem with the quotation marks. $1 and $@ are here the same since $@ expands simply to "$1 $2 $3 ..." *** This bug has been marked as a duplicate of 82431 ***