Summary: | dev-lang/php-5.6.26-r2: zend_language_parser.h:336:5: error: conflicting types for 'zendparse' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | tka <tka> |
Component: | Current packages | Assignee: | PHP Bugs <php-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | orzel |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=494240 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | build.log |
Description
tka
2016-10-01 15:46:41 UTC
Created attachment 448692 [details] build.log # emerge --info '=dev-lang/php-5.6.26-r2::gentoo' Portage 2.3.1 (python 3.4.5-final-0, hardened/linux/x86, gcc-5.4.0, glibc-2.23-r2, 4.7.6 i686) ================================================================= System Settings ================================================================= System uname: Linux-4.7.6-i686-Intel-R-_Pentium-R-_4_CPU_2.80GHz-with-gentoo-2.3 KiB Mem: 2037608 total, 446732 free KiB Swap: 16777212 total, 16764764 free Timestamp of repository gentoo: Sat, 01 Oct 2016 14:30:01 +0000 sh bash 4.4 ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1 app-shells/bash: 4.4::gentoo dev-java/java-config: 2.2.0-r3::gentoo dev-lang/perl: 5.24.0-r1::gentoo dev-lang/python: 2.7.12::gentoo, 3.4.5::gentoo dev-util/cmake: 3.6.2::gentoo dev-util/pkgconfig: 0.29.1::gentoo sys-apps/baselayout: 2.3::gentoo sys-apps/openrc: 0.22.1::gentoo sys-apps/sandbox: 2.10-r2::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r2::gentoo sys-devel/automake: 1.14.1-r1::gentoo, 1.15-r2::gentoo sys-devel/binutils: 2.26.1::gentoo sys-devel/gcc: 5.4.0::gentoo sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/libtool: 2.4.6-r2::gentoo sys-devel/make: 4.2.1::gentoo sys-kernel/linux-headers: 4.7::gentoo (virtual/os-headers) sys-libs/glibc: 2.23-r2::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 local location: /usr/local/portage masters: gentoo priority: 0 ACCEPT_KEYWORDS="x86 ~x86" ACCEPT_LICENSE="* -@EULA" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=native -mtune=native -O2 -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.0/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="-march=native -mtune=native -O2 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--quiet-build=n --with-bdeps=y" FCFLAGS="-march=i686 -O2 -pipe" FEATURES="assume-digests binpkg-logs cgroup collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-march=i686 -O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu" MAKEOPTS="-j2" 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 --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="X a52 acl acpi alsa apache2 berkdb bzip2 cairo caps cdda cddb cdparanoia cli cracklib crypt cxx dbus dri dts dvd fam ffmpeg fftw flac fontconfig gd gdbm gif gimp gmp gnutls gtk hardened iconv icu idn ipv6 java jpeg lame lcms libnotify mad matroska mmap mmx modules mp3 mpeg ncurses nptl ogg opengl openmp pam pcre php pic pie png policykit ppds readline sasl sdl seccomp session sse sse2 ssl ssp startup-notification svg tcpd theora threads tiff truetype udev udisks unicode upower vorbis x264 x86 xattr xcb xml xtpax xv xvid zlib" ABI_X86="32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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" CPU_FLAGS_X86="mmx mmxext sse sse2" 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="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-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="i915 intel" XFCE_PLUGINS="logout menu trash" 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, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON This is somehow relevant, I just don't know how yet: https://bugs.gentoo.org/show_bug.cgi?id=494240 Another one from the graveyard, bug #512450. This is probably related to adding >=bison-3.0.1 to DEPEND in php-5.2.26-r1, but I can't reproduce the problem (I've been trying all day). I may need some help from you guys, otherwise I can revert that change, but I'm not sure that reverting it would be a long-term fix. The main reason why I think that the change in -r1 should be harmless and why reverting it wouldn't help is that bison *should not be used* to build PHP. In -r1, I added it only to eliminate a warning at build time. I can imagine only a few cases: * You didn't have bison installed until the -r1 pulled it in. That means that bison was never being used, and having >=bison 3.0.4-r1 should make no difference. * Bison was installed, but not being used to build PHP. The new dependency should make no difference. * Bison was installed incidentally and being used to build PHP. Then, bison-3.0.4-r1 went stable on amd64 in February, and x86 in June. You would've already had the same version installed that is causing problems with php-5.6.26-r2... why are they just showing up now? From the build.log attached to this bug, it looks like bison *is* being used for some reason. Here's the suspicious line: /var/tmp/portage/dev-lang/php-5.6.26-r2/work/sapis-build/cli/Zend/zend_language_parser.y:47.1-12: warning: deprecated directive, use ‘%pure-parser’ [-Wdeprecated] That is precisely what is output when you call "yacc" on "zend_language_parser.y". But, zend_language_parser.y is only used to generate zend_language_parser.c, and that file should already be there! mjo@gantu ~/src $ cp $REPOS/../distfiles/php-5.6.26.tar.xz ./ mjo@gantu ~/src $ tar -xf php-5.6.26.tar.xz mjo@gantu ~/src $ ls php-5.6.26/Zend/zend_language_parser.c -rw-r--r-- 1 mjo mjo 264K 2016-09-15 17:43 php-5.6.26/Zend/zend_language_parser.c So, I don't know why bison is being invoked at all. It might have something to do with the fact that I modified Zend/acinclude.m4 in the -r1, but I don't see that anything depends on that file in the build system. And then why can't I reproduce the problem? Those of you who can reproduce it: is there any way you can kill the build before it crashes, and check the timestamps on Zend/zend_language_parser.y and Zend/zend_language_parser.c? The .c file should have a later stamp than the .y file, otherwise Make will indeed try to regenerate it. I'm open to any other suggestions or flaws in my reasoning... or I may just have to revert that fix. Of course, bison-3.x is stable and you likely already have it installed, so I have no idea how that could help... It turns out, I can reproduce this, sort of. In my builds, bison-3.0.4-r1 is being used, but it doesn't cause problems for whatever reason. But the good news is, that let me investigate how to stop it from being used. I think I've found the problem, and it came down to a "cp -r" vs. "cp -a". If we preserve the upstream timestamps, the build system should be smart enough to not use bison. With "cp -r", though, the timestamps were getting clobbered and that could trick the build system into regenerating the parsers. I just pushed the fix in php-5.6.26-r2 and php-7.0.11-r2. After a few hours, it should show up on the mirrors. You can tell if you have the fixed version by checking for "cp -r" in the ebuild; you should find "cp -a" instead. Why patch php-7.x too? Well, bison shouldn't be needed -- all we're doing is wasting time regenerating the same files that we already have. By fixing the timestamps, the parsers won't be regenerated, and the build will go faster. Future problems like this will also be avoided if bison-4.x ever manifests. I'll wait to hear that it works from a few people before closing this, but with "cp -a", bison is not being used on my machine. (In reply to Michael Orlitzky from comment #5) > I just pushed the fix in php-5.6.26-r2 and php-7.0.11-r2. After a few hours, > it should show up on the mirrors. You can tell if you have the fixed version > by checking for "cp -r" in the ebuild; you should find "cp -a" instead. > > I'll wait to hear that it works from a few people before closing this, but > with "cp -a", bison is not being used on my machine. I can confirm that with the "cp -a" -version zend_language_parser.y no longer makes an appearance in the log file and the emerge completes successfully here. i can confirm as well Great, thanks. I wonder how many bison bugs we've had over the years that could have been fixed by changing a single character. Thanks to you Michael :-) |