ULLONG_MAX is defined in /usr/include/iso/limits_iso.h on Solaris Express Community Edition (build 109) which is not included by any of the header or source files of this package. When "#include <iso/limits_iso.h>" is added to apprentice.c a manual make in the workdir works fine. Reproducible: Always Steps to Reproduce: 1. bootstrap on SXCE b109 2. try to emerge sys-apps/file-5.00-r2 Actual Results: Fails because ULLONG is not defined because iso/limits_iso.h is not included. Expected Results: Build & work fine. $ emerge --info Portage 2.2.00.13133-prefix (prefix/sunos/solaris/5.11/x86, gcc-4.2.4, unavailable, 5.11 i86pc) ================================================================= System uname: Solaris-2.11-i86pc-i386-32bit-ELF Timestamp of tree: Mon, 23 Mar 2009 08:41:59 +0000 app-shells/bash: 3.2_p48-r1 dev-lang/python: 2.5.4-r2 sys-devel/autoconf: 2.63 sys-devel/automake: 1.10.2-r00.1 sys-devel/binutils: 2.19.1-r1 sys-devel/gcc-config: 1.4.0-r04.6 sys-devel/libtool: 2.2.6a ACCEPT_KEYWORDS="~x86-solaris" CBUILD="i386-pc-solaris2.11" CFLAGS="-O2 -march=native -pipe" CHOST="i386-pc-solaris2.11" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/terminfo" CXXFLAGS="-O2 -march=native -pipe" DISTDIR="/export/incoming/distfiles" EMERGE_DEFAULT_OPTS="--usepkg" EPREFIX="/opt/gentoo" FEATURES="buildpkg ccache collision-protect distlock distlocks fixpackages nostrip parallel-fetch preserve-libs protect-owned sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="de_DE.UTF-8" LDFLAGS="" MAKEOPTS="-j3" PKGDIR="/opt/gentoo/portage/packages" PORTAGE_CONFIGROOT="/opt/gentoo/" 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="/opt/gentoo/var/tmp" PORTDIR="/opt/gentoo/portage" PORTDIR_OVERLAY="/opt/gentoo/local/portage/etalas" SYNC="svn+http://overlays.gentoo.org/svn/proj/alt/trunk/prefix-overlay" USE="cracklib midi ncurses prefix readline ssl x86-solaris zlib" 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 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" ELIBC="SunOS" INPUT_DEVICES="keyboard mouse" KERNEL="SunOS" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" Unset: CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS from /opt/gentoo/var/tmp/portage/sys-apps/file-5.00-r2/temp/build.log: libtool: compile: i386-pc-solaris2.11-gcc -DHAVE_CONFIG_H -I. -I.. -DMAGIC=\"/opt/gentoo/usr/share/misc/magic\" -Wall -Wstrict-prototypes -Wm issing-prototypes -Wpointer-arith -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wsign-compare -Wreturn-type -Wswitch -Wshadow -Wc ast-qual -Wwrite-strings -Wextra -Wunused-parameter -O2 -march=native -pipe -D_GNU_SOURCE -MT softmagic.lo -MD -MP -MF .deps/softmagic.Tpo -c softmagic.c -fPIC -DPIC -o .libs/softmagic.o apprentice.c: In function 'strtoull': apprentice.c:121: error: 'ULLONG_MAX' undeclared (first use in this function) apprentice.c:121: error: (Each undeclared identifier is reported only once apprentice.c:121: error: for each function it appears in.) apprentice.c:130: error: 'ULONG_MAX' undeclared (first use in this function) apprentice.c:189: warning: cast discards qualifiers from pointer target type apprentice.c:208: warning: cast discards qualifiers from pointer target type apprentice.c:211: warning: cast discards qualifiers from pointer target type apprentice.c: In function 'check_format_type': apprentice.c:1723: warning: declaration of 'quad' shadows a global declaration /usr/include/sys/types.h:606: warning: shadowed declaration is here softmagic.c: In function 'magiccheck': softmagic.c:1850: warning: declaration of 'l' shadows a previous local softmagic.c:1676: warning: shadowed declaration is here libtool: compile: i386-pc-solaris2.11-gcc -DHAVE_CONFIG_H -I. -I.. -DMAGIC=\"/opt/gentoo/usr/share/misc/magic\" -Wall -Wstrict-prototypes -Wm issing-prototypes -Wpointer-arith -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wsign-compare -Wreturn-type -Wswitch -Wshadow -Wc ast-qual -Wwrite-strings -Wextra -Wunused-parameter -O2 -march=native -pipe -D_GNU_SOURCE -MT magic.lo -MD -MP -MF .deps/magic.Tpo -c magic.c -fPIC -DPIC -o .libs/magic.o make[2]: *** [apprentice.lo] Error 1 make[2]: *** Waiting for unfinished jobs.... libtool: compile: i386-pc-solaris2.11-gcc -DHAVE_CONFIG_H -I. -I.. -DMAGIC=\"/opt/gentoo/usr/share/misc/magic\" -Wall -Wstrict-prototypes -Wm issing-prototypes -Wpointer-arith -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wsign-compare -Wreturn-type -Wswitch -Wshadow -Wc ast-qual -Wwrite-strings -Wextra -Wunused-parameter -O2 -march=native -pipe -D_GNU_SOURCE -MT magic.lo -MD -MP -MF .deps/magic.Tpo -c magic.c -o magic.o >/dev/null 2>&1 mv -f .deps/magic.Tpo .deps/magic.Plo libtool: compile: i386-pc-solaris2.11-gcc -DHAVE_CONFIG_H -I. -I.. -DMAGIC=\"/opt/gentoo/usr/share/misc/magic\" -Wall -Wstrict-prototypes -Wm issing-prototypes -Wpointer-arith -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wsign-compare -Wreturn-type -Wswitch -Wshadow -Wc ast-qual -Wwrite-strings -Wextra -Wunused-parameter -O2 -march=native -pipe -D_GNU_SOURCE -MT softmagic.lo -MD -MP -MF .deps/softmagic.Tpo -c softmagic.c -o softmagic.o >/dev/null 2>&1 mv -f .deps/softmagic.Tpo .deps/softmagic.Plo make[2]: Leaving directory `/opt/gentoo/var/tmp/portage/sys-apps/file-5.00-r2/work/file-5.00/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/opt/gentoo/var/tmp/portage/sys-apps/file-5.00-r2/work/file-5.00' make: *** [all] Error 2 * ERROR: sys-apps/file-5.00-r2 failed: * emake failed * * Call stack: * ebuild.sh: 48: <call src_compile> * environment:3369: emake || die "emake failed"; * * If you need support, post the topmost build error, and the call stack if relevant.
Updated in svn and tested with solaris 9 under sparc. Can you test it?
builds and works fine, thanks.
Similar problem on hpux: ULLONG_MAX is not defined, although it is used in the implementation of strtoull only. But why is HAVE_STRTOULL undefined, as HP-UX and even Solaris 5.9 provide strtoull? Well, the implementation of strtoull is added by the interix patch, but configure lacks checking for strtoull - only strtoul is checked for (which IMO is an upstream bug). Thus, the private strtoull() is used always and triggers this bug. So for sys-apps/file-5.03, I'm going to add the check for strtoull instead of including <limits.h> in apprentice.c
cleaned up strtoull mess in r48216: *) renamed "${PN}-5.00-interix.patch" to "${PN}-5.00-strtoull.patch" (done in each file-5.* ebuild) *) dropped ia64-hpux keyword from each file-5.* except =file-5.03. *) not using "${PN}-5.00-strtoull-limits.patch" in =file-5.03 any more. *) instead added configure check for strtoull, via sed to avoid autoreconf (which is done for different reasons on interix only) Please recheck on Solaris, my Solaris prefixes are very outdated ATM.