Note: not a dup of #136425. After upgrading to gcc 4.1.1, I built octave without any problem. Then recently I noticed it was linked to libg2c which only existed in my gcc-3.4.5 dirs. I have now removed all older compilers from my system and now only have gcc-4.1.1. When I try to rebuild octave, I get the following: >>> Emerging (1 of 1) sci-mathematics/octave-2.1.73 to / >>> checking ebuild checksums ;-) >>> checking auxfile checksums ;-) >>> checking miscfile checksums ;-) >>> checking octave-2.1.73.tar.bz2 ;-) * You need one of these Fortran Compilers: gfortran g77 * Installed are: gfortran g77 >>> Unpacking source... >>> Unpacking octave-2.1.73.tar.bz2 to /var/tmp/portage/octave-2.1.73/work * Applying octave-2.1.73-gcc4.1-gentoo.patch ... [ ok ]>>> Source unpacked. >>> Compiling source in /var/tmp/portage/octave-2.1.73/work/octave-2.1.73 ... * econf: updating octave-2.1.73/config.guess with /usr/share/gnuconfig/config.guess * econf: updating octave-2.1.73/config.sub with /usr/share/gnuconfig/config.sub ./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --without-hdf5 --enable-readline --localstatedir=/var/state/octave --enable-rpath --enable-lite-kernel --disable-static --enable-shared --enable-dl --without-mpi --build=i686-pc-linux-gnu checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking for i686-pc-linux-gnu-gcc... i686-pc-linux-gnu-gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether i686-pc-linux-gnu-gcc accepts -g... yes checking for i686-pc-linux-gnu-gcc option to accept ANSI C... none needed checking how to run the C preprocessor... i686-pc-linux-gnu-gcc -E checking for egrep... grep -E checking for AIX... no checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking for library containing strerror... none required defining man1dir to be $(mandir)/man1 defining man1ext to be .1 defining infofile to be $(infodir)/octave.info defining octincludedir to be $(includedir)/octave-$(version) defining fcnfiledir to be $(datadir)/octave/$(version)/m defining localfcnfiledir to be $(datadir)/octave/site/m defining localapifcnfiledir to be $(datadir)/octave/site/$(apiversion)/m defining localverfcnfiledir to be $(datadir)/octave/$(version)/site/m defining localfcnfilepath to be $(localverfcnfiledir)//:$(localapifcnfiledir)//:$(localfcnfiledir)// defining octlibdir to be $(libdir)/octave-$(version) defining archlibdir to be $(libexecdir)/octave/$(version)/exec/$(canonical_host_type) defining localarchlibdir to be $(libexecdir)/octave/site/exec/$(canonical_host_type) defining localverarchlibdir to be $(libexecdir)/octave/$(version)/site/exec/$(canonical_host_type) defining octfiledir to be $(libexecdir)/octave/$(version)/oct/$(canonical_host_type) defining localoctfiledir to be $(libexecdir)/octave/site/oct/$(canonical_host_type) defining localapioctfiledir to be $(libexecdir)/octave/site/oct/$(apiversion)/$(canonical_host_type) defining localveroctfiledir to be $(libexecdir)/octave/$(version)/site/oct/$(canonical_host_type) defining localoctfilepath to be $(localveroctfiledir)//:$(localapioctfiledir)//:$(localoctfiledir)// defining fcnfilepath to be .:$(localoctfilepath):$(localfcnfilepath):$(octfiledir)//:$(fcnfiledir)// defining imagedir to be $(datadir)/octave/$(version)/imagelib defining imagepath to be .:$(imagedir)// defining __NO_MATH_INLINES avoids buggy GNU libc exp function checking for i686-pc-linux-gnu-g++... i686-pc-linux-gnu-g++ checking whether we are using the GNU C++ compiler... yes checking whether i686-pc-linux-gnu-g++ accepts -g... yes checking how to run the C++ preprocessor... i686-pc-linux-gnu-g++ -E checking for C++ support for new friend template declaration... yes checking if C++ library is ISO compliant... yes checking for i686-pc-linux-gnu-nm... i686-pc-linux-gnu-nm checking C++ ABI version used by i686-pc-linux-gnu-g++... gnu_v3 checking for i686-pc-linux-gnu-gcc... (cached) i686-pc-linux-gnu-gcc checking whether we are using the GNU C compiler... (cached) yes checking whether i686-pc-linux-gnu-gcc accepts -g... (cached) yes checking for i686-pc-linux-gnu-gcc option to accept ANSI C... (cached) none needed checking how to run the C preprocessor... i686-pc-linux-gnu-gcc -E checking whether i686-pc-linux-gnu-gcc needs -traditional... no checking whether i686-pc-linux-gnu-gcc accepts -mieee-fp... yes adding -mieee-fp to XTRA_CFLAGS checking whether i686-pc-linux-gnu-g++ accepts -mieee-fp... yes adding -mieee-fp to XTRA_CXXFLAGS checking whether i686-pc-linux-gnu-g++ prepends an underscore to external names... no checking for sin in -lm... yes checking fftw3.h usability... yes checking fftw3.h presence... yes checking for fftw3.h... yes checking for fftw_plan_dft_1d in -lfftw3... yes checking for IEEE 754 data format... yes checking for i686-pc-linux-gnu-ranlib... i686-pc-linux-gnu-ranlib checking for i686-pc-linux-gnu-g77... i686-pc-linux-gnu-g77 checking whether we are using the GNU Fortran 77 compiler... no checking whether i686-pc-linux-gnu-g77 accepts -g... no checking how to get verbose linking output from i686-pc-linux-gnu-g77... configure: WARNING: compilation failed checking for Fortran libraries of i686-pc-linux-gnu-g77... checking for dummy main to link with Fortran libraries... none checking for Fortran name-mangling scheme... configure: error: cannot compile a simple Fortran program See `config.log' for more details. !!! Please attach the following file when filing a report to bugs.gentoo.org: !!! /var/tmp/portage/octave-2.1.73/work/octave-2.1.73/config.log !!! ERROR: sci-mathematics/octave-2.1.73 failed. Call stack: ebuild.sh, line 1539: Called dyn_compile ebuild.sh, line 939: Called src_compile octave-2.1.73.ebuild, line 70: Called econf '--without-hdf5' '--enable-readline' '--localstatedir=/var/state/octave' '--enable-rpath' '--enable-lite-kernel' '--disable-static' '--enable-shared' '--enable-dl' '--without-mpi' ebuild.sh, line 541: Called die !!! econf failed !!! If you need support, post the topmost build error, and the call stack if relevant. But of course I don't have g77: gcc-4.1.1 only comes with gfortran. I'm guessing when I built octave before when I still had the old gcc-3.4.5 on my system it used g77 from gcc-3.4.5. Note: # g77 gcc-config error: g77 wrapper: Unable to determine executable. CTARGET=i686-pc-linux-gnu exec=g77 # gfortran i686-pc-linux-gnu-gfortran: no input files So either octave really needs g77 (I've heard some fortran stuff doesn't compile with gfortran), or this is a problem with gcc-config/fortran.eclass. Again, note this part from above: * You need one of these Fortran Compilers: gfortran g77 * Installed are: gfortran g77 Which is a little wierd because I do not have a g77 compiler.
oops forgot: # emerge --info Portage 2.1 (default-linux/x86/2006.0, gcc-4.1.1/vanilla, glibc-2.4-r3, 2.6.16.9 i686) ================================================================= System uname: 2.6.16.9 i686 AMD Athlon(tm) Processor Gentoo Base System version 1.12.1 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] dev-lang/python: 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.18.1 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-r2 sys-devel/gcc-config: 2.0.0_rc1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r5 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=i686 -O3 -pipe -fomit-frame-pointer" 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/lib/globus-2.4/etc /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-march=i686 -O3 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig collision-protection distcc distlocks metadata-transfer sandbox sfperms strict userpriv usersandbox" GENTOO_MIRRORS="http://gentoo.mirrors.easynews.com/linux/gentoo/ http://gentoo.chem.wisc.edu/gentoo/ ftp://gentoo.mirrors.tds.net/gentoo ftp://194.117.143.71/mirrors/gentoo" MAKEOPTS="-j2" 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 /usr/local/ag-portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow X Xaw3d a52 aac aalib acpi alsa apache2 apm arts audiofile avahi avi berkdb bitmap-fonts bzip2 cairo cdr cjk cli crypt cups curl dbus dga dri dts dv dvb dvd dvdr eds emacs emboss encode esd exif expat f77 faad fbcon ffmpeg fftw flac fortran gcj gd gdbm gif gimpprint ginac glut gmp gnome gnustep gnutls gphoto2 gpm gstreamer gtk gtk2 gtkhtml hal idn imagemagick imlib isdnlog jack java jpeg lcms leim libcaca libg++ libwww lirc live mad matroska mikmod mmx mng mono motif mozilla mp3 mpeg mysql nas ncurses nls nptl offensive ogg openal opengl oss pam pcre pdf pdflib perl plotutils png ppds pppd python qhull qt quicktime radeon readline reflection rtc samba scanner sdk sdl session slang speex spell spl sqlite sse ssl svg tcltk tcpd tetex theora threads tiff truetype truetype-fonts type1-fonts udev unicode usb v4l v4l2 vcd vorbis wmf wxwindows xinerama xml xmms xorg xosd xprint xv xvid zlib elibc_glibc input_devices_evdev input_devices_keyboard input_devices_mouse kernel_linux lirc_devices_realmagic userland_GNU video_cards_i810 video_cards_radeon video_cards_mach64 video_cards_vesa video_cards_vga video_cards_fbdev video_cards_v4l" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
One additional clarification: I stated that octave was linked to libg2c: that was apparently not correct because I rebuild lapack and blas (they were previously built with gcc-3.4.5) and now my (previously installed) octave works fine.
Interestingly, this doesn't show up on my laptop which is using gcc-config 1.3.13-r2 (hasn't been upgraded to eselect-compiler yet): * You need one of these Fortran Compilers: gfortran g77 * Installed are: gfortran back on my desktoo system I noticed the following lines in /etc/eselect: compiler/i686-pc-linux-gnu-3.4.4.conf: alias_gfortran=g77 compiler/i686-pc-linux-gnu-4.1.0.conf: alias_g77=gfortran compiler/i686-pc-linux-gnu-3.4.5.conf: alias_gfortran=g77 But gcc-4.1.1 doesn't have such a line. I also noted that i have a /usr/bin/g77 on my desktop that no package seems to own! I deleted that file and now the fortran.eclass correctly notes that we only have gfortran. Still doesn't configure properly yet: >>> Emerging (1 of 2) sci-mathematics/octave-2.1.73 to / >>> checking ebuild checksums ;-) >>> checking auxfile checksums ;-) >>> checking miscfile checksums ;-) >>> checking octave-2.1.73.tar.bz2 ;-) * You need one of these Fortran Compilers: gfortran g77 * Installed are: gfortran >>> Unpacking source... >>> Unpacking octave-2.1.73.tar.bz2 to /var/tmp/portage/octave-2.1.73/work * Applying octave-2.1.73-gcc4.1-gentoo.patch ... [ ok ]>>> Source unpacked. >>> Compiling source in /var/tmp/portage/octave-2.1.73/work/octave-2.1.73 ... * econf: updating octave-2.1.73/config.guess with /usr/share/gnuconfig/config.guess * econf: updating octave-2.1.73/config.sub with /usr/share/gnuconfig/config.sub ./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --without-hdf5 --enable-readline --localstatedir=/var/state/octave --enable-rpath --enable-lite-kernel --disable-static --enable-shared --enable-dl --without-mpi --build=i686-pc-linux-gnu checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking for i686-pc-linux-gnu-gcc... i686-pc-linux-gnu-gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether i686-pc-linux-gnu-gcc accepts -g... yes checking for i686-pc-linux-gnu-gcc option to accept ANSI C... none needed checking how to run the C preprocessor... i686-pc-linux-gnu-gcc -E checking for egrep... grep -E checking for AIX... no checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking for library containing strerror... none required defining man1dir to be $(mandir)/man1 defining man1ext to be .1 defining infofile to be $(infodir)/octave.info defining octincludedir to be $(includedir)/octave-$(version) defining fcnfiledir to be $(datadir)/octave/$(version)/m defining localfcnfiledir to be $(datadir)/octave/site/m defining localapifcnfiledir to be $(datadir)/octave/site/$(apiversion)/m defining localverfcnfiledir to be $(datadir)/octave/$(version)/site/m defining localfcnfilepath to be $(localverfcnfiledir)//:$(localapifcnfiledir)//:$(localfcnfiledir)// defining octlibdir to be $(libdir)/octave-$(version) defining archlibdir to be $(libexecdir)/octave/$(version)/exec/$(canonical_host_type) defining localarchlibdir to be $(libexecdir)/octave/site/exec/$(canonical_host_type) defining localverarchlibdir to be $(libexecdir)/octave/$(version)/site/exec/$(canonical_host_type) defining octfiledir to be $(libexecdir)/octave/$(version)/oct/$(canonical_host_type) defining localoctfiledir to be $(libexecdir)/octave/site/oct/$(canonical_host_type) defining localapioctfiledir to be $(libexecdir)/octave/site/oct/$(apiversion)/$(canonical_host_type) defining localveroctfiledir to be $(libexecdir)/octave/$(version)/site/oct/$(canonical_host_type) defining localoctfilepath to be $(localveroctfiledir)//:$(localapioctfiledir)//:$(localoctfiledir)// defining fcnfilepath to be .:$(localoctfilepath):$(localfcnfilepath):$(octfiledir)//:$(fcnfiledir)// defining imagedir to be $(datadir)/octave/$(version)/imagelib defining imagepath to be .:$(imagedir)// defining __NO_MATH_INLINES avoids buggy GNU libc exp function checking for i686-pc-linux-gnu-g++... i686-pc-linux-gnu-g++ checking whether we are using the GNU C++ compiler... yes checking whether i686-pc-linux-gnu-g++ accepts -g... yes checking how to run the C++ preprocessor... i686-pc-linux-gnu-g++ -E checking for C++ support for new friend template declaration... yes checking if C++ library is ISO compliant... yes checking for i686-pc-linux-gnu-nm... i686-pc-linux-gnu-nm checking C++ ABI version used by i686-pc-linux-gnu-g++... gnu_v3 checking for i686-pc-linux-gnu-gcc... (cached) i686-pc-linux-gnu-gcc checking whether we are using the GNU C compiler... (cached) yes checking whether i686-pc-linux-gnu-gcc accepts -g... (cached) yes checking for i686-pc-linux-gnu-gcc option to accept ANSI C... (cached) none needed checking how to run the C preprocessor... i686-pc-linux-gnu-gcc -E checking whether i686-pc-linux-gnu-gcc needs -traditional... no checking whether i686-pc-linux-gnu-gcc accepts -mieee-fp... yes adding -mieee-fp to XTRA_CFLAGS checking whether i686-pc-linux-gnu-g++ accepts -mieee-fp... yes adding -mieee-fp to XTRA_CXXFLAGS checking whether i686-pc-linux-gnu-g++ prepends an underscore to external names... no checking for sin in -lm... yes checking fftw3.h usability... yes checking fftw3.h presence... yes checking for fftw3.h... yes checking for fftw_plan_dft_1d in -lfftw3... yes checking for IEEE 754 data format... yes checking for i686-pc-linux-gnu-ranlib... i686-pc-linux-gnu-ranlib checking for i686-pc-linux-gnu-g77... i686-pc-linux-gnu-g77 checking whether we are using the GNU Fortran 77 compiler... no checking whether i686-pc-linux-gnu-g77 accepts -g... no checking how to get verbose linking output from i686-pc-linux-gnu-g77... configure: WARNING: compilation failed checking for Fortran libraries of i686-pc-linux-gnu-g77... checking for dummy main to link with Fortran libraries... none checking for Fortran name-mangling scheme... configure: error: cannot compile a simple Fortran program See `config.log' for more details. !!! Please attach the following file when filing a report to bugs.gentoo.org: !!! /var/tmp/portage/octave-2.1.73/work/octave-2.1.73/config.log !!! ERROR: sci-mathematics/octave-2.1.73 failed. Call stack: ebuild.sh, line 1539: Called dyn_compile ebuild.sh, line 939: Called src_compile octave-2.1.73.ebuild, line 70: Called econf '--without-hdf5' '--enable-readline' '--localstatedir=/var/state/octave' '--enable-rpath' '--enable-lite-kernel' '--disable-static' '--enable-shared' '--enable-dl' '--without-mpi' ebuild.sh, line 541: Called die !!! econf failed !!! If you need support, post the topmost build error, and the call stack if relevant.
I found all these files in /usr/bin with dates different from my newly rebuilt gcc-4.1.1: -rwxr-xr-x 1 root root 9100 May 27 16:05 g++32 -rwxr-xr-x 1 root root 15448 May 27 16:04 g77 -rwxr-xr-x 1 root root 9100 May 27 16:05 gcc32 -rwxr-xr-x 1 root root 9100 May 27 16:05 i686-pc-linux-gnu-g++32 -rwxr-xr-x 1 root root 15448 May 27 16:04 i686-pc-linux-gnu-g77 -rwxr-xr-x 1 root root 9100 May 27 16:05 i686-pc-linux-gnu-gcc32 I moved them all away, did did my "eselect compiler set 1" and resource /etc/profile. Now it works. Closing "next-time-investigate-before-you-post-a-bug" ;-)
Look in /etc/eselect/compiler/ and remove every line from the files that says something like alias_gfortran=g77 and alias_g77=gfortran. They are extremely broken and gcc no longer installs them like this.
I added to /etc/compiler/i686-pc-linux-gnu-4.1.1.conf "alias_g77=gfortran" to the globals section and everything worked...
(In reply to comment #6) > I added to /etc/compiler/i686-pc-linux-gnu-4.1.1.conf "alias_g77=gfortran" to > the globals section and everything worked... CORRECTION: I added this line AND I executed "eselect compiler select 1" with 1 standing for gcc-4.1.1 and then everything worked fine.
If i do that: cd /usr/bin ln -s gfortran-4.1.1 gfortran ln -s gfortran g77 Working here, but i don't know if in the future have a problem with this. Someone know?