Source: pcp
Version: 3.9.6
Severity: important
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd

Hello,

In addition to the missing autoconf dependency in #752171 there are
two remaining issues for the GNU/Hurd build.

1) On Hurd there is no pthread minimum stack size defined. On GNU/Linux
this value is set to 16384. The attached stack_size.patch use that number as
default when PTHREAD_STACK_MIN  is not defined. In fact for Hurd it
could be as small as 4096, the page size for x86.

2) Due to some yet unknown reason the second time pmieconf is creating
the file 'local' it fails with the fname being empty in rules.c. The
attached patch makefile.patch is a work-around for this problem by not
deleting that file the second time.

(cd src/pmieconf; PCP_CONF=../../src/include/pcp.conf
LD_LIBRARY_PATH=../../src/libpcp/src:../../src/libpcp_pmda/src:$LD_LIBRARY_PATH
HOME=`pwd` PCP_ALT_CPP=../../src/pmcpp/pmcpp ./pmieconf -F -r rulesdir
-f local) manually works to create 'local', but not in the nested
make calls.

It seems that the re-creation of that file could be avoided by
modifying the files GNUmakefile and/or GNUmakefile.rules resulting in:
Nothing to be done for 'default_pcp' when getting to the examples
directory? (Dunno how to do that yet).

Thanks!


--- a/src/libpcp/src/probe.c	2014-06-19 02:34:07.000000000 +0200
+++ b/src/libpcp/src/probe.c	2014-06-23 16:08:48.000000000 +0200
@@ -16,8 +16,12 @@
 #include "internal.h"
 #include "probe.h"
 
-#if defined(IS_SOLARIS) && !defined(PTHREAD_STACK_MIN)
+#if !defined(PTHREAD_STACK_MIN)
+#if defined(IS_SOLARIS)
 #define PTHREAD_STACK_MIN       ((size_t)_sysconf(_SC_THREAD_STACK_MIN))
+#else
+#define PTHREAD_STACK_MIN       16384
+#endif
 #endif
 
 /*
--- a/src/pmieconf/GNUmakefile	2014-01-09 00:29:26.000000000 +0100
+++ b/src/pmieconf/GNUmakefile	2014-06-23 15:59:09.000000000 +0200
@@ -55,7 +55,7 @@
 	done
 
 rules: $(SUBDIRS)
-	rm -fr rules local; mkdir rules; exit 0
+	rm -fr rules; mkdir rules; exit 0
 	$(SUBDIRS_MAKERULE)
 	$(RUN_IN_BUILD_ENV) ./$(CMDTARGET) -F -r rules -f local
 

Reply via email to