Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 245393 - app-portage/portage-utils fails to build due to error: ‘HZ’ undeclared (suse specific)
Summary: app-portage/portage-utils fails to build due to error: ‘HZ’ undeclared (suse ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo non-Linux Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-03 12:48 UTC by Justin Lecher (RETIRED)
Modified: 2009-03-15 09:58 UTC (History)
1 user (show)

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


Attachments
emerge.info (emerge.info,9.34 KB, text/plain)
2008-11-03 12:49 UTC, Justin Lecher (RETIRED)
Details
param.h.diff (param.h.diff,843 bytes, text/plain)
2008-12-04 15:38 UTC, Justin Lecher (RETIRED)
Details
portage-utils-0.1.29-qlop.c.patch (portage-utils-0.1.29-qlop.c.patch,301 bytes, text/plain)
2008-12-04 15:40 UTC, Justin Lecher (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Lecher (RETIRED) gentoo-dev 2008-11-03 12:48:48 UTC
emerge of every ebuild for app-portage/portage-utils fails with following error:

sed -n '/^DECLARE_APPLET/s:.*(\(.*\)).*:#include "\1.c":p' applets.h > include_applets.h
x86_64-pc-linux-gnu-gcc -DVERSION=\"0.1.29\" -DAPPLET_q -DAPPLET_qatom -DAPPLET_qcache -DAPPLET_qcheck -DAPPLET_qdepends -DAPPLET_qfile -DAPPLET_qgrep -DAPPLET_qlist -DAPPLET_qlop -DAPPLET_qmerge -DAPPLET_qpkg -DAPPLET_qsearch -DAPPLET_qsize -DAPPLET_qtbz2 -DAPPLET_quse -DAPPLET_qxpak  -std=gnu99 -MM main.c > .depend
: q : qatom : qcache : qcheck : qdepends : qfile : qgrep : qlist : qlop : qmerge : qpkg : qsearch : qsize : qtbz2 : quse : qxpak :
x86_64-pc-linux-gnu-gcc -std=gnu99 main.c -o q
In file included from include_applets.h:6,
                 from main.c:1045:
qlop.c: In function ‘show_current_emerge’:
qlop.c:361: error: ‘HZ’ undeclared (first use in this function)
qlop.c:361: error: (Each undeclared identifier is reported only once
qlop.c:361: error: for each function it appears in.)
In file included from include_applets.h:16,
                 from main.c:1045:
qcache.c: In function ‘qcache_traverse’:
qcache.c:555: warning: passing argument 4 of ‘scandir’ from incompatible pointer type
make: *** [q] Error 1
 * ERROR: app-portage/portage-utils-0.1.29 failed:
 * (no error message)
 * 
 * Call stack:
 * ebuild.sh:  49: <call src_compile>
 * environment:2558:     emake || die
Comment 1 Justin Lecher (RETIRED) gentoo-dev 2008-11-03 12:49:26 UTC
Created attachment 170624 [details]
emerge.info
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-11-11 16:00:41 UTC
odd, works fine here on amd64-linux. What host OS are you on again?
Comment 3 Justin Lecher (RETIRED) gentoo-dev 2008-11-11 18:19:17 UTC
its an Suse 10.2. I tryed woth gcc 4.3 and 4.2 and it doesn't affects this.
Comment 4 Justin Lecher (RETIRED) gentoo-dev 2008-12-04 12:09:19 UTC
Found out that it is a comon error on suse machines, which should be resolved including asm/param.h. Looks like the source of qlop.c does it, but...
Comment 5 Justin Lecher (RETIRED) gentoo-dev 2008-12-04 15:38:01 UTC
Find a solution. The param.h from Suse in /usr/include/asm differs from the one in /usr/src/linux/include/asm/. I will past the diff. There the problem came from, as Hz isn't defined there. One can patch qlop.c although my one isn't the best I think, because it is very specific. Perhaps there could be something included in the ebuild which checks wether the patch is needed because one has the problem of no definition of Hz in the standard param.h.
Comment 6 Justin Lecher (RETIRED) gentoo-dev 2008-12-04 15:38:38 UTC
Created attachment 174237 [details]
param.h.diff

=param.h.diff
Comment 7 Justin Lecher (RETIRED) gentoo-dev 2008-12-04 15:40:36 UTC
Created attachment 174239 [details]
portage-utils-0.1.29-qlop.c.patch

=portage-utils-0.1.29-qlop.c.patch
Comment 8 SpanKY gentoo-dev 2009-03-15 09:57:54 UTC
fixed in cvs by discovering the value dynamically from the elf notes on the stack

http://sources.gentoo.org/gentoo-projects/portage-utils/qlop.c?r1=1.41&r2=1.42