While trying to compile (http://people.csail.mit.edu/jrennie/ifile/) I got the following syntax error: In file included from /usr/include/stdio.h:28, from argp-fmtstream.h:33, from argp-fs-xinl.c:28: /usr/include/features.h:285:69: error: operator '&&' has no right operand features.h looks like this around the line #if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \ && __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0 # if _FORTIFY_SOURCE > 1 # define __USE_FORTIFY_LEVEL 2 # else # define __USE_FORTIFY_LEVEL 1 # endif #else # define __USE_FORTIFY_LEVEL 0 #endif I assume that due to the way the preprocessor does the substitution the last part of the first line looks like: ... && 0 && > 0 if __OPTIMIZE__ is not defined at all. Substituting the code with: #if defined __OPTIMIZE__ # if __OPTIMIZE > 0 # define _FORTIFY_SOURCE_OPTIMIZE 1 # endif #endif #if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \ && __GNUC_PREREQ (4, 1) && _FORTIFY_SOURCE_OPTIMIZE # if _FORTIFY_SOURCE > 1 # define __USE_FORTIFY_LEVEL 2 # else # define __USE_FORTIFY_LEVEL 1 # endif #else # define __USE_FORTIFY_LEVEL 0 #endif does the trick and is as far as I can tell equivelent to what the original code wanted to achiev. Reproducible: Always Steps to Reproduce: 1. wget http://people.csail.mit.edu/jrennie/ifile/ifile-1.3.8.tar.gz 2. tar xf ifile-1.3.8.tar.gz 3. cd ifile-1.3.8 4. ./configure && make Actual Results: In file included from /usr/include/stdio.h:28, from argp-fmtstream.h:33, from argp-fs-xinl.c:28: /usr/include/features.h:285:69: error: operator '&&' has no right operand Expected Results: should compile fine $ emerge --info Portage 2.2_rc1 (default-linux/x86/2007.0, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.24-gentoo-r5 i686) ================================================================= System uname: Linux-2.6.24-gentoo-r5-i686-mobile_AMD_Athlon-tm-_XP-M_2500+-with-glibc2.0 Timestamp of tree: Fri, 04 Jul 2008 09:45:02 +0000 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] app-shells/bash: 3.2_p39 dev-java/java-config: 1.3.7, 2.1.6-r1 dev-lang/python: 2.4.4-r5, 2.5.2-r5 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.2.5 sys-apps/sandbox: 1.2.18.1-r3 sys-devel/autoconf: 2.13, 2.62-r1 sys-devel/automake: 1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1 sys-devel/binutils: 2.18-r2 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 2.2.4 virtual/os-headers: 2.6.25-r4 ACCEPT_KEYWORDS="x86 ~x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O2 -pipe -ggdb" 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/share/config /var/qmail/alias /var/qmail/control /var/vpopmail/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-march=athlon-xp -O2 -pipe -ggdb" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks parallel-fetch preserve-libs sandbox sfperms splitdebug strict unmerge-orphans userfetch" GENTOO_MIRRORS="ftp://de-mirror.org/distro/gentoo/" LANG="en_US.utf8" LC_ALL="en_US.utf8" LDFLAGS="" LINGUAS="en" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="3dnow 3dnowext X a52 aac aalib ac3 acl alsa amr apache2 audiofile bash-completion bzip2 cdio cli cracklib crypt cups dbus dri dvd dvdnav dvdread encode exif fam fbcon ffmpeg fftw flac font-server fontconfig fortran gdbm gif hal iconv imagemagick isdnlog jack jpeg jpeg2k ladspa lame laptop libsamplerate mad midi mmx mmxext mng mp3 mp4 mpeg mudflap ncurses nls nptl nptlonly nsplugin offensive ogg openmp pam pcre pdf png pnm pppd readline real reflection session sndfile speex spell spl sse ssl svg tcpd tetex theora tiff truetype unicode vidx vim-pager vim-syntax vorbis win32codecs wmf x264 x86 xinerama xorg xvid zlib" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="sis" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Sorry there was a small typo in the substitute code: #if defined __OPTIMIZE__ # if __OPTIMIZE__ > 0 # define _FORTIFY_SOURCE_OPTIMIZE 1 # endif #endif #if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \ && __GNUC_PREREQ (4, 1) && _FORTIFY_SOURCE_OPTIMIZE # if _FORTIFY_SOURCE > 1 # define __USE_FORTIFY_LEVEL 2 # else # define __USE_FORTIFY_LEVEL 1 # endif #else # define __USE_FORTIFY_LEVEL 0 #endif
Ifile is not in the tree and we are not upstream for it.
(In reply to comment #2) > Ifile is not in the tree and we are not upstream for it. > But the problem lies in features.h which belongs to glibc. ifile just happens to trigger it.
is this realy no issue with features.h?
No, it's a problem of this package (one of many). First of all, while it seems that configure/Makefiles were autotools generated, it doesn't distribute the sources for regenerating. Then, it uses a (IM-not-so-HO) a silly hack of this distributed argp (maybe it was valid in some cases, but it was still a hack, that eventually got invalidated), that redefines internal preprocessor symbols of compiler and glibc. So this is upstream-broken and as upstream is dead...
ok thx. It wasn't clear to me that __OPTIMIZE__ was internat to libc/gcc