When building emacs 23.4-r18 with gcc 8.2.0-r6 I get the following build error. This error does not occur when building with gcc 7.3.0-r3. This error does not occur on Emacs 18, 24, 25, or 26. <snip> x86_64-pc-linux-gnu-gcc -c -Demacs -DHAVE_CONFIG_H -I. -I/var/tmp/portage/app-editors/emacs-23.4-r18/work/emacs-23.4/src -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/alsa -pthread -I/usr/include/librsvg-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -Os -pipe -march=nehalem -mtune=nehalem -fno-strict-aliasing -I/usr/include/freetype2 -I/usr/include/uuid -I/usr/include/freetype2 -MMD -MF deps/coding.d coding.c In file included from ./config.h:1082, from dispnew.c:21: dispnew.c: In function ‘update_frame_1’: ./s/gnu-linux.h:164:10: error: ‘FILE’ {aka ‘struct _IO_FILE’} has no member named ‘_pptr’ ((FILE)->_pptr - (FILE)->_pbase) ^~ dispnew.c:89:30: note: in expansion of macro ‘GNU_LIBRARY_PENDING_OUTPUT_COUNT’ #define PENDING_OUTPUT_COUNT GNU_LIBRARY_PENDING_OUTPUT_COUNT ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ dispnew.c:5384:16: note: in expansion of macro ‘PENDING_OUTPUT_COUNT’ int outq = PENDING_OUTPUT_COUNT (display_output); ^~~~~~~~~~~~~~~~~~~~ ./s/gnu-linux.h:164:26: error: ‘FILE’ {aka ‘struct _IO_FILE’} has no member named ‘_pbase’ ((FILE)->_pptr - (FILE)->_pbase) ^~ dispnew.c:89:30: note: in expansion of macro ‘GNU_LIBRARY_PENDING_OUTPUT_COUNT’ #define PENDING_OUTPUT_COUNT GNU_LIBRARY_PENDING_OUTPUT_COUNT ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ dispnew.c:5384:16: note: in expansion of macro ‘PENDING_OUTPUT_COUNT’ int outq = PENDING_OUTPUT_COUNT (display_output); ^~~~~~~~~~~~~~~~~~~~ make[1]: *** [Makefile:86: dispnew.o] Error 1 </snip> Here is my emerge info: <snip> Portage 2.3.62 (python 3.6.5-final-0, default/linux/amd64/17.0/desktop/plasma, gcc-8.2.0, glibc-2.28-r5, 4.14.83-gentoo x86_64) ================================================================= System uname: Linux-4.14.83-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_K_875_@_2.93GHz-with-gentoo-2.6 KiB Mem: 32819784 total, 8770432 free KiB Swap: 16777212 total, 16776956 free Timestamp of repository gentoo: Wed, 27 Mar 2019 19:30:01 +0000 Head commit of repository gentoo: 10d772e73318e729c0e31962715edce0ed07eacb sh bash 4.4_p23-r1 ld GNU ld (Gentoo 2.30 p5) 2.30.0 app-shells/bash: 4.4_p23-r1::gentoo dev-java/java-config: 2.2.0-r4::gentoo dev-lang/perl: 5.26.2::gentoo dev-lang/python: 2.7.15::gentoo, 3.6.5::gentoo dev-util/cmake: 3.9.6::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.6-r1::gentoo sys-apps/openrc: 0.38.3-r1::gentoo sys-apps/sandbox: 2.13::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r4::gentoo sys-devel/automake: 1.11.6-r3::gentoo, 1.16.1-r1::gentoo sys-devel/binutils: 2.30-r4::gentoo sys-devel/gcc: 5.4.0-r4::gentoo, 6.4.0-r1::gentoo, 7.3.0-r3::gentoo, 8.2.0-r6::gentoo sys-devel/gcc-config: 2.0::gentoo sys-devel/libtool: 2.4.6-r3::gentoo sys-devel/make: 4.2.1-r4::gentoo sys-kernel/linux-headers: 4.14-r1::gentoo (virtual/os-headers) sys-libs/glibc: 2.28-r5::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-jobs: 1 sync-rsync-verify-metamanifest: yes sync-rsync-extra-opts: sync-rsync-verify-max-age: 24 localrepo location: /usr/local/portage masters: gentoo gamerlay location: /var/lib/layman/gamerlay masters: gentoo priority: 50 palemoon location: /var/lib/layman/palemoon masters: gentoo priority: 50 pentoo location: /var/lib/layman/pentoo masters: gentoo priority: 50 steam-overlay location: /var/lib/layman/steam-overlay masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-Os -pipe -march=nehalem -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -msahf -mpopcnt -msse4.2 -msse4.1 -mfxsr --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -mtune=nehalem" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.2/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cli-php7.2/ext-active/ /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="-Os -pipe -march=nehalem -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -msahf -mpopcnt -msse4.2 -msse4.1 -mfxsr --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -mtune=nehalem" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="-j1 --quiet-build --keep-going --with-bdeps=y --complete-graph" ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox 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://distfiles.gentoo.org" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en en_US" MAKEOPTS="-j8" PKGDIR="/usr/portage/packages" PORTAGE_COMPRESS="xz" PORTAGE_COMPRESS_FLAGS="-6" 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 --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac acl acpi activities alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit crypt cups cxx dbus declarative dri dts dvd dvdr emacs emboss encode exif fam ffmpeg flac fortran gdbm gif glamor gmp gpm gtk iconv ipv6 jpeg kde kipi kwallet lcms ldap libnotify libtirpc lzma lzo mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp opus pam pango pcre pdf phonon plasma png policykit ppds projectm pulseaudio qml qt5 rar readline sdl seccomp semantic-desktop spell ssl startup-notification svg tcpd threads tiff truetype udev udisks unicode upower usb vim-syntax vorbis webkit widgets wxwidgets x264 xattr xcb xcomposite xml xv xvid zip zlib" ABI_X86="32 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" L10N="en en_US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AArch64 AMDGPU ARM AVR BPF Hexagon Lanai MSP430 Mips NVPTX Nios2 PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" QEMU_SOFTMMU_TARGETS="aarch64 alpha arm cris hppa i386 lm32 m68k microblaze microblazeel mips mips64 mips64el mipsel moxie nios2 or1k ppc ppc64 riscv32 riscv64 s390x sh4 sh4eb sparc sparc64 tricore unicore32 x86_64 xtensa xtensaeb" QEMU_USER_TARGETS="aarch64 aarch64_be alpha arm armeb cris hppa i386 m68k microblaze microblazeel mips mips64 mips64el mipsel mipsn32 mipsn32el nios2 or1k ppc ppc64 ppc64abi32 ppc64le riscv32 riscv64 s390x sh4 sh4eb sparc sparc32plus sparc64 tilegx x86_64 xtensa xtensaeb" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="radeon r600" 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: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS </snip> Here is my emacs flags: <snip> [ebuild R ] app-editors/emacs-23.4-r18:23::gentoo USE="X alsa dbus gif gpm gtk gzip-el jpeg png source svg tiff xft xpm -Xaw3d (-aqua) -athena -games -gconf -kerberos -livecd -m17n-lib -motif -sound -toolkit-scroll-bars" 0 KiB </snip> Reproducible: Always
Created attachment 571032 [details, diff] Fix compilation with glibc-2.28. Please test if the attached patch fixes the problem.
It's a glibc-2.28 change, not gcc-8: https://wiki.gentoo.org/wiki/Glibc_2.28_porting_notes/libio_h_removal
(In reply to Sergei Trofimovich from comment #2) > It's a glibc-2.28 change, not gcc-8: > https://wiki.gentoo.org/wiki/Glibc_2.28_porting_notes/libio_h_removal Indeed, I can reproduce it here: - glibc-2.27-r6, gcc-7.3.0-r6 -> success - glibc-2.27-r6, gcc-8.2.0-r4 -> success - glibc-2.28-r5, gcc-7.4.0-r1 -> failure - glibc-2.28-r5, gcc-8.3.0 -> failure This contradicts the original report, however: (In reply to Anthony Mendez from comment #0) > When building emacs 23.4-r18 with gcc 8.2.0-r6 I get the following build > error. > This error does not occur when building with gcc 7.3.0-r3.
(In reply to Ulrich Müller from comment #3) > This contradicts the original report, however: I had not considered the possibility the glibc could have been the culprit here since this problem arose when I switched to gcc 8 and rebuilt my system. I have confirmed that emacs 23 will not build with gcc 7 which agrees with the premised that glibc is the culprit. Sorry for any confusion I may have caused.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5bfb93a0a9a143018319cc59bd8a5f7c96bd5e4 commit b5bfb93a0a9a143018319cc59bd8a5f7c96bd5e4 Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2019-03-29 08:07:49 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2019-03-29 08:08:36 +0000 app-editors/emacs: Fix compilation with glibc-2.28. Closes: https://bugs.gentoo.org/681904 Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Ulrich Müller <ulm@gentoo.org> app-editors/emacs/Manifest | 2 +- app-editors/emacs/emacs-23.4-r18.ebuild | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
Fixed without revbump (i.e., still at -r18) since this is a build failure. Thank you for reporting!
(In reply to Ulrich Müller from comment #6) > Fixed without revbump (i.e., still at -r18) since this is a build failure. > > Thank you for reporting! You're very welcome! Thank you for the quick response!
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64ad6e7961ede65ba19425b8bc264c788912a105 commit 64ad6e7961ede65ba19425b8bc264c788912a105 Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2019-08-29 13:47:51 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2019-08-29 13:49:05 +0000 app-editors/emacs: Fix compilation with glibc-2.28 for slot 18. Bug: https://bugs.gentoo.org/681904 Package-Manager: Portage-2.3.73, Repoman-2.3.17 Signed-off-by: Ulrich Müller <ulm@gentoo.org> app-editors/emacs/Manifest | 2 +- app-editors/emacs/emacs-18.59-r12.ebuild | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)