Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 328971 - sys-process/htop can not be cross compiles, because /proc/stat and /proc/meminfo can not be tested for existence
Summary: sys-process/htop can not be cross compiles, because /proc/stat and /proc/memi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Christian Ruppert (idl0r)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-19 15:04 UTC by Johannes Krude
Modified: 2012-03-21 20:56 UTC (History)
1 user (show)

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


Attachments
htop-0.8.3-r1.ebuild patched (htop-0.8.3-r1.ebuild,1.68 KB, text/plain)
2010-07-19 15:06 UTC, Johannes Krude
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Krude 2010-07-19 15:04:57 UTC
./configure for htop fails when cross compiling. ./configure can not detect wheter /proc/stat and /proc/meminfo exist. ./configure needs these answers in env vars.

I updated the ebuild to make it work, the relevant lines are

--- /usr/portage/sys-process/htop/htop-0.8.3-r1.ebuild	2010-05-03 20:46:02.000000000 +0200
+++ /usr/local/portage/sys-process/htop/htop-0.8.3-r1.ebuild	2010-07-19 16:53:14.000000000 +0200
@@ -39,6 +39,13 @@
 src_configure() {
 	useq debug && append-flags -DDEBUG
 
+	if [[ "$CBUILD" != "$CHOST" ]]; then
+		ewarn "cross compiling assuming /proc/stat exists"
+		export ac_cv_file__proc_stat=yes
+		ewarn "cross compiling assuming /proc/meminfo exists"
+		export ac_cv_file__proc_meminfo=yes
+	fi
+
 	econf \
 		$(use_enable openvz) \
 		$(use_enable vserver) \

Reproducible: Always
Comment 1 Johannes Krude 2010-07-19 15:06:04 UTC
Created attachment 239389 [details]
htop-0.8.3-r1.ebuild patched
Comment 2 Christian Ruppert (idl0r) gentoo-dev 2011-06-24 12:01:19 UTC
http://htop.svn.sourceforge.net/viewvc/htop/trunk/Process.c?r1=206&r2=216
NOTE: Only the second part of the patch.
Comment 3 Christian Ruppert (idl0r) gentoo-dev 2011-06-24 12:01:53 UTC
Oops, sorry.. wrong bug :(
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2012-03-21 20:56:06 UTC
Committed to ebuild for 1.0.1 (slightly in different syntax but essentially the same)