Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 101032 - Patch to build icewm under uclibc environments
Summary: Patch to build icewm under uclibc environments
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-01 15:23 UTC by René Rhéaume (a.k.a. repzilon, rener)
Modified: 2007-07-28 22:40 UTC (History)
4 users (show)

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


Attachments
Quick and dirty patch to build icewm on uclibc (icewm-1.2.20.acpustatus.patch,1.15 KB, patch)
2005-08-01 15:25 UTC, René Rhéaume (a.k.a. repzilon, rener)
Details | Diff
Mini test program for sysinfo() (testsysinfo.c,349 bytes, text/plain)
2005-08-03 03:21 UTC, René Rhéaume (a.k.a. repzilon, rener)
Details
Better patch to build icewm on uclibc (icewm-1.2.2x.acpustatus-r2.patch,708 bytes, patch)
2005-08-03 18:01 UTC, René Rhéaume (a.k.a. repzilon, rener)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description René Rhéaume (a.k.a. repzilon, rener) 2005-08-01 15:23:57 UTC
uclibc seems to lack the function that returns the total process count on the
running system. IceWM merge fails when it tries to compile acpustatus.cc, which
contains this function call. However, there is another version of the code
without the infamous call. I came up with a quick and dirty (as it needs to be
made portable per Gentoo policy) patch made against 1.2.20.

To use it, add this in the src)unpack function of the ebuild
use elibc_uclibc && epatch ${FILESDIR}/${P/_}.acpustatus.patch

Reproducible: Always
Steps to Reproduce:
Comment 1 René Rhéaume (a.k.a. repzilon, rener) 2005-08-01 15:25:07 UTC
Created attachment 64904 [details, diff]
Quick and dirty patch to build icewm on uclibc
Comment 2 SpanKY gentoo-dev 2005-08-01 19:23:41 UTC
i dont know what you're trying to solve but that patch is def wrong

why cant you include sys/sysinfo.h ?
Comment 3 René Rhéaume (a.k.a. repzilon, rener) 2005-08-03 03:17:41 UTC
(In reply to comment #2)
> i dont know what you're trying to solve but that patch is def wrong
You are right. This patch is wrong. I made a test program and sysinfo worked.

> why cant you include sys/sysinfo.h ?
I get a build error. It seems there is stuff included twice.

  CXX    acpustatus.o
In file included from /usr/include/linux/sysctl.h:27,
                 from /usr/include/sys/sysctl.h:28,
                 from acpustatus.cc:45:
/usr/include/linux/kernel.h:180: error: redefinition of `struct sysinfo'
/usr/include/sys/sysinfo.h:28: error: previous definition of `struct sysinfo'
make[1]: *** [acpustatus.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [base] Error 2
Comment 4 René Rhéaume (a.k.a. repzilon, rener) 2005-08-03 03:19:12 UTC
(In reply to comment #2)
> i dont know what you're trying to solve but that patch is def wrong
You are right. This patch is wrong. I made a test program and sysinfo worked.

> why cant you include sys/sysinfo.h ?
I get a build error. It seems there is stuff included twice.

  CXX    acpustatus.o
In file included from /usr/include/linux/sysctl.h:27,
                 from /usr/include/sys/sysctl.h:28,
                 from acpustatus.cc:45:
/usr/include/linux/kernel.h:180: error: redefinition of `struct sysinfo'
/usr/include/sys/sysinfo.h:28: error: previous definition of `struct sysinfo'
make[1]: *** [acpustatus.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [base] Error 2
Comment 5 René Rhéaume (a.k.a. repzilon, rener) 2005-08-03 03:21:49 UTC
Created attachment 64978 [details]
Mini test program for sysinfo()
Comment 6 solar (RETIRED) gentoo-dev 2005-08-03 04:24:45 UTC
test program compiles and runs fine here.
Portage 2.0.51.19 (uclibc/x86/hardened/2.4, gcc-3.3.5-20050130,
uclibc-0.9.27-r0, 2.4.31-hardened i686)

It looks as if you have a local headers problem.
Comment 7 René Rhéaume (a.k.a. repzilon, rener) 2005-08-03 14:32:54 UTC
(In reply to comment #6)
> test program compiles and runs fine here.
The test also runs fine on my system.

The build error shown on comments 3 and 4 (sorry for the double post) is from
IceWM where I suspect #include directives are confusing GCC.
Comment 8 René Rhéaume (a.k.a. repzilon, rener) 2005-08-03 18:01:17 UTC
Created attachment 65033 [details, diff]
Better patch to build icewm on uclibc

Exactly what I thought. The #include directives were placed in a way to confuse
GCC on my system. Also, the process count is back.
Comment 9 Chris Leppanen 2006-04-17 19:28:00 UTC
I tried it out with IceWM 1.2.25 and it solved my problem.
Comment 10 Steve Dibb (RETIRED) gentoo-dev 2007-07-28 22:40:56 UTC
In CVS, thanks for the patch. :)