* [meta-oe][PATCH 1/2] collectd: Fix build with glibc 2.30
@ 2019-07-27 20:06 Khem Raj
2019-07-27 20:06 ` [meta-oe][PATCH 2/2] pegtl: Fix build with clang/libc++ Khem Raj
2019-07-28 9:37 ` [meta-oe][PATCH 1/2] collectd: Fix build with glibc 2.30 Adrian Bunk
0 siblings, 2 replies; 5+ messages in thread
From: Khem Raj @ 2019-07-27 20:06 UTC (permalink / raw)
To: openembedded-devel
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../0001-Remove-including-sys-sysctl.h.patch | 81 +++++++++++++++++++
.../collectd/collectd_5.8.1.bb | 1 +
2 files changed, 82 insertions(+)
create mode 100644 meta-oe/recipes-extended/collectd/collectd/0001-Remove-including-sys-sysctl.h.patch
diff --git a/meta-oe/recipes-extended/collectd/collectd/0001-Remove-including-sys-sysctl.h.patch b/meta-oe/recipes-extended/collectd/collectd/0001-Remove-including-sys-sysctl.h.patch
new file mode 100644
index 0000000000..450cdd0e5f
--- /dev/null
+++ b/meta-oe/recipes-extended/collectd/collectd/0001-Remove-including-sys-sysctl.h.patch
@@ -0,0 +1,81 @@
+From e06c1b4259533ef7a396da841cbf950baccd8c11 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 27 Jul 2019 12:20:22 -0700
+Subject: [PATCH] Remove including sys/sysctl.h
+
+Glibc 2.30 has added deprecation notice and collectd detects it as
+warning
+
+Fixes
+sys/sysctl.h:21:2: error: "The <sys/sysctl.h> header is deprecated and will be removed." [-Werror,-W#warnings]
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/contextswitch.c | 4 ----
+ src/memory.c | 3 ---
+ src/swap.c | 3 ---
+ src/uuid.c | 4 ----
+ 4 files changed, 14 deletions(-)
+
+diff --git a/src/contextswitch.c b/src/contextswitch.c
+index 461fb0a..75d42ae 100644
+--- a/src/contextswitch.c
++++ b/src/contextswitch.c
+@@ -26,10 +26,6 @@
+ #include "common.h"
+ #include "plugin.h"
+
+-#ifdef HAVE_SYS_SYSCTL_H
+-#include <sys/sysctl.h>
+-#endif
+-
+ #if HAVE_SYSCTLBYNAME
+ /* no global variables */
+ /* #endif HAVE_SYSCTLBYNAME */
+diff --git a/src/memory.c b/src/memory.c
+index e49fe84..41996d5 100644
+--- a/src/memory.c
++++ b/src/memory.c
+@@ -28,9 +28,6 @@
+ #include "common.h"
+ #include "plugin.h"
+
+-#ifdef HAVE_SYS_SYSCTL_H
+-#include <sys/sysctl.h>
+-#endif
+ #ifdef HAVE_SYS_VMMETER_H
+ #include <sys/vmmeter.h>
+ #endif
+diff --git a/src/swap.c b/src/swap.c
+index 78f05c5..2488a5b 100644
+--- a/src/swap.c
++++ b/src/swap.c
+@@ -49,9 +49,6 @@
+ #if HAVE_SYS_PARAM_H
+ #include <sys/param.h>
+ #endif
+-#if HAVE_SYS_SYSCTL_H
+-#include <sys/sysctl.h>
+-#endif
+ #if HAVE_SYS_DKSTAT_H
+ #include <sys/dkstat.h>
+ #endif
+diff --git a/src/uuid.c b/src/uuid.c
+index 1cb9027..1c6cdc6 100644
+--- a/src/uuid.c
++++ b/src/uuid.c
+@@ -29,10 +29,6 @@
+ #include "common.h"
+ #include "plugin.h"
+
+-#if HAVE_SYS_SYSCTL_H
+-#include <sys/sysctl.h>
+-#endif
+-
+ #define UUID_RAW_LENGTH 16
+ #define UUID_PRINTABLE_COMPACT_LENGTH (UUID_RAW_LENGTH * 2)
+ #define UUID_PRINTABLE_NORMAL_LENGTH (UUID_PRINTABLE_COMPACT_LENGTH + 4)
+--
+2.22.0
+
diff --git a/meta-oe/recipes-extended/collectd/collectd_5.8.1.bb b/meta-oe/recipes-extended/collectd/collectd_5.8.1.bb
index 6dff18c16b..ed8b8a5d2b 100644
--- a/meta-oe/recipes-extended/collectd/collectd_5.8.1.bb
+++ b/meta-oe/recipes-extended/collectd/collectd_5.8.1.bb
@@ -14,6 +14,7 @@ SRC_URI = "http://collectd.org/files/collectd-${PV}.tar.bz2 \
file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \
file://0005-Disable-new-gcc8-warnings.patch \
file://0006-libcollectdclient-Fix-string-overflow-errors.patch \
+ file://0001-Remove-including-sys-sysctl.h.patch \
"
SRC_URI[md5sum] = "bfce96c42cede5243028510bcc57c1e6"
SRC_URI[sha256sum] = "e796fda27ce06377f491ad91aa286962a68c2b54076aa77a29673d53204453da"
--
2.22.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [meta-oe][PATCH 2/2] pegtl: Fix build with clang/libc++
2019-07-27 20:06 [meta-oe][PATCH 1/2] collectd: Fix build with glibc 2.30 Khem Raj
@ 2019-07-27 20:06 ` Khem Raj
2019-07-28 9:37 ` [meta-oe][PATCH 1/2] collectd: Fix build with glibc 2.30 Adrian Bunk
1 sibling, 0 replies; 5+ messages in thread
From: Khem Raj @ 2019-07-27 20:06 UTC (permalink / raw)
To: openembedded-devel
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Ayoub Zaki <ayoub.zaki@embexus.com>
---
.../0001-add-missing-virtual-dtors.patch | 72 +++++++++++++++++++
meta-oe/recipes-extended/pegtl/pegtl_2.1.4.bb | 4 +-
2 files changed, 75 insertions(+), 1 deletion(-)
create mode 100644 meta-oe/recipes-extended/pegtl/pegtl/0001-add-missing-virtual-dtors.patch
diff --git a/meta-oe/recipes-extended/pegtl/pegtl/0001-add-missing-virtual-dtors.patch b/meta-oe/recipes-extended/pegtl/pegtl/0001-add-missing-virtual-dtors.patch
new file mode 100644
index 0000000000..829c8ae5cb
--- /dev/null
+++ b/meta-oe/recipes-extended/pegtl/pegtl/0001-add-missing-virtual-dtors.patch
@@ -0,0 +1,72 @@
+From 2c7cc8c669e513154e98762d6ed7c6d1bf338505 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 27 Jul 2019 12:54:49 -0700
+Subject: [PATCH] add missing virtual dtors
+
+Fixes clang warnings
+/usr/include/c++/v1/memory:3710:5: error: destructor called on non-final 'examples::null_json' that has virtual functions but non-virtual destructor [-Werror,-Wdelete-non-abstract-non-virtual-dtor]
+__data_.second().~_Tp();
+^
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Submitted [https://github.com/taocpp/PEGTL/pull/181]
+---
+ src/example/pegtl/json_classes.hpp | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/example/pegtl/json_classes.hpp b/src/example/pegtl/json_classes.hpp
+index 7227870c..9ea66ce7 100644
+--- a/src/example/pegtl/json_classes.hpp
++++ b/src/example/pegtl/json_classes.hpp
+@@ -58,6 +58,7 @@ namespace examples
+ : json_base( json_type::ARRAY )
+ {
+ }
++ virtual ~array_json() {}
+
+ std::vector< std::shared_ptr< json_base > > data;
+
+@@ -83,6 +84,7 @@ namespace examples
+ data( in_data )
+ {
+ }
++ virtual ~boolean_json() {}
+
+ bool data;
+
+@@ -99,7 +101,7 @@ namespace examples
+ : json_base( json_type::NULL_ )
+ {
+ }
+-
++ virtual ~null_json() {}
+ virtual void stream( std::ostream& o ) const override
+ {
+ o << "null";
+@@ -114,6 +116,7 @@ namespace examples
+ data( in_data )
+ {
+ }
++ virtual ~number_json() {}
+
+ long double data;
+
+@@ -179,6 +182,7 @@ namespace examples
+ data( in_data )
+ {
+ }
++ virtual ~string_json() {}
+
+ std::string data;
+
+@@ -195,6 +199,7 @@ namespace examples
+ : json_base( json_type::OBJECT )
+ {
+ }
++ virtual ~object_json() {}
+
+ std::map< std::string, std::shared_ptr< json_base > > data;
+
+--
+2.22.0
+
diff --git a/meta-oe/recipes-extended/pegtl/pegtl_2.1.4.bb b/meta-oe/recipes-extended/pegtl/pegtl_2.1.4.bb
index f41eef2a01..5cea295c5a 100644
--- a/meta-oe/recipes-extended/pegtl/pegtl_2.1.4.bb
+++ b/meta-oe/recipes-extended/pegtl/pegtl_2.1.4.bb
@@ -4,7 +4,9 @@ LICENSE="MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=80cb066ab204c7fe022f1cfe0c2c6818"
SRCREV = "776fa4a1e8bda860008524f6dd9473967c8375b1"
-SRC_URI = "git://git@github.com/taocpp/PEGTL.git;protocol=https;branch=master"
+SRC_URI = "git://git@github.com/taocpp/PEGTL.git;protocol=https;branch=master \
+ file://0001-add-missing-virtual-dtors.patch \
+ "
inherit cmake
--
2.22.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [meta-oe][PATCH 1/2] collectd: Fix build with glibc 2.30
2019-07-27 20:06 [meta-oe][PATCH 1/2] collectd: Fix build with glibc 2.30 Khem Raj
2019-07-27 20:06 ` [meta-oe][PATCH 2/2] pegtl: Fix build with clang/libc++ Khem Raj
@ 2019-07-28 9:37 ` Adrian Bunk
2019-07-28 15:26 ` Khem Raj
1 sibling, 1 reply; 5+ messages in thread
From: Adrian Bunk @ 2019-07-28 9:37 UTC (permalink / raw)
To: Khem Raj; +Cc: openembedded-devel
On Sat, Jul 27, 2019 at 01:06:13PM -0700, Khem Raj wrote:
>...
> +Glibc 2.30 has added deprecation notice and collectd detects it as
> +warning
> +
> +Fixes
> +sys/sysctl.h:21:2: error: "The <sys/sysctl.h> header is deprecated and will be removed." [-Werror,-W#warnings]
>...
This package accumulates patches in OE that could be avoided by
configuring with --disable-werror instead.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [meta-oe][PATCH 1/2] collectd: Fix build with glibc 2.30
2019-07-28 9:37 ` [meta-oe][PATCH 1/2] collectd: Fix build with glibc 2.30 Adrian Bunk
@ 2019-07-28 15:26 ` Khem Raj
2019-07-28 16:15 ` Adrian Bunk
0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2019-07-28 15:26 UTC (permalink / raw)
To: Adrian Bunk; +Cc: openembedded-devel
On 7/28/19 2:37 AM, Adrian Bunk wrote:
> On Sat, Jul 27, 2019 at 01:06:13PM -0700, Khem Raj wrote:
>> ...
>> +Glibc 2.30 has added deprecation notice and collectd detects it as
>> +warning
>> +
>> +Fixes
>> +sys/sysctl.h:21:2: error: "The <sys/sysctl.h> header is deprecated and will be removed." [-Werror,-W#warnings]
>> ...
> This package accumulates patches in OE that could be avoided by
> configuring with --disable-werror instead.
thats true but it would mask these issues by disabling werror and we
wont be doing submissions like
https://github.com/collectd/collectd/pull/3234, I would like us to fix
things upstream instead of masking them.
>
> cu
> Adrian
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [meta-oe][PATCH 1/2] collectd: Fix build with glibc 2.30
2019-07-28 15:26 ` Khem Raj
@ 2019-07-28 16:15 ` Adrian Bunk
0 siblings, 0 replies; 5+ messages in thread
From: Adrian Bunk @ 2019-07-28 16:15 UTC (permalink / raw)
To: Khem Raj; +Cc: openembedded-devel
On Sun, Jul 28, 2019 at 08:26:18AM -0700, Khem Raj wrote:
>
> On 7/28/19 2:37 AM, Adrian Bunk wrote:
> > On Sat, Jul 27, 2019 at 01:06:13PM -0700, Khem Raj wrote:
> > > ...
> > > +Glibc 2.30 has added deprecation notice and collectd detects it as
> > > +warning
> > > +
> > > +Fixes
> > > +sys/sysctl.h:21:2: error: "The <sys/sysctl.h> header is deprecated and will be removed." [-Werror,-W#warnings]
> > > ...
> > This package accumulates patches in OE that could be avoided by
> > configuring with --disable-werror instead.
>
> thats true but it would mask these issues by disabling werror and we wont be
> doing submissions like https://github.com/collectd/collectd/pull/3234,
With what range of glibc versions has this submission been verified?
Putting !defined(__GLIBC__) into source files is usually wrong,
and in this case it is unclear what happens with ancient glibc versions.
Note that --disable-werror would do the right thing will all glibc
versions past, present and future since the file will no longer be
included without any patch needed once the header is actually gone.
> I would like us to fix things upstream instead of masking them.
Status quo is that people look at harmless issues like this one in the
tiny subset of packages where -Werror is used, but noone seems to care
about serious runtime problems like implicit function declarations in
other packages.
And looking at the huge number of questionable patches in OE I don't
agree that it would in general be a good idea to apply fixes for random
issues in OE before they have been applied upstream - there are plenty
examples in the open source world where downstreams "fixing" issues in
upstream software caused problems, including major security issues
(I remember Debian/Ubuntu releases shipping a patched openssl generating
predictable private keys due to a bogus Debian "fix" for a Valgrind warning).
Reality is often more complicated, but in general downstream
distributions should try to avoid touching the upstream code
and aim at shipping unpatched upstream sources whenever possible.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-07-28 16:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-27 20:06 [meta-oe][PATCH 1/2] collectd: Fix build with glibc 2.30 Khem Raj
2019-07-27 20:06 ` [meta-oe][PATCH 2/2] pegtl: Fix build with clang/libc++ Khem Raj
2019-07-28 9:37 ` [meta-oe][PATCH 1/2] collectd: Fix build with glibc 2.30 Adrian Bunk
2019-07-28 15:26 ` Khem Raj
2019-07-28 16:15 ` Adrian Bunk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.