Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 209614 - sys-apps/mtree-2007.4 compile fails
Summary: sys-apps/mtree-2007.4 compile fails
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 270512 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-02-10 23:45 UTC by sourlover
Modified: 2018-01-17 11:56 UTC (History)
2 users (show)

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


Attachments
"build log", with autoconf (sys-apps:mtree-2007.4:20080210-184312.log,18.66 KB, text/plain)
2008-02-11 00:46 UTC, sourlover
Details
./mtree-2007.4/work/pkgsrc/pkgtools/libnbcompat/files/config.log (config.log,261.32 KB, text/plain)
2008-02-11 02:15 UTC, sourlover
Details
preprocessor output for glob.c (glob.i,228.25 KB, text/plain)
2008-02-11 12:46 UTC, sourlover
Details
mtree-2007.4-build.log (mtree-2007.4-build.log,22.95 KB, text/plain)
2009-07-26 05:16 UTC, Ryan Hill (RETIRED)
Details
mtree-2007.4-config.log (mtree-2007.4-config.log,271.02 KB, text/plain)
2009-07-26 05:17 UTC, Ryan Hill (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sourlover 2008-02-10 23:45:15 UTC
I understand needing to download all of pkgsrc to get this netbsd utility, I looked and can't find another readily available source distribution short of cvs.
But is it really necessary to extract all of it -upwards of 100k files- to build an 84k binary?? It made disk access very slow for 10 minutes.

And then it fails:


checking whether optreset is declared... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating nbcompat/config.h
x86_64-pc-linux-gnu-gcc  -I. -I.  -march=k8 -msse3 -O3 -pipe -DHAVE_CONFIG_H -c bits.c
x86_64-pc-linux-gnu-gcc -I. -I.  -march=k8 -msse3 -O3 -pipe  -o bits bits.o
./bits nbcompat/nbtypes.h
gawk -f nbcompat.awk nbcompat/config.h > nbcompat/nbconfig.h
x86_64-pc-linux-gnu-gcc  -I. -I.  -march=k8 -msse3 -O3 -pipe -DHAVE_CONFIG_H -c glob.c
In file included from ./nbcompat.h:60,
                 from __glob13.c:35,
                 from glob.c:12:
./nbcompat/err.h:48: error: expected declaration specifiers or '...' before 'va_list'
./nbcompat/err.h:49: error: expected declaration specifiers or '...' before 'va_list'
./nbcompat/err.h:55: error: expected declaration specifiers or '...' before 'va_list'
./nbcompat/err.h:56: error: expected declaration specifiers or '...' before 'va_list'
In file included from ./nbcompat.h:67,
                 from __glob13.c:35,
                 from glob.c:12:
./nbcompat/statvfs.h:74: error: conflicting types for 'fsid_t'
/usr/include/gentoo-multilib/amd64/sys/types.h:41: error: previous declaration of 'fsid_t' was here
In file included from ./nbcompat.h:69,
                 from __glob13.c:35,
                 from glob.c:12:
./nbcompat/stdio.h:55: error: expected ')' before '*' token
./nbcompat/stdio.h:59: error: expected ')' before '*' token
./nbcompat/stdio.h:63: error: expected ')' before '*' token
./nbcompat/stdio.h:68: error: expected declaration specifiers or '...' before 'va_list'
./nbcompat/stdio.h:68: warning: conflicting types for built-in function 'vsnprintf'
./nbcompat/stdio.h:73: error: expected declaration specifiers or '...' before 'va_list'
In file included from ./nbcompat.h:75,
                 from __glob13.c:35,
                 from glob.c:12:
./nbcompat/util.h:61: error: expected ')' before '*' token
In file included from __glob13.c:79,
                 from glob.c:12:
./nbcompat/glob.h:58: warning: 'struct stat' declared inside parameter list
./nbcompat/glob.h:58: warning: its scope is only this definition or declaration, which is probably not what you want
./nbcompat/glob.h:59: warning: 'struct stat' declared inside parameter list
In file included from glob.c:12:
__glob13.c:167: warning: 'struct stat' declared inside parameter list
__glob13.c:168: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
__glob13.c:170: warning: 'struct stat' declared inside parameter list
__glob13.c: In function 'glob':
__glob13.c:194: error: 'MAXPATHLEN' undeclared (first use in this function)
__glob13.c:194: error: (Each undeclared identifier is reported only once
__glob13.c:194: error: for each function it appears in.)
__glob13.c: In function 'globexp2':
__glob13.c:277: error: 'MAXPATHLEN' undeclared (first use in this function)
__glob13.c: In function 'globtilde':
__glob13.c:424: warning: assignment makes pointer from integer without a cast
__glob13.c:425: warning: assignment makes pointer from integer without a cast
__glob13.c:428: error: dereferencing pointer to incomplete type
__glob13.c:435: warning: assignment makes pointer from integer without a cast
__glob13.c:438: error: dereferencing pointer to incomplete type
__glob13.c: In function 'glob0':
__glob13.c:473: error: 'MAXPATHLEN' undeclared (first use in this function)
__glob13.c: In function 'glob1':
__glob13.c:581: error: 'MAXPATHLEN' undeclared (first use in this function)
__glob13.c: In function 'glob2':
__glob13.c:608: error: storage size of 'sb' isn't known
__glob13.c:629: error: 'S_IFMT' undeclared (first use in this function)
__glob13.c:629: error: 'S_IFLNK' undeclared (first use in this function)
__glob13.c: In function 'glob3':
__glob13.c:674: error: 'DIR' undeclared (first use in this function)
__glob13.c:674: error: 'dirp' undeclared (first use in this function)
__glob13.c:676: error: 'MAXPATHLEN' undeclared (first use in this function)
__glob13.c:693: error: 'errno' undeclared (first use in this function)
__glob13.c:721: error: 'readdir' undeclared (first use in this function)
__glob13.c:727: error: dereferencing pointer to incomplete type
__glob13.c:733: error: dereferencing pointer to incomplete type
__glob13.c: In function 'globextend':
__glob13.c:811: warning: incompatible implicit declaration of built-in function 'malloc'
__glob13.c:811: warning: pointer/integer type mismatch in conditional expression
__glob13.c:836: error: 'ARG_MAX' undeclared (first use in this function)
__glob13.c:837: error: 'errno' undeclared (first use in this function)
__glob13.c: At top level:
__glob13.c:921: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
__glob13.c:925: error: expected identifier or '(' before '{' token
__glob13.c: In function 'g_lstat':
__glob13.c:949: error: argument 'sb' doesn't match prototype
__glob13.c:167: error: prototype declaration
__glob13.c:950: error: 'MAXPATHLEN' undeclared (first use in this function)
__glob13.c:959: warning: passing argument 2 of 'pglob->gl_lstat' from incompatible pointer type
__glob13.c: In function 'g_stat':
__glob13.c:968: error: argument 'sb' doesn't match prototype
__glob13.c:170: error: prototype declaration
__glob13.c:969: error: 'MAXPATHLEN' undeclared (first use in this function)
__glob13.c:978: warning: passing argument 2 of 'pglob->gl_stat' from incompatible pointer type
make: *** [glob.o] Error 1
 * 
 * ERROR: sys-apps/mtree-2007.4 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2360:  Called die
 * The specific snippet of code:
 *       emake || die "emake libnbcompat failed";
 *  The die message:
 *   emake libnbcompat failed
 * 




Reproducible: Always

Steps to Reproduce:
1. emerge mtree
2. Have all your other disk activity disrupted for 10 minutes
3. Compile fails.
Comment 1 SpanKY gentoo-dev 2008-02-11 00:13:20 UTC
please review the bug reporting guide:
http://www.gentoo.org/doc/en/bugzilla-howto.xml

you've left out information that should be included with every report such as:
 - emerge --info
 - the full build log as an attachment
Comment 2 sourlover 2008-02-11 00:46:52 UTC
Created attachment 143176 [details]
"build log", with autoconf
Comment 3 sourlover 2008-02-11 00:53:28 UTC
Hi vapier,
That's the build log right there. You want all of the autoconf output too? OK, attached.
I don't see how any of the data in emerge --info might help, but here it is:

Portage 2.1.4.2 (default-linux/amd64/2006.1, gcc-4.2.2, glibc-2.7-r1, 2.6.23-hardened-r2 x86_64)
=================================================================
System uname: 2.6.23-hardened-r2 x86_64 AMD Athlon(tm) 64 Processor 4000+
Timestamp of tree: Sun, 10 Feb 2008 17:16:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.4
dev-lang/python:     2.5.1-r5
sys-apps/baselayout: 2.0.0_rc6-r1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.6.3, 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="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -msse3 -O3 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=k8 -msse3 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="collision-protect distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo"
MAKEOPTS="-j2"
PKGDIR="/mnt/mutable/portage_local/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=30"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=30"
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="/mnt/mutable/portage_local/builddir"
PORTDIR="/mnt/mutable/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/mabi-dev /mnt/mutable/portage_local/tree"
SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage/"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS

I have lots of USE flags, and they're completely irrelevant so I've ommited them.
Please tell me you didn't realise your ebuild was extracting 110,000 files for a 80k binary :) You've helped me with a bug before, and I remember praising your skills..
Comment 4 SpanKY gentoo-dev 2008-02-11 01:59:16 UTC
post the config.log as an attachment ... the code in question should not be compiled which means HAVE_ERR is not being defined on your system
Comment 5 sourlover 2008-02-11 02:15:47 UTC
Created attachment 143181 [details]
./mtree-2007.4/work/pkgsrc/pkgtools/libnbcompat/files/config.log

It looks like it's #define'd.
Comment 6 SpanKY gentoo-dev 2008-02-11 05:59:49 UTC
go into the dir and run:
x86_64-pc-linux-gnu-gcc  -I. -I. -march=k8 -msse3 -O3 -pipe -DHAVE_CONFIG_H -E -dD glob.c -o glob.i

and post the glob.i file as an attachment
Comment 7 sourlover 2008-02-11 12:46:23 UTC
Created attachment 143199 [details]
preprocessor output for glob.c
Comment 8 SpanKY gentoo-dev 2008-02-12 00:13:46 UTC
so we're clear, if you try to compile that glob.c by hand, it fails, right ?  as does the glob.i ?

the glob.i you posted compiles fine for me and does not contain the lines that the error output indicates
Comment 9 sourlover 2008-02-13 16:07:42 UTC
I tried to compile glob.c by hand, and it worked fine. Then I did an ebuild(1) clean, and emerge -v1 mtree, which worked fine. I can't explain it. The log I attached wasn't from the first time it failed:

# ls -la /var/log/portage/*mtree*2007*
-rw-r--r-- 1 root portage 14592 Jan 27 18:49 /var/log/portage/sys-apps:mtree-2007.4:20080127-174520.log
-rw-r--r-- 1 root portage 19264 Jan 28 22:58 /var/log/portage/sys-apps:mtree-2007.4:20080128-215512.log
-rw-r--r-- 1 root portage 19146 Feb  4 16:11 /var/log/portage/sys-apps:mtree-2007.4:20080204-150759.log
-rw-r--r-- 1 root portage 19104 Feb 10 19:47 /var/log/portage/sys-apps:mtree-2007.4:20080210-184312.log
-rw-r--r-- 1 root portage 23971 Feb 12 13:53 /var/log/portage/sys-apps:mtree-2007.4:20080212-124838.log

The emerge from 20080127 was from before this change: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/mtree/mtree-2007.4.ebuild?r1=1.1&r2=1.2
The other merges included the change, and they display this error.

The 20080210 emerge is the log I attached, but when I emerged it on the 12th, it worked fine, using the exact same portage checkout. I went through the list of packages that were emerged in the meantime, and nothing strikes me as immediately relevant, other than maybe that com_err was upgraded from 1.40.5 to 1.40.6?

Since it's mostly academic at this point, I'm willing to write it off as being caused by the odd sprinkle of faerie dust. Either way, thanks for your help.
Comment 10 Ryan Hill (RETIRED) gentoo-dev 2009-07-26 05:11:05 UTC
*** Bug 270512 has been marked as a duplicate of this bug. ***
Comment 11 Ryan Hill (RETIRED) gentoo-dev 2009-07-26 05:11:58 UTC
Looks like this is still broken.
Comment 12 Ryan Hill (RETIRED) gentoo-dev 2009-07-26 05:16:35 UTC
Created attachment 199189 [details]
mtree-2007.4-build.log
Comment 13 Ryan Hill (RETIRED) gentoo-dev 2009-07-26 05:17:04 UTC
Created attachment 199190 [details]
mtree-2007.4-config.log
Comment 14 Ryan Hill (RETIRED) gentoo-dev 2009-07-26 05:37:52 UTC
actually, this is a parallel make bug.  i can get it to build about half the time.
Comment 15 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2010-01-03 05:02:05 UTC
I have the same build error.
Comment 16 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-01-17 11:56:27 UTC
Closing this after eight years. Please file a new bug report against current mtree version if this is still an issue.