Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 527024 - sys-devel/gcc-4.8.3: libgfortran/io/unix.c:1468:26: error: ‘id’ undeclared (first use in this function)
Summary: sys-devel/gcc-4.8.3: libgfortran/io/unix.c:1468:26: error: ‘id’ undeclared (f...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 546714 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-10-27 09:29 UTC by Timo Rothenpieler
Modified: 2015-04-20 15:31 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.gz (build.log.gz,477.60 KB, application/octet-stream)
2014-10-27 09:30 UTC, Timo Rothenpieler
Details
config.log (config.log,35.99 KB, text/x-log)
2014-10-28 08:19 UTC, Timo Rothenpieler
Details
config.log (config.log,315.22 KB, text/plain)
2014-10-28 08:27 UTC, Timo Rothenpieler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timo Rothenpieler 2014-10-27 09:29:46 UTC
When trying to emerge the new stable gcc 4.8.3 i get the following build error occurs:

/var/tmp/portage/sys-devel/gcc-4.8.3/work/gcc-4.8.3/libgfortran/io/unix.c: In function ‘find_file’:
/var/tmp/portage/sys-devel/gcc-4.8.3/work/gcc-4.8.3/libgfortran/io/unix.c:1468:26: error: ‘id’ undeclared (first use in this function)
 # define FIND_FILE0_ARGS id, file, file_len
                          ^
/var/tmp/portage/sys-devel/gcc-4.8.3/work/gcc-4.8.3/libgfortran/io/unix.c:1541:30: note: in expansion of macro ‘FIND_FILE0_ARGS’
   u = find_file0 (unit_root, FIND_FILE0_ARGS);
                              ^
/var/tmp/portage/sys-devel/gcc-4.8.3/work/gcc-4.8.3/libgfortran/io/unix.c:1468:26: note: each undeclared identifier is reported only once for each function it appears in
 # define FIND_FILE0_ARGS id, file, file_len
                          ^
/var/tmp/portage/sys-devel/gcc-4.8.3/work/gcc-4.8.3/libgfortran/io/unix.c:1541:30: note: in expansion of macro ‘FIND_FILE0_ARGS’
   u = find_file0 (unit_root, FIND_FILE0_ARGS);
                              ^


Reproducible: Always




This is the version and useflag-combination it's trying to build:

[ebuild  NS    ] sys-devel/gcc-4.8.3:4.8 [4.7.3-r1:4.7] USE="cxx fortran (multilib) nls nptl openmp sanitize (-altivec) -awt -doc (-fixed-point) -gcj -go -graphite (-hardened) (-libssp) -mudflap (-multislot) -nopie -nossp -objc -objc++ -objc-gc -regression-test -vanilla"



emerge --info:

Portage 2.2.8-r2 (default/linux/amd64/13.0, gcc-4.7.3, glibc-2.19-r1, 3.14.14-gentoo x86_64)
=================================================================
System uname: Linux-3.14.14-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E5630_@_2.53GHz-with-gentoo-2.2
KiB Mem:     4043888 total,   1505564 free
KiB Swap:   32475392 total,  32387404 free
Timestamp of tree: Mon, 27 Oct 2014 08:15:01 +0000
ld GNU ld (Gentoo 2.23.2 p1.0) 2.23.2
app-shells/bash:          4.2_p53
dev-java/java-config:     2.2.0
dev-lang/perl:            5.18.2-r1
dev-lang/python:          2.7.7, 3.3.5-r1, 3.4.1
dev-util/cmake:           2.8.12.2-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.inode.at/ http://gentoo.lagis.at/ http://gentoo.c3sl.ufpr.br/"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-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=""
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="X acl amd64 apache apache2 berkdb bzip2 bzlib calendar cgi cli cracklib crypt ctype curl cxx dbus drbd dri exif fileinfo filter fortran ftp gd gdbm gphoto2 gtk2 hal heartbeat http iconv ipv6 java javascript jpeg jpeg2k libwww mmx modules multilib mysql mysqli ncurses nls nptl odbc openmp pam pcre pdflib pdo perl php png python readline session simplexml slang sql sqlite sqlite3 sse sse2 ssl tcpd tiff truetype udev unicode utf8 xml xmlwriter xpm zip zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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 ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Timo Rothenpieler 2014-10-27 09:30:54 UTC
Created attachment 387512 [details]
build.log.gz
Comment 2 SpanKY gentoo-dev 2014-10-28 02:10:05 UTC
your stat appears to be broken:
checking whether the target stat is reliable... no

post all the config.log files from your build as an attachment.

you can also try running this test program:
$ cat test.c
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

int main ()
{
  FILE *f, *g;
  struct stat st1, st2;

  f = fopen ("foo", "w");
  g = fopen ("bar", "w");
  if (stat ("foo", &st1) != 0 || stat ("bar", &st2))
    return 1;
  if (st1.st_dev == st2.st_dev && st1.st_ino == st2.st_ino)
    return 1;
  fclose(f);
  fclose(g);
  return 0;
}
$ gcc -m32 test.c
$ ./a.out
$ echo $?
Comment 3 Timo Rothenpieler 2014-10-28 08:19:29 UTC
The test program returns with exit code 0 on all 3 machines this is happening on.
Two of the machines are virtual machines in a VMWare ESXi host, one is a physical host.
Attached config.log is from one of the VMs.
Comment 4 Timo Rothenpieler 2014-10-28 08:19:53 UTC
Created attachment 387620 [details]
config.log
Comment 5 Timo Rothenpieler 2014-10-28 08:27:28 UTC
Created attachment 387624 [details]
config.log
Comment 6 Timo Rothenpieler 2014-10-28 11:44:33 UTC
If i compile the test program with -lm, like the configure test does, it crashes with a segmentation fault error. But only in 32bit mode.
Comment 7 SpanKY gentoo-dev 2014-11-01 05:08:39 UTC
(In reply to Timo Rothenpieler from comment #6)

does it fail for any 32bit app ?  try doing:
  $ echo 'main(){}' | gcc -m32 -x c - -o a.out -lm
  $ ./a.out
does that crash ?

what if you rebuild glibc ?  i don't suspect it'll help, but who knows.
Comment 8 Timo Rothenpieler 2014-11-03 15:25:10 UTC
Rebuilding glibc actualy fixed it.
Strange, glibc was already built with a recent gcc 4.7 on all 3 machines.
Can't test anymore if the test program crashes, as rebuilding glibc made the crash disappear.
Comment 9 MAL 2014-12-03 15:20:59 UTC
I am experiencing this same issue and it blocks updating my system.

The system was considerably outdated and after failing to build gcc the first time, I successfully rebuilt libtools and glibc but that didn't solve the problem.
I then updated gcc from 4.6.3 to 4.7.3-r1 using a binary package from tinderbox, however gcc 4.8.3 still fails to build with the same error as the original poster.

Please reopen.



# emerge --info

Portage 2.2.8-r2 (default/linux/amd64/13.0/desktop/kde, gcc-4.7.3, glibc-2.19-r1, 3.5.7-gentoo x86_64)
=================================================================
System uname: Linux-3.5.7-gentoo-x86_64-Intel-R-_Core-TM-2_CPU_6600_@_2.40GHz-with-gentoo-2.2
KiB Mem:     3922424 total,     43984 free
KiB Swap:   15624996 total,  15307612 free
Timestamp of tree: Wed, 26 Nov 2014 02:45:01 +0000
ld GNU ld (GNU Binutils) 2.20.1.20100303
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p53
dev-java/java-config:     2.2.0
dev-lang/perl:            5.18.2-r2
dev-lang/python:          2.6.8, 2.7.7, 3.1.5, 3.2.5-r3, 3.3.5-r1, 3.4.1
dev-util/ccache:          3.1.9-r3
dev-util/cmake:           2.8.10.2-r2
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.20.1-r1, 2.21.1-r1, 2.22-r1, 2.23.1, 2.24-r3
sys-devel/gcc:            4.6.3, 4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.16 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo sunrise x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA Q3AEULA QUAKE4 skype-eula dlj-1.1 AdobeFlash-10 AdobeFlash-10.1 AdobeFlash-11.x google-talkplugin Intel-SDP Oracle-BCLA-JavaSE AdobeFlash-10.3 skype-4.0.0.7-copyright Google-TOS"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/polkit-1/actions /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /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="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=y --jobs=2"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ http://mirror.bytemark.co.uk/gentoo/"
LANG="en_GB.utf-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-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="/var/lib/layman/sunrise /usr/local/portage"
SYNC="rsync://komcept-storage/gentoo-portage"
USE="64bit X a52 aac acl acpi alsa amd64 amr apng asf audiofile bash-completion berkdb bluetooth bonjour branding bzip2 cairo caps cdda cddb cdio cdr chardet chroot cleartype cli colord consolekit contrast cracklib crypt cscope cups curl cxx d daap dbus declarative device-mapper dirac dri dts dv dvd dvdnav dvdr dvi dynload emboss enca encode exif faac faad fading-colors fam ffmpeg firefox flac fmod fontconfig foomaticdb fortran g3dvl gdbm gdu geoip gif gimp glamor glitz glut gmail gmp gnutls gpm gstreamer gtk gtkhtml gudev hotpixels hpcups hpijs hpn hwdb iconv icu id3tag idn ieee1394 imagemagick imap imlib ipv6 ithreads java javascript jpeg jpeg2k kate kde kipi ladspa lame largeterminal lcms ldap lensfun libass libgda libnotify libsamplerate libvisual live lm_sensors lua lzo mad maildir matroska md5sum mikmod mjpeg mmx mmxext mng mod modplug modules mozilla moznoirc mp2 mp3 mp4 mpeg mpeg2 mpeg4 mplayer msn multilib multislot multitarget ncurses network nls nptl nsplugin ntlm oav offensive ogg ogm openal opencore-amr opengl openipmi openmp opus pam pango pcntl pcre pdf phonon pixbuf plasma png policykit ppds prediction qemu qt3support qt4 quicktime rar readline rtc rtsp samba sasl schroedinger sdl semantic-desktop session sftp shout sid skins sndfile sox speex spell sqlite sse sse2 sse3 ssl ssse3 startup-notification stream svg sysfs t1lib tcpd theora threads tiff timezone truetype twolame udev udisks unicode upnp upower ups usb userlocales utils v4l v4l2 vamp vdpau video vlm vorbis webkit webp wma wmf wxwidgets x264 xanim xattr xcb xcomposite xinerama xml xmp xpm xrandr xulrunner xv xvid xvmc yahoo yv12 zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CURL_SSL="nss" 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 ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="nvidia vesa" 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
Comment 10 MAL 2014-12-03 15:22:58 UTC
Further info, the test program does segfault:

# echo 'main(){}' | gcc -m32 -x c - -o a.out -lm
# ./a.out
Segmentation fault
Comment 11 Pierre 2014-12-25 12:41:09 UTC
I confirm that re-emerging glibc fixes the problem.
Comment 12 Ian Stakenvicius (RETIRED) gentoo-dev 2015-04-20 15:31:11 UTC
*** Bug 546714 has been marked as a duplicate of this bug. ***