!54 fix failure caused by GCC upgrade to GCC-10
From: @aslfjk Reviewed-by: @small_leek Signed-off-by: @small_leek
This commit is contained in:
commit
db2be17518
94
Fix-pcp-gcc10.patch
Normal file
94
Fix-pcp-gcc10.patch
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
diff --git a/src/external/sds.h b/src/external/sds.h
|
||||||
|
index 1bdb60d..adcc12c 100644
|
||||||
|
--- a/src/external/sds.h
|
||||||
|
+++ b/src/external/sds.h
|
||||||
|
@@ -34,7 +34,7 @@
|
||||||
|
#define __SDS_H
|
||||||
|
|
||||||
|
#define SDS_MAX_PREALLOC (1024*1024)
|
||||||
|
-const char *SDS_NOINIT;
|
||||||
|
+extern const char *SDS_NOINIT;
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
diff --git a/src/pmdas/cifs/pmda.c b/src/pmdas/cifs/pmda.c
|
||||||
|
index 84fb50f..9240e3d 100644
|
||||||
|
--- a/src/pmdas/cifs/pmda.c
|
||||||
|
+++ b/src/pmdas/cifs/pmda.c
|
||||||
|
@@ -25,8 +25,8 @@ static int _isDSO = 1; /* for local contexts */
|
||||||
|
|
||||||
|
static char *cifs_procfsdir = "/proc/fs/cifs";
|
||||||
|
static char *cifs_statspath = "";
|
||||||
|
-unsigned int global_version_major;
|
||||||
|
-unsigned int global_version_minor;
|
||||||
|
+extern unsigned int global_version_major;
|
||||||
|
+extern unsigned int global_version_minor;
|
||||||
|
|
||||||
|
pmdaIndom indomtable[] = {
|
||||||
|
{ .it_indom = CIFS_FS_INDOM },
|
||||||
|
diff --git a/src/pmdas/perfevent/configparser.h b/src/pmdas/perfevent/configparser.h
|
||||||
|
index 4f504ea..c6726f2 100644
|
||||||
|
--- a/src/pmdas/perfevent/configparser.h
|
||||||
|
+++ b/src/pmdas/perfevent/configparser.h
|
||||||
|
@@ -69,9 +69,9 @@ typedef struct configuration {
|
||||||
|
pmcdynamic_t *dynamicpmc;
|
||||||
|
} configuration_t;
|
||||||
|
|
||||||
|
-int context_newpmc;
|
||||||
|
-int context_derived; /* A flag to check the current pmc */
|
||||||
|
-int context_dynamic; /* check the current dynamic pmc */
|
||||||
|
+extern int context_newpmc;
|
||||||
|
+extern int context_derived; /* A flag to check the current pmc */
|
||||||
|
+extern int context_dynamic; /* check the current dynamic pmc */
|
||||||
|
|
||||||
|
/* \brief parse the perf event configuration file
|
||||||
|
* This function allocates memory. The returned object should be passed to
|
||||||
|
diff --git a/src/pmdas/perfevent/configparser.l b/src/pmdas/perfevent/configparser.l
|
||||||
|
index bb139fe..fbdaeca 100644
|
||||||
|
--- a/src/pmdas/perfevent/configparser.l
|
||||||
|
+++ b/src/pmdas/perfevent/configparser.l
|
||||||
|
@@ -20,6 +20,10 @@
|
||||||
|
%{
|
||||||
|
#include "configparser.h"
|
||||||
|
|
||||||
|
+int context_newpmc;
|
||||||
|
+int context_derived;
|
||||||
|
+int context_dynamic;
|
||||||
|
+
|
||||||
|
static int is_derived(char *name)
|
||||||
|
{
|
||||||
|
char *str = NULL;
|
||||||
|
diff --git a/src/pmdas/perfevent/parse_events.c b/src/pmdas/perfevent/parse_events.c
|
||||||
|
index efe356f..f6d1a7b 100644
|
||||||
|
--- a/src/pmdas/perfevent/parse_events.c
|
||||||
|
+++ b/src/pmdas/perfevent/parse_events.c
|
||||||
|
@@ -18,6 +18,8 @@
|
||||||
|
#include "parse_events.h"
|
||||||
|
#include "perfinterface.h"
|
||||||
|
|
||||||
|
+char dev_dir[PATH_MAX]; /* Optional path prefix for the PMU devices */
|
||||||
|
+
|
||||||
|
static void cleanup_property(struct property *prop)
|
||||||
|
{
|
||||||
|
if (!prop)
|
||||||
|
diff --git a/src/pmdas/perfevent/parse_events.h b/src/pmdas/perfevent/parse_events.h
|
||||||
|
index 4e09496..8f7a393 100644
|
||||||
|
--- a/src/pmdas/perfevent/parse_events.h
|
||||||
|
+++ b/src/pmdas/perfevent/parse_events.h
|
||||||
|
@@ -80,11 +80,11 @@ struct software_event {
|
||||||
|
unsigned long long config;
|
||||||
|
};
|
||||||
|
|
||||||
|
-char dev_dir[PATH_MAX]; /* Optional path prefix for the PMU devices */
|
||||||
|
+extern char dev_dir[]; /* Optional path prefix for the PMU devices */
|
||||||
|
|
||||||
|
-int init_dynamic_events(struct pmu **pmu_list);
|
||||||
|
-void setup_cpu_config(struct pmu *pmu_ptr, int *ncpus, int **cpuarr);
|
||||||
|
-int get_file_string(char *path, char *buf);
|
||||||
|
-void cleanup_pmu_list(struct pmu *pmu);
|
||||||
|
+extern int init_dynamic_events(struct pmu **pmu_list);
|
||||||
|
+extern void setup_cpu_config(struct pmu *pmu_ptr, int *ncpus, int **cpuarr);
|
||||||
|
+extern int get_file_string(char *path, char *buf);
|
||||||
|
+extern void cleanup_pmu_list(struct pmu *pmu);
|
||||||
|
|
||||||
|
#endif /* PARSE_EVENTS_H_ */
|
||||||
7
pcp.spec
7
pcp.spec
@ -11,7 +11,7 @@
|
|||||||
Name: pcp
|
Name: pcp
|
||||||
Version: 4.1.3
|
Version: 4.1.3
|
||||||
Summary: System-level performance monitoring and performance management
|
Summary: System-level performance monitoring and performance management
|
||||||
Release: 15
|
Release: 16
|
||||||
License: GPLv2+ and LGPLv2.1+ and CC-BY
|
License: GPLv2+ and LGPLv2.1+ and CC-BY
|
||||||
URL: https://pcp.io
|
URL: https://pcp.io
|
||||||
Source0: https://dl.bintray.com/pcp/source/pcp-4.1.3.tar.gz
|
Source0: https://dl.bintray.com/pcp/source/pcp-4.1.3.tar.gz
|
||||||
@ -26,6 +26,7 @@ Patch9000: 9000-fix-new-function-not-found-when-Install.patch
|
|||||||
Patch9001: 0002-fix-some-pcp-pidstat-bugs.patch
|
Patch9001: 0002-fix-some-pcp-pidstat-bugs.patch
|
||||||
Patch9002: 0003-fix-pcp-pidstat-bug.patch
|
Patch9002: 0003-fix-pcp-pidstat-bug.patch
|
||||||
Patch9003: 0004-modify-python2-to-python3.patch
|
Patch9003: 0004-modify-python2-to-python3.patch
|
||||||
|
Patch9004: Fix-pcp-gcc10.patch
|
||||||
|
|
||||||
BuildRequires: gcc gcc-c++ procps autoconf bison flex nss-devel rpm-devel avahi-devel xz-devel zlib-devel
|
BuildRequires: gcc gcc-c++ procps autoconf bison flex nss-devel rpm-devel avahi-devel xz-devel zlib-devel
|
||||||
BuildRequires: python3-devel ncurses-devel readline-devel cyrus-sasl-devel papi-devel libpfm-devel >= 4
|
BuildRequires: python3-devel ncurses-devel readline-devel cyrus-sasl-devel papi-devel libpfm-devel >= 4
|
||||||
@ -865,6 +866,7 @@ This package installs selinux support files for PCP.
|
|||||||
%patch9001 -p1
|
%patch9001 -p1
|
||||||
%patch9002 -p1
|
%patch9002 -p1
|
||||||
%patch9003 -p1
|
%patch9003 -p1
|
||||||
|
%patch9004 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
@ -2218,6 +2220,9 @@ fi
|
|||||||
%config(noreplace) /etc/pcp/pmrep/*
|
%config(noreplace) /etc/pcp/pmrep/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Aug 04 2021 wangyong <wangyong187@huawei.com> - 4.1.3-16
|
||||||
|
- Fix build error caused by GCC upgrade to GCC-10
|
||||||
|
|
||||||
* Mon Nov 09 2020 lingsheng <lingsheng@huawei.com> - 4.1.3-15
|
* Mon Nov 09 2020 lingsheng <lingsheng@huawei.com> - 4.1.3-15
|
||||||
- Change require to python3-bpfcc
|
- Change require to python3-bpfcc
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user