NUMCPU bug in spec file of samba-3.0.0-2.src.rpm
Gerald (Jerry) Carter
jerry at samba.org
Mon Oct 6 13:49:52 GMT 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Nir Soffer wrote:
| The spec file look for number of cpu's by counting line in /proc/cpuinfo
| that contain a "processor" filed:
|
| NUMCPU=`grep processor /proc/cpuinfo | wc -l`
|
| On Yellow Dog Linux, which is a RedHat 9 based, the cpuinfo file does
| not contain a processor field. When you install the rpm NUMCPU is zero,
| and make fail when called:
|
| make -j${NUMCPU} proto
|
| + make -j 0 proto
| make: the `-j' option requires a positive integral argument
| Usage: make [options] [target] ...
|
| This is the cpuinfo in YDL:
|
| cpu : 740/750
| temperature : 63-65 C (uncalibrated)
| clock : 264MHz
| revision : 2.2 (pvr 0008 0202)
| bogomips : 532.48
| machine : PowerBook
| motherboard : AAPL,PowerBook1998 MacRISC
| detected as : 50 (PowerBook Wallstreet)
| pmac flags : 00000009
| L2 cache : 1024K unified pipelined-syncro-burst
| memory : 320MB
| pmac-generation : OldWorld
|
| I don't know if its a problem in YDL, not using the same cpuinfo format
| as RedHat 9, or how a multiply cpuinfo looks on YDL, But It would be
| safer to use a default of 1 cpu if NUMCPU is not a positive integer.
| That way the rpm will compile on distributions with wired cpuinfo files.
| Running slower is better than not running at all.
The test works on RedHat 9. However, I think your suggestion
on a default value is a good one. I'll apply this to the 3.0
tree today. Thanks.
cheers, jerry
~ ----------------------------------------------------------------------
~ Hewlett-Packard ------------------------- http://www.hp.com
~ SAMBA Team ---------------------- http://www.samba.org
~ GnuPG Key ---- http://www.plainjoe.org/gpg_public.asc
~ "You can never go home again, Oatman, but I guess you can shop there."
~ --John Cusack - "Grosse Point Blank" (1997)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQE/gXL/IR7qMdg1EfYRAu5nAJ9vpYh3VFr5Nn6faO8GQACPy3jwpwCgivr5
vRZbzVodRgy6Ff8DvlnpGpc=
=7OYJ
-----END PGP SIGNATURE-----
More information about the samba-technical
mailing list