Bug 137581 - [patch] archivers/lzmautils-devel (xz): correct detection of number of processors
Summary: [patch] archivers/lzmautils-devel (xz): correct detection of number of proces...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-08 21:00 UTC by Martin Birgmeier
Modified: 2009-09-19 20:40 UTC (History)
0 users

See Also:


Attachments
lzmautils-devel.diff (1.25 KB, patch)
2009-08-18 08:02 UTC, David Naylor
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Birgmeier 2009-08-08 21:00:12 UTC
	there is a bug in the source code of xz which prevents it from
	correctly detecting the number of processors. patch follows.

Fix: ------------------------------ snip ------------------------------


This should probably also be reported upstream.--wCAYCPJaFPwbYiVxE2f19UtVXvXpE0koBjM6G1lkGZziQXLe
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- ./src/xz/hardware.c.ORIG	2008-11-19 15:21:23.000000000 +0100
+++ ./src/xz/hardware.c	2009-08-08 21:13:49.000000000 +0200
@@ -42,7 +42,7 @@
 static void
 hardware_cores(void)
 {
-#if defined(HAVE_NUM_PROCESSORS_SYSCONF)
+#if defined(HAVE_NCPU_SYSCONF)
 	const long cpus = sysconf(_SC_NPROCESSORS_ONLN);
 	if (cpus > 0)
 		opt_threads = (size_t)(cpus);
------------------------------ snip ------------------------------
How-To-Repeat: 	run 'xz -H' on a multi-core machine and verify that it always
	reports "one" for the maximum number of threads it will use
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2009-08-09 12:10:34 UTC
Maintainer of archivers/lzmautils-devel,

Please note that PR ports/137581 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/137581

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2009-08-09 12:10:35 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 David Naylor 2009-08-18 08:02:08 UTC
Attached is a patch that can be applied against the port.  It does fix the 
output from `xz -H` however when running tests the (de)compression doesn't 
use more than one thread.  
Comment 4 Martin Wilke freebsd_committer freebsd_triage 2009-09-19 20:34:18 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!
Comment 5 dfilter service freebsd_committer freebsd_triage 2009-09-19 20:34:24 UTC
miwi        2009-09-19 19:34:11 UTC

  FreeBSD ports repository

  Modified files:
    archivers/lzmautils-devel Makefile 
  Added files:
    archivers/lzmautils-devel/files patch-src-xz-hardware.c 
  Log:
  - Fix output from `xz -H` however when running tests the (de)compression doesn't
    use more than one thread.
  
  PR:             137581
  Submitted by:   Martin Birgmeier <martin@email.aon.at>
  Approved by:    maintainer
  Feature safe:   yes
  
  Revision  Changes    Path
  1.9       +1 -0      ports/archivers/lzmautils-devel/Makefile
  1.1       +17 -0     ports/archivers/lzmautils-devel/files/patch-src-xz-hardware.c (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"