Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 203743 - app-arch/libarchive-2.4.10 build error: 'a' is undefined
Summary: app-arch/libarchive-2.4.10 build error: 'a' is undefined
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-30 08:22 UTC by Markus Peloquin
Modified: 2008-01-02 09:36 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Peloquin 2007-12-30 08:22:29 UTC
As I attempt to build libarchive-2.4.10, I see this:

i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.  -I./libarchive -I./libarchive   -O2 -march=pentium-m -pipe -MT cpio/bsdcpio-cpio.o -MD -MP -MF cpio/.deps/bsdcpio-cpio.Tpo -c -o cpio/bsdcpio-cpio.o `test -f 'cpio/cpio.c' || echo './'`cpio/cpio.c
cpio/cpio.c: In function 'restore_time':
cpio/cpio.c:533: error: 'a' undeclared (first use in this function)
cpio/cpio.c:533: error: (Each undeclared identifier is reported only once
cpio/cpio.c:533: error: for each function it appears in.)

Reproducible: Always

Steps to Reproduce:




This function the error appears in first appeared in libarchive-2.4.9, and is unchanged in 2.4.10.  The code that caused the error is this:

#ifdef HAVE_LUTIMES
        if (lutimes(name, times) != 0)
#else
        if (!S_ISLNK(a->mode) && utimes(name, times) != 0)
#endif

I am assuming that the a->mode should change to cpio->mode.  I emailed the libarchive author (Tim Kientzle) to see if I am correct.  In the meantime the package should probably be hard masked.


$ emerge --info
Portage 2.1.3.19 (default-linux/x86/2007.0/desktop, gcc-4.2.2, glibc-2.6.1-r0, 2.6.23-gentoo-r4 i686)
=================================================================
System uname: 2.6.23-gentoo-r4 i686 Intel(R) Pentium(R) M processor 1.73GHz
Timestamp of tree: Sun, 30 Dec 2007 05:16:01 +0000
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.3
dev-lang/python:     2.5.1-r4
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0_rc6
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-m -pipe"
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/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=pentium-m -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.ussg.iu.edu/pub/linux/gentoo ftp://gentoo.chem.wisc.edu/gentoo/ ftp://ftp.ndlug.nd.edu/pub/gentoo/ http://prometheus.cs.wmich.edu/gentoo ftp://lug.mtu.edu/gentoo ftp://gentoo.cites.uiuc.edu/pub/gentoo/ ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/"
LANG="en_US"
LC_ALL="en_US"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi acpm aim alsa apache2 apm arts audiofile bash-completion berkdb bitmap-fonts blas bzip2 cairo cdparanoia cdr cli cracklib crypt cscope css cups dbus dhcp divx4linux doc dri dts dv dvd dvdr dvdread eds emboss encode esd evo fam fame fbcon ffmpeg fftw flac font-server fortran ftp gcj geoip gif ginac glut gmp gnutls gpm gs gstreamer gtk gtk2 hal howl hpn iconv icq ieee1394 imap imlib ipod ipv6 isdnlog ithreads java javascript jce jpeg jpeg2k kerberos lame lapack ldap libcaca libedit lzo mad maildir midi mikmod mime mmx mmx2 mng mp3 mpeg mplayer msn mudflap musepack nas ncurses network nfs nls nntp nptl nptlonly nsplugin ogg oggvorbis openal opengl openmp oss pam pcmcia pcre pdf perl png posix pppd prelude python qt3 qt3support qt4 quicktime rar readline real reflection rtc ruby samba sasl sdl seamonkey session slang sockets socks5 speex spell spl sse sse2 ssl subtitles svg svga sysvinc tcl tcltk tcpd tetex tga theora threads tiff tk truetype truetype-fonts type1-fonts udev unicode usb v41 vcd vim-syntax vim-with-x vorbis wifi win32codecs wxwindows x264 x86 xine xinerama xinetd xml xorg xpm xprint xscreensaver xulrunner xv xvid yahoo zlib" ALSA_CARDS="hda-intel" 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 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="glibc" INPUT_DEVICES="joystick keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="nvidia vga"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Markus Peloquin 2007-12-31 02:52:26 UTC
The libarchive author got back to me with a diff for cpio/cpio.c and asked if it worked for me.  It appears to work (it compiles successfully at least).  Here's the message:



Would you please try the following patch and let me know
if "make check" succeeds on your system after applying it?

...

Index: cpio.c
===================================================================
--- cpio.c      (revision 638)
+++ cpio.c      (working copy)
@@ -530,7 +530,7 @@
  #ifdef HAVE_LUTIMES
          if (lutimes(name, times) != 0)
  #else
-        if (!S_ISLNK(a->mode) && utimes(name, times) != 0)
+        if (!S_ISLNK(archive_entry_mode(entry)) && utimes(name, times) 
!= 0)
  #endif
                  cpio_warnc(errno, "Can't update time for %s", name);
  #endif
Comment 2 Markus Peloquin 2007-12-31 06:55:41 UTC
... or, just update to 2.4.11.  It differs from 2.4.10 only with regards to this issue.