Trying to build cross toolchains for ARM, I am stuck at GCC[fortran]: checking for armv7a-hardfloat-linux-gnueabi-gfortran... /var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/gcc-4.7.1/work/build/./gcc/gfortran -B/var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/gcc-4.7.1/work/build/./gcc/ -B/usr/armv7a-hardfloat-linux-gnueabi/bin/ -B/usr/armv7a-hardfloat-linux-gnueabi/lib/ -isystem /usr/armv7a-hardfloat-linux-gnueabi/include -isystem /usr/armv7a-hardfloat-linux-gnueabi/sys-include checking whether we are using the GNU Fortran compiler... no checking whether /var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/gcc-4.7.1/work/build/./gcc/gfortran -B/var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/gcc-4.7.1/work/build/./gcc/ -B/usr/armv7a-hardfloat-linux-gnueabi/bin/ -B/usr/armv7a-hardfloat-linux-gnueabi/lib/ -isystem /usr/armv7a-hardfloat-linux-gnueabi/include -isystem /usr/armv7a-hardfloat-linux-gnueabi/sys-include accepts -g... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes libtool.m4: error: problem compiling FC test program checking for /var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/gcc-4.7.1/work/build/./gcc/gfortran -B/var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/gcc-4.7.1/work/build/./gcc/ -B/usr/armv7a-hardfloat-linux-gnueabi/bin/ -B/usr/armv7a-hardfloat-linux-gnueabi/lib/ -isystem /usr/armv7a-hardfloat-linux-gnueabi/include -isystem /usr/armv7a-hardfloat-linux-gnueabi/sys-include option to produce PIC... checking if /var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/gcc-4.7.1/work/build/./gcc/gfortran -B/var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/gcc-4.7.1/work/build/./gcc/ -B/usr/armv7a-hardfloat-linux-gnueabi/bin/ -B/usr/armv7a-hardfloat-linux-gnueabi/lib/ -isystem /usr/armv7a-hardfloat-linux-gnueabi/include -isystem /usr/armv7a-hardfloat-linux-gnueabi/sys-include static flag works... no checking if /var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/gcc-4.7.1/work/build/./gcc/gfortran -B/var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/gcc-4.7.1/work/build/./gcc/ -B/usr/armv7a-hardfloat-linux-gnueabi/bin/ -B/usr/armv7a-hardfloat-linux-gnueabi/lib/ -isystem /usr/armv7a-hardfloat-linux-gnueabi/include -isystem /usr/armv7a-hardfloat-linux-gnueabi/sys-include supports -c -o file.o... no checking if /var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/gcc-4.7.1/work/build/./gcc/gfortran -B/var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/gcc-4.7.1/work/build/./gcc/ -B/usr/armv7a-hardfloat-linux-gnueabi/bin/ -B/usr/armv7a-hardfloat-linux-gnueabi/lib/ -isystem /usr/armv7a-hardfloat-linux-gnueabi/include -isystem /usr/armv7a-hardfloat-linux-gnueabi/sys-include supports -c -o file.o... (cached) no checking whether the /var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/gcc-4.7.1/work/build/./gcc/gfortran -B/var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/gcc-4.7.1/work/build/./gcc/ -B/usr/armv7a-hardfloat-linux-gnueabi/bin/ -B/usr/armv7a-hardfloat-linux-gnueabi/lib/ -isystem /usr/armv7a-hardfloat-linux-gnueabi/include -isystem /usr/armv7a-hardfloat-linux-gnueabi/sys-include linker (/var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/gcc-4.7.1/work/build/./gcc/collect-ld) supports shared libraries... yes checking dynamic linker characteristics... (cached) GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether the GNU Fortran compiler is working... no configure: error: GNU Fortran is not working; please report a bug in http://gcc.gnu.org/bugzilla, attaching /var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/gcc-4.7.1/work/build/armv7a-hardfloat-linux-gnueabi/libgfortran/config.log make[1]: *** [configure-target-libgfortran] Erreur 1 make[1] : on quitte le répertoire « /var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/gcc-4.7.1/work/build » make: *** [all] Erreur 2 emake failed * ERROR: cross-armv7a-hardfloat-linux-gnueabi/gcc-4.7.1 failed (compile phase): * emake failed with all * * Call stack: * ebuild.sh, line 85: Called src_compile * environment, line 4038: Called toolchain_src_compile * environment, line 4685: Called gcc_do_make * environment, line 2351: Called die * The specific snippet of code: * emake LDFLAGS="${LDFLAGS}" STAGE1_CFLAGS="${STAGE1_CFLAGS}" LIBPATH="${LIBPATH}" BOOT_CFLAGS="${BOOT_CFLAGS}" ${GCC_MAKE_TARGET} || die "emake failed with ${GCC_MAKE_TARGET}"; * * If you need support, post the output of `emerge --info '=cross-armv7a-hardfloat-linux-gnueabi/gcc-4.7.1'`, * the complete build log and the output of `emerge -pqv '=cross-armv7a-hardfloat-linux-gnueabi/gcc-4.7.1'`. * This ebuild is from an overlay named 'local': '/usr/local/portage/overlay/' * * Please include /var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/gcc-4.7.1/work/build/gcc-build-logs.tar.bz2 in your bug report * * The complete build log is located at '/var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/gcc-4.7.1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/gcc-4.7.1/temp/environment'. * Working directory: '/var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/gcc-4.7.1/work/build' * S: '/var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/gcc-4.7.1/work/build' _ # emerge -pv1 cross-armv7a-hardfloat-linux-gnueabi/gcc sys-devel/gcc These are the packages that would be merged, in order: Calculating dependencies ... done! [ebuild R #] sys-devel/gcc-4.7.1 USE="cxx fortran mudflap nls nptl openmp (-altivec) -bootstrap -build -doc (-fixed-point) -gcj -go -graphite -gtk (-hardened) (-libssp) (-multilib) -multislot -nocxx -nopie -nossp -objc -objc++ -objc-gc -test -vanilla" 0 kB [ebuild R *] cross-armv7a-hardfloat-linux-gnueabi/gcc-4.7.1::local USE="cxx* fortran* gtk* mudflap* nls nptl openmp* (-altivec) -bootstrap -build -doc (-fixed-point) -gcj -go -graphite -hardened -libssp -multilib -multislot -nocxx* -nopie -nossp -objc -objc++ -objc-gc -test -vanilla" 0 kB Reproducible: Always
emerge --info Portage 2.2.0_alpha113 (default/linux/x86/10.0, gcc-4.7.1, glibc-2.15-r2, 3.4.4-gentoo i686) ================================================================= System uname: Linux-3.4.4-gentoo-i686-Intel-R-_Atom-TM-_CPU_N270_@_1.60GHz-with-gentoo-2.1 Timestamp of tree: Tue, 26 Jun 2012 15:00:01 +0000 distcc 3.1 i686-gentoo-linux-gnu [enabled] app-shells/bash: 4.2_p29 dev-java/java-config: 2.1.12 dev-lang/python: 2.7.3-r2, 3.2.3-r1 dev-util/cmake: 2.8.8-r3 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.1-r1 sys-apps/openrc: 0.10.3 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.11.5, 1.12.1 sys-devel/binutils: 2.22-r1 sys-devel/gcc: 4.7.1 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r3 sys-kernel/linux-headers: 3.4 (virtual/os-headers) sys-libs/glibc: 2.15-r2 Repositories: gentoo local pd-overlay proaudio ACCEPT_KEYWORDS="x86 ~x86" ACCEPT_LICENSE="@FREE freedist" CBUILD="i686-gentoo-linux-gnu" CFLAGS="-O2 -pipe -fomit-frame-pointer -march=prescott -mtune=generic" CHOST="i686-gentoo-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -pipe -fomit-frame-pointer -march=prescott -mtune=generic" DISTDIR="/var/portage/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps y --buildpkg --quiet-build=n" FCFLAGS="-O2 -march=i686 -pipe" FEATURES="assume-digests binpkg-logs buildpkg candy config-protect-if-modified distcc distcc-pump distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="-O2 -march=i686 -pipe" GENTOO_MIRRORS="ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/" LANG="fr_BE.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--hash-style=gnu -Wl,--as-needed" LINGUAS="fr" MAKEOPTS="-j7" PKGDIR="/var/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage/overlay /var/lib/layman/pd-overlay /var/lib/layman/pro-audio" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X aac acl alsa amr apng branding btrfs bzip2 cairo cli consolekit cracklib crypt cups cxx dbus device-mapper dri dssi encode exif fat ffmpeg fftw flac fortran gif gpm gstreamer gtk gtk3 gudev hwdb iconv id3tag imlib jack jpeg ladspa lame libsamplerate lxde mmx modules mp3 mpeg mudflap ncurses nls nptl ntfs ogg opengl openmp osc pam pcre pdf png policykit pppd qt3support qt4 readline rubberband samba sdl session sna sqlite sse sse2 ssl ssse3 svg tcpd threads tiff truetype udev unicode usb vorbis wmf x264 x86 xcb xetex xorg xvid zlib" ALSA_CARDS="hda-intel usb-audio virmidi" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DVB_CARDS="usb-af9015" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" QEMU_SOFTMMU_TARGETS="arm i386 x86_64" QEMU_USER_TARGETS="arm i386 x86_64" RUBY_TARGETS="ruby19" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Created attachment 316421 [details] build.log.gz
It worked on an x86_64 configuration.
it passes whith USE="-fortran"
checking whether the GNU Fortran compiler is working... no configure: error: GNU Fortran is not working; please report a bug in http://gcc.gnu.org/bugzilla, attaching /var/tmp/portage/cross-a rmv7a-hardfloat-linux-gnueabi/gcc-4.7.1/work/build/armv7a-hardfloat-linux-gnueabi/libgfortran/config.log make[1]: *** [configure-target-libgfortran] Erreur 1 Could you attach that file here, please?
Created attachment 316455 [details] /var/tmp/portage/cross-hppa2.0-unknown-linux-gnu/gcc-4.5.3-r2/work/build/hppa2.0-unknown-linux-gnu/libgfortran/config.log
Created attachment 316457 [details] cross-hppa2.0-unknown-linux-gnu:gcc-4.5.3-r2:20120627-131129.log.gz
*** Bug 423853 has been marked as a duplicate of this bug. ***
*** Bug 423959 has been marked as a duplicate of this bug. ***
probably because you have optimized settings in your fortran flags and the gcc ebuilds don't filter those flags
*** Bug 435032 has been marked as a duplicate of this bug. ***
The optimized settings are from arch/x86/make.defaults: CFLAGS="-O2 -march=i686 -pipe" CXXFLAGS="${CFLAGS}" FFLAGS="${CFLAGS}" FCFLAGS="${CFLAGS}"
*** Bug 435374 has been marked as a duplicate of this bug. ***
Sounds like this bug... http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25672
*** Bug 441738 has been marked as a duplicate of this bug. ***
it's not failing for me for some reason. you could try this patch: --- toolchain.eclass 2 Nov 2012 20:18:11 -0000 1.553 +++ toolchain.eclass 5 Nov 2012 10:11:30 -0000 @@ -1398,6 +1398,8 @@ gcc_do_filter_flags() { if is_crosscompile ; then # Set this to something sane for both native and target CFLAGS="-O2 -pipe" + FFLAGS=${CFLAGS} + FCFLAGS=${CFLAGS} local VAR="CFLAGS_"${CTARGET//-/_} CXXFLAGS=${!VAR}
(In reply to comment #16) > it's not failing for me for some reason. you could try this patch: Are you on x86? The problem does not exist on amd64.
(In reply to comment #17) i used an x86 chroot if the problem exists for you, please try the patch and report back
well, no one responded, so i'll just assume it fixes things http://sources.gentoo.org/eclass/toolchain.eclass?r1=1.553&r2=1.554