<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>215499</bug_id>
          
          <creation_ts>2008-03-30 22:15 0000</creation_ts>
          <short_desc>sys-apps/file-4.24 fails to build</short_desc>
          <delta_ts>2008-07-17 20:07:19 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Core system</component>
          <version>unspecified</version>
          <rep_platform>AMD64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>cctsurf@gmail.com</reporter>
          <assigned_to>base-system@gentoo.org</assigned_to>
          <cc>abcdefg@blacktux.de</cc>
    
    <cc>ford_prefect@gentoo.org</cc>
    
    <cc>gentoo@ekkes.com</cc>
    
    <cc>l@lwithers.me.uk</cc>

      

      
          <long_desc isprivate="0">
            <who>cctsurf@gmail.com</who>
            <bug_when>2008-03-30 22:15:37 0000</bug_when>
            <thetext>I attempted to update sys-apps/file-4.24 on my amd64 system and it fails to build.  The rest of my x86 systems build fine.

Reproducible: Always

Steps to Reproduce:
1.emerge sys-apps/file-4.24
2.Fails
3.

Actual Results:  
/bin/sh ../libtool --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc  -march=athlon64 -O2 -pipe -msse3 -D_GNU_SOURCE -no-undefined -version-info 1:0:0  -o libmagic.la -rpath /usr/lib64 magic.lo apprentice.lo softmagic.lo ascmagic.lo compress.lo is_tar.lo readelf.lo print.lo fsmagic.lo funcs.lo apptype.lo  -lz
x86_64-pc-linux-gnu-gcc -shared  .libs/magic.o .libs/apprentice.o .libs/softmagic.o .libs/ascmagic.o .libs/compress.o .libs/is_tar.o .libs/readelf.o .libs/print.o .libs/fsmagic.o .libs/funcs.o .libs/apptype.o  -lz  -march=athlon64 -msse3 -Wl,-soname -Wl,libmagic.so.1 -o .libs/libmagic.so.1.0.0
(cd .libs &amp;&amp; rm -f libmagic.so.1 &amp;&amp; ln -s libmagic.so.1.0.0 libmagic.so.1)
(cd .libs &amp;&amp; rm -f libmagic.so &amp;&amp; ln -s libmagic.so.1.0.0 libmagic.so)
x86_64-pc-linux-gnu-ar cru .libs/libmagic.a  magic.o apprentice.o softmagic.o ascmagic.o compress.o is_tar.o readelf.o print.o fsmagic.o funcs.o apptype.o
x86_64-pc-linux-gnu-ranlib .libs/libmagic.a
creating libmagic.la
(cd .libs &amp;&amp; rm -f libmagic.la &amp;&amp; ln -s ../libmagic.la libmagic.la)
/bin/sh ../libtool --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc  -march=athlon64 -O2 -pipe -msse3 -D_GNU_SOURCE   -o file file.o libmagic.la -lz
x86_64-pc-linux-gnu-gcc -march=athlon64 -O2 -pipe -msse3 -D_GNU_SOURCE -o .libs/file file.o  ./.libs/libmagic.so -lz
creating file
make[2]: Leaving directory `/var/tmp/portage/sys-apps/file-4.24/work/file-4.24/src&apos;
Making all in magic
make[2]: Entering directory `/var/tmp/portage/sys-apps/file-4.24/work/file-4.24/magic&apos;
../src/file -C -m ../magic/Magdir
lt-file: No current entry for continuation
make[2]: *** [magic.mgc] Error 255
make[2]: Leaving directory `/var/tmp/portage/sys-apps/file-4.24/work/file-4.24/magic&apos;
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/sys-apps/file-4.24/work/file-4.24&apos;
make: *** [all] Error 2
 *
 * ERROR: sys-apps/file-4.24 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2958:  Called die
 * The specific snippet of code:
 *       emake || die &quot;emake failed&quot;;
 *  The die message:
 *   emake failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at &apos;/var/tmp/portage/sys-apps/file-4.24/temp/build.log&apos;.
 * The ebuild environment file is located at &apos;/var/tmp/portage/sys-apps/file-4.24/temp/environment&apos;.
 *

 * Messages for package sys-apps/file-4.24:

 *
 * ERROR: sys-apps/file-4.24 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2958:  Called die
 * The specific snippet of code:
 *       emake || die &quot;emake failed&quot;;
 *  The die message:
 *   emake failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at &apos;/var/tmp/portage/sys-apps/file-4.24/temp/build.log&apos;.
 * The ebuild environment file is located at &apos;/var/tmp/portage/sys-apps/file-4.24/temp/environment&apos;.
 *


Expected Results:  
build cleanly

emerge --info
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Portage 2.1.4.4 (!/usr/portage/profiles/default-linux/amd64/2007.0/desktop/, gcc-4.2.3, glibc-2.7-r2, 2.6.24-gentoo-r3 x86_64)
=================================================================
System uname: 2.6.24-gentoo-r3 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4400+
Timestamp of tree: Sun, 30 Mar 2008 07:45:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.5
dev-lang/python:     2.5.1-r5
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
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.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.24
ACCEPT_KEYWORDS=&quot;amd64 ~amd64&quot;
CBUILD=&quot;x86_64-pc-linux-gnu&quot;
CFLAGS=&quot;-march=athlon64 -O2 -pipe -msse3&quot;
CHOST=&quot;x86_64-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.0/env /usr/kde/4.0/share/config /usr/kde/4.0/shutdown /usr/share/config /var/lib/hsqldb&quot;
CONFIG_PROTECT_MASK=&quot;/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /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&quot;
CXXFLAGS=&quot;-march=athlon64 -O2 -pipe -msse3&quot;
DISTDIR=&quot;/mnt/nfs_portage/distfiles&quot;
EMERGE_DEFAULT_OPTS=&quot;--with-bdeps y&quot;
FEATURES=&quot;ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch&quot;
GENTOO_MIRRORS=&quot;http://gentoo.osuosl.org/ http://www.gtlib.gatech.edu/pub/gentoo ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://distro.ibiblio.org/pub/linux/distributions/gentoo/&quot;
LINGUAS=&quot;en_US&quot;
MAKEOPTS=&quot;-j3&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_RSYNC_OPTS=&quot;--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/mnt/nfs_portage&quot;
PORTDIR_OVERLAY=&quot;/usr/portage/local/layman/sajinet /usr/local/portage&quot;
SYNC=&quot;rsync://rsync.gentoo.org/gentoo-portage&quot;
USE=&quot;3dnow 3dnowext X a52 aac aalib accessibility acl acpi aiglx alsa amd64 audiofile avi berkdb bitmap-fonts bzip2 cairo cdparanoia cdr cli cracklib crypt cups dbus dri dts dvd dvdnav dvdr dvdread eds emboss encode evo fam ffmpeg firefox fortran gdbm gif gimp gpm gstreamer gtk hal iconv imagemagick isdnlog ithreads java jpeg kde kerberos ldap libwww live lm_sensors mad matroska midi mikmod mmx mmxext mp2 mp3 mp3mplayer mpeg mudflap musepack mysql mythtv ncurses nls nmp nptl nptlonly nsplugin ogg oggvorbis openal opengl openmp oss pam pcre pdf pdflib perl png pppd python qt3 qt3support qt4 quicktime readline reflection sdl session sockets spell spl srt sse sse2 ssl svg szip tcpd theora threads tiff truetype truetype-fonts type1-fonts unicode usb vcd vorbis x x264 xanim xcomposite xine xinerama xml xorg xosd xv xvid xvmc zlib&quot; ALSA_CARDS=&quot;usb-audio&quot; ALSA_PCM_PLUGINS=&quot;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&quot; ELIBC=&quot;glibc&quot; INPUT_DEVICES=&quot;keyboard mouse evdev&quot; KERNEL=&quot;linux&quot; LCD_DEVICES=&quot;bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text&quot; LINGUAS=&quot;en_US&quot; USERLAND=&quot;GNU&quot; VIDEO_CARDS=&quot;nvidia vesa&quot;
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>abcdefg@blacktux.de</who>
            <bug_when>2008-04-10 18:55:49 0000</bug_when>
            <thetext>I&apos;ve got the same Problem... :-(</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>renrutal@gmail.com</who>
            <bug_when>2008-04-10 21:54:41 0000</bug_when>
            <thetext>I confirm it, however I use a x86 system, a Core 2 Duo with march=nocona on a i686 chost.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>l@lwithers.me.uk</who>
            <bug_when>2008-04-15 22:29:41 0000</bug_when>
            <thetext>Created an attachment (id=149862)
Patch to potentially fix compilation issue

Following into this a little more, it seems that the file magic/Magdir/compress has an error -- part of a file description is commented out. I&apos;m not sure if this was just a typo or was intentionally commented out and the rest left as-is. Anyway, the attached patch uncomments that line and this allows file to be built. I can also confirm that it correctly seems to recognise compressed files (.Z) and gzipped files.

I&apos;ve sent this patch upstream. I&apos;ll summarise any response here.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>cardoe@gentoo.org</who>
            <bug_when>2008-07-17 20:07:19 0000</bug_when>
            <thetext>Laurence&apos;s patch appears in 4.25 which is now in the tree. Marking fix.</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>149862</attachid>
            <date>2008-04-15 22:29 0000</date>
            <desc>Patch to potentially fix compilation issue</desc>
            <filename>my-patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIG1hZ2ljL01hZ2Rpci9jb21wcmVzcy5vbGQJMjAwOC0wNC0xNSAyMjoyMjo1OC4wMDAwMDAw
MDAgKzAwMDAKKysrIG1hZ2ljL01hZ2Rpci9jb21wcmVzcwkyMDA4LTA0LTE1IDIyOjIzOjAxLjAw
MDAwMDAwMCArMDAwMApAQCAtOSw3ICs5LDcgQEAKICMgYmVjYXVzZSBpdCB0cmllcyB0byB1bmNv
bXByZXNzIGl0IHRvIGZpZ3VyZSBvdXQgd2hhdCdzIGluc2lkZS4KIAogIyBzdGFuZGFyZCB1bml4
IGNvbXByZXNzCi0jMAlzdHJpbmcJCVwwMzdcMjM1CWNvbXByZXNzJ2QgZGF0YQorMAlzdHJpbmcJ
CVwwMzdcMjM1CWNvbXByZXNzJ2QgZGF0YQogIyE6bWltZQlhcHBsaWNhdGlvbi94LWNvbXByZXNz
CiA+MglieXRlJjB4ODAJPjAJCWJsb2NrIGNvbXByZXNzZWQKID4yCWJ5dGUmMHgxZgl4CQklZCBi
aXRzCg==
</data>        

          </attachment>
    </bug>

</bugzilla>