uclibc does not have nanosecond resolution. git doesn't check if the system uses uclibc and so the resulting code tries to make reference to members of struct stat that aren't available. Thus git fails to compile. Reproducible: Always Steps to Reproduce: 1. emerge git 2. 3. Actual Results: Fails to compile. Expected Results: Expect git to emerge. Compilation dies at builtin-fetch-pack.c: In function 'fetch_pack': builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim' make: *** [builtin-fetch-pack.o] Error 1
Portage 2.1.6.13 (uclibc/x86/hardened, gcc-4.4.2, uclibc-0.9.30.1-r1, 2.6.28-hardened-r9 i686) ================================================================= System uname: Linux-2.6.28-hardened-r9-i686-AMD_Phenom-tm-_9650_Quad-Core_Processor-with-gentoo-1.12.11.1 Timestamp of tree: Sat, 24 Oct 2009 07:00:01 +0000 app-shells/bash: 4.0_p28 dev-lang/python: 2.6.2-r1 dev-util/cmake: 2.6.4 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 2.1 sys-devel/autoconf: 2.63-r1 sys-devel/automake: 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.27-r2 ACCEPT_KEYWORDS="x86" CBUILD="i386-gentoo-linux-uclibc" CFLAGS="-Os -pipe" CHOST="i386-gentoo-linux-uclibc" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-Os -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks fixpackages nodoc noinfo noman parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://192.168.100.9/pub/gentoo" LDFLAGS="-Wl,-O1" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" 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" PORTDIR_OVERLAY="/usr/local/portage/layman/hardened-development" SYNC="rsync://192.168.100.7/portage" USE="cli cracklib crypt dri hardened modules mudflap ncurses openmp pcre perl pic python readline reflection server session spl ssl tcpd uclibc uclibc-compat wordexp x86 xorg 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="uclibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="dummy fbdev v4l" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 208214 [details, diff] Modifies Makefile to set NO_NSEC This patch can be applied on uclibc systems only by adding the following to src_unpack() in the ebuild: if [[ ${CHOST} == *-uclibc* ]] ; then epatch "${FILESDIR}"/uclibc-no-nsec.patch fi
I've just done a commit to 1.6.5.3 to fix this, using the regular mechanism to pass in the flags (no patches needed). Please test.
I tested git-1.6.5.3 and it compiles and works fine.
(In reply to comment #4) > I tested git-1.6.5.3 and it compiles and works fine. > I've tested it too and it compiles and works fine now :). Thank you