* [Buildroot] [PATCH] package/syslog-ng: fix build if net-snmp is installed on the host
@ 2020-03-16 15:01 Thomas De Schampheleire
2020-03-16 23:22 ` Chris Packham
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Thomas De Schampheleire @ 2020-03-16 15:01 UTC (permalink / raw)
To: buildroot
From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
If syslog-ng is selected in Buildroot and net-snmp is not, but net-snmp is
found on the host machine (at least its net-snmp-config script) then
compilation of syslog-ng fails with:
CC modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest-grammar.lo
CC modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest.lo
CC modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest-plugin.lo
arm-none-linux-gnueabi-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include'
make[3]: *** [Makefile:17397: modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest-grammar.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
arm-none-linux-gnueabi-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include'
make[3]: *** [Makefile:17404: modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest.lo] Error 1
arm-none-linux-gnueabi-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include'
make[3]: *** [Makefile:17411: modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest-plugin.lo] Error 1
make[2]: *** [Makefile:21428: all-recursive] Error 1
make[1]: *** [Makefile:8740: all] Error 2
make[1]: Leaving directory '.../buildroot/output/build/syslog-ng-3.25.1'
make: *** [package/pkg-generic.mk:269: .../buildroot/output/build/syslog-ng-3.25.1/.stamp_built] Error 2
The path /usr/include is obtained via /usr/bin/net-snmp-config.
The fix comprises two parts:
1. only enable net-snmp support in syslog-ng if the net-snmp package is
enabled in Buildroot
2. for the case where net-snmp is selected in Buildroot, fix the configure
script of syslog-ng to allow parsing --with-netsnmp=<path> correctly.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
---
.../0002-configure.ac-fix-with-netsnmp.patch | 41 +++++++++++++++++++
package/syslog-ng/syslog-ng.mk | 8 ++++
2 files changed, 49 insertions(+)
create mode 100644 package/syslog-ng/0002-configure.ac-fix-with-netsnmp.patch
diff --git a/package/syslog-ng/0002-configure.ac-fix-with-netsnmp.patch b/package/syslog-ng/0002-configure.ac-fix-with-netsnmp.patch
new file mode 100644
index 0000000000..f5b2a39bba
--- /dev/null
+++ b/package/syslog-ng/0002-configure.ac-fix-with-netsnmp.patch
@@ -0,0 +1,41 @@
+From 39ab118a7e79b223941b50b372c8ed51f0e21f4b Mon Sep 17 00:00:00 2001
+From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
+Date: Mon, 16 Mar 2020 15:41:03 +0100
+Subject: [PATCH] configure.ac: fix --with-netsnmp
+
+The option '--with-net-snmp' did not work, because later checks were using
+the variable '$with_netsnmp' rather than '$with_net_snmp'.
+
+There are two possible solutions:
+- make the option '--with-netsnmp'
+- change the internal variables
+
+Taking into account that latest upstream has moved away from autotools and
+towards cmake, we opt for the first option that has the least amount of
+changes.
+
+Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
+Upstream-status: not applicable (latest upstream moved to cmake)
+
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index bfc85c32d..392ab8bf3 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -148,8 +148,8 @@ AC_ARG_WITH(libnet,
+ ,
+ [with_libnet=""])
+
+-AC_ARG_WITH(net-snmp,
+- [ --with-net-snmp=path use path to net-snmp-config script],
++AC_ARG_WITH(netsnmp,
++ [ --with-netsnmp=path use path to net-snmp-config script],
+ ,
+ [with_netsnmp=""])
+
+--
+2.24.1
+
diff --git a/package/syslog-ng/syslog-ng.mk b/package/syslog-ng/syslog-ng.mk
index 9b7e9a1317..156bd95593 100644
--- a/package/syslog-ng/syslog-ng.mk
+++ b/package/syslog-ng/syslog-ng.mk
@@ -97,6 +97,14 @@ else
SYSLOG_NG_CONF_OPTS += --disable-systemd
endif
+ifeq ($(BR2_PACKAGE_NETSNMP),y)
+SYSLOG_NG_DEPENDENCIES += netsnmp
+SYSLOG_NG_CONF_OPTS += --enable-snmp-dest
+SYSLOG_NG_CONF_OPTS += --with-netsnmp="$(STAGING_DIR)/usr/bin"
+else
+SYSLOG_NG_CONF_OPTS += --disable-snmp-dest
+endif
+
define SYSLOG_NG_INSTALL_INIT_SYSV
$(INSTALL) -m 0755 -D package/syslog-ng/S01syslog-ng \
$(TARGET_DIR)/etc/init.d/S01syslog-ng
--
2.24.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] package/syslog-ng: fix build if net-snmp is installed on the host
2020-03-16 15:01 [Buildroot] [PATCH] package/syslog-ng: fix build if net-snmp is installed on the host Thomas De Schampheleire
@ 2020-03-16 23:22 ` Chris Packham
2020-03-18 19:50 ` Thomas De Schampheleire
2020-03-17 20:29 ` Yann E. MORIN
2020-03-27 7:18 ` Peter Korsgaard
2 siblings, 1 reply; 5+ messages in thread
From: Chris Packham @ 2020-03-16 23:22 UTC (permalink / raw)
To: buildroot
Hi Thomas,
On Tue, Mar 17, 2020 at 4:00 AM Thomas De Schampheleire
<patrickdepinguin@gmail.com> wrote:
>
> From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
>
> If syslog-ng is selected in Buildroot and net-snmp is not, but net-snmp is
> found on the host machine (at least its net-snmp-config script) then
> compilation of syslog-ng fails with:
>
> CC modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest-grammar.lo
> CC modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest.lo
> CC modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest-plugin.lo
> arm-none-linux-gnueabi-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include'
> make[3]: *** [Makefile:17397: modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest-grammar.lo] Error 1
> make[3]: *** Waiting for unfinished jobs....
> arm-none-linux-gnueabi-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include'
> make[3]: *** [Makefile:17404: modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest.lo] Error 1
> arm-none-linux-gnueabi-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include'
> make[3]: *** [Makefile:17411: modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest-plugin.lo] Error 1
> make[2]: *** [Makefile:21428: all-recursive] Error 1
> make[1]: *** [Makefile:8740: all] Error 2
> make[1]: Leaving directory '.../buildroot/output/build/syslog-ng-3.25.1'
> make: *** [package/pkg-generic.mk:269: .../buildroot/output/build/syslog-ng-3.25.1/.stamp_built] Error 2
>
> The path /usr/include is obtained via /usr/bin/net-snmp-config.
>
> The fix comprises two parts:
> 1. only enable net-snmp support in syslog-ng if the net-snmp package is
> enabled in Buildroot
> 2. for the case where net-snmp is selected in Buildroot, fix the configure
> script of syslog-ng to allow parsing --with-netsnmp=<path> correctly.
>
> Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
One comment below, regardless
Reviewed-by: Chris Packham <judge.packham@gmail.com>
> ---
> .../0002-configure.ac-fix-with-netsnmp.patch | 41 +++++++++++++++++++
> package/syslog-ng/syslog-ng.mk | 8 ++++
> 2 files changed, 49 insertions(+)
> create mode 100644 package/syslog-ng/0002-configure.ac-fix-with-netsnmp.patch
>
> diff --git a/package/syslog-ng/0002-configure.ac-fix-with-netsnmp.patch b/package/syslog-ng/0002-configure.ac-fix-with-netsnmp.patch
> new file mode 100644
> index 0000000000..f5b2a39bba
> --- /dev/null
> +++ b/package/syslog-ng/0002-configure.ac-fix-with-netsnmp.patch
> @@ -0,0 +1,41 @@
> +From 39ab118a7e79b223941b50b372c8ed51f0e21f4b Mon Sep 17 00:00:00 2001
> +From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
> +Date: Mon, 16 Mar 2020 15:41:03 +0100
> +Subject: [PATCH] configure.ac: fix --with-netsnmp
> +
> +The option '--with-net-snmp' did not work, because later checks were using
> +the variable '$with_netsnmp' rather than '$with_net_snmp'.
> +
> +There are two possible solutions:
> +- make the option '--with-netsnmp'
> +- change the internal variables
> +
> +Taking into account that latest upstream has moved away from autotools and
> +towards cmake, we opt for the first option that has the least amount of
> +changes.
> +
> +Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
> +Upstream-status: not applicable (latest upstream moved to cmake)
Actually upstream are supporting both cmake and autotools so it's
probably worth submitting.
> +
> +---
> + configure.ac | 4 ++--
> + 1 file changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index bfc85c32d..392ab8bf3 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -148,8 +148,8 @@ AC_ARG_WITH(libnet,
> + ,
> + [with_libnet=""])
> +
> +-AC_ARG_WITH(net-snmp,
> +- [ --with-net-snmp=path use path to net-snmp-config script],
> ++AC_ARG_WITH(netsnmp,
> ++ [ --with-netsnmp=path use path to net-snmp-config script],
> + ,
> + [with_netsnmp=""])
> +
> +--
> +2.24.1
> +
> diff --git a/package/syslog-ng/syslog-ng.mk b/package/syslog-ng/syslog-ng.mk
> index 9b7e9a1317..156bd95593 100644
> --- a/package/syslog-ng/syslog-ng.mk
> +++ b/package/syslog-ng/syslog-ng.mk
> @@ -97,6 +97,14 @@ else
> SYSLOG_NG_CONF_OPTS += --disable-systemd
> endif
>
> +ifeq ($(BR2_PACKAGE_NETSNMP),y)
> +SYSLOG_NG_DEPENDENCIES += netsnmp
> +SYSLOG_NG_CONF_OPTS += --enable-snmp-dest
> +SYSLOG_NG_CONF_OPTS += --with-netsnmp="$(STAGING_DIR)/usr/bin"
> +else
> +SYSLOG_NG_CONF_OPTS += --disable-snmp-dest
> +endif
> +
> define SYSLOG_NG_INSTALL_INIT_SYSV
> $(INSTALL) -m 0755 -D package/syslog-ng/S01syslog-ng \
> $(TARGET_DIR)/etc/init.d/S01syslog-ng
> --
> 2.24.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] package/syslog-ng: fix build if net-snmp is installed on the host
2020-03-16 15:01 [Buildroot] [PATCH] package/syslog-ng: fix build if net-snmp is installed on the host Thomas De Schampheleire
2020-03-16 23:22 ` Chris Packham
@ 2020-03-17 20:29 ` Yann E. MORIN
2020-03-27 7:18 ` Peter Korsgaard
2 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2020-03-17 20:29 UTC (permalink / raw)
To: buildroot
Thomas, All,
On 2020-03-16 16:01 +0100, Thomas De Schampheleire spake thusly:
> From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
>
> If syslog-ng is selected in Buildroot and net-snmp is not, but net-snmp is
> found on the host machine (at least its net-snmp-config script) then
> compilation of syslog-ng fails with:
>
> CC modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest-grammar.lo
> CC modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest.lo
> CC modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest-plugin.lo
> arm-none-linux-gnueabi-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include'
> make[3]: *** [Makefile:17397: modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest-grammar.lo] Error 1
> make[3]: *** Waiting for unfinished jobs....
> arm-none-linux-gnueabi-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include'
> make[3]: *** [Makefile:17404: modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest.lo] Error 1
> arm-none-linux-gnueabi-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include'
> make[3]: *** [Makefile:17411: modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest-plugin.lo] Error 1
> make[2]: *** [Makefile:21428: all-recursive] Error 1
> make[1]: *** [Makefile:8740: all] Error 2
> make[1]: Leaving directory '.../buildroot/output/build/syslog-ng-3.25.1'
> make: *** [package/pkg-generic.mk:269: .../buildroot/output/build/syslog-ng-3.25.1/.stamp_built] Error 2
>
> The path /usr/include is obtained via /usr/bin/net-snmp-config.
>
> The fix comprises two parts:
> 1. only enable net-snmp support in syslog-ng if the net-snmp package is
> enabled in Buildroot
> 2. for the case where net-snmp is selected in Buildroot, fix the configure
> script of syslog-ng to allow parsing --with-netsnmp=<path> correctly.
>
> Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> .../0002-configure.ac-fix-with-netsnmp.patch | 41 +++++++++++++++++++
> package/syslog-ng/syslog-ng.mk | 8 ++++
> 2 files changed, 49 insertions(+)
> create mode 100644 package/syslog-ng/0002-configure.ac-fix-with-netsnmp.patch
>
> diff --git a/package/syslog-ng/0002-configure.ac-fix-with-netsnmp.patch b/package/syslog-ng/0002-configure.ac-fix-with-netsnmp.patch
> new file mode 100644
> index 0000000000..f5b2a39bba
> --- /dev/null
> +++ b/package/syslog-ng/0002-configure.ac-fix-with-netsnmp.patch
> @@ -0,0 +1,41 @@
> +From 39ab118a7e79b223941b50b372c8ed51f0e21f4b Mon Sep 17 00:00:00 2001
> +From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
> +Date: Mon, 16 Mar 2020 15:41:03 +0100
> +Subject: [PATCH] configure.ac: fix --with-netsnmp
> +
> +The option '--with-net-snmp' did not work, because later checks were using
> +the variable '$with_netsnmp' rather than '$with_net_snmp'.
> +
> +There are two possible solutions:
> +- make the option '--with-netsnmp'
> +- change the internal variables
> +
> +Taking into account that latest upstream has moved away from autotools and
> +towards cmake, we opt for the first option that has the least amount of
> +changes.
> +
> +Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
> +Upstream-status: not applicable (latest upstream moved to cmake)
> +
> +---
> + configure.ac | 4 ++--
> + 1 file changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index bfc85c32d..392ab8bf3 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -148,8 +148,8 @@ AC_ARG_WITH(libnet,
> + ,
> + [with_libnet=""])
> +
> +-AC_ARG_WITH(net-snmp,
> +- [ --with-net-snmp=path use path to net-snmp-config script],
> ++AC_ARG_WITH(netsnmp,
> ++ [ --with-netsnmp=path use path to net-snmp-config script],
> + ,
> + [with_netsnmp=""])
> +
> +--
> +2.24.1
> +
> diff --git a/package/syslog-ng/syslog-ng.mk b/package/syslog-ng/syslog-ng.mk
> index 9b7e9a1317..156bd95593 100644
> --- a/package/syslog-ng/syslog-ng.mk
> +++ b/package/syslog-ng/syslog-ng.mk
> @@ -97,6 +97,14 @@ else
> SYSLOG_NG_CONF_OPTS += --disable-systemd
> endif
>
> +ifeq ($(BR2_PACKAGE_NETSNMP),y)
> +SYSLOG_NG_DEPENDENCIES += netsnmp
> +SYSLOG_NG_CONF_OPTS += --enable-snmp-dest
> +SYSLOG_NG_CONF_OPTS += --with-netsnmp="$(STAGING_DIR)/usr/bin"
> +else
> +SYSLOG_NG_CONF_OPTS += --disable-snmp-dest
> +endif
> +
> define SYSLOG_NG_INSTALL_INIT_SYSV
> $(INSTALL) -m 0755 -D package/syslog-ng/S01syslog-ng \
> $(TARGET_DIR)/etc/init.d/S01syslog-ng
> --
> 2.24.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] package/syslog-ng: fix build if net-snmp is installed on the host
2020-03-16 23:22 ` Chris Packham
@ 2020-03-18 19:50 ` Thomas De Schampheleire
0 siblings, 0 replies; 5+ messages in thread
From: Thomas De Schampheleire @ 2020-03-18 19:50 UTC (permalink / raw)
To: buildroot
El mar., 17 mar. 2020 a las 0:23, Chris Packham
(<judge.packham@gmail.com>) escribi?:
>
> Hi Thomas,
>
> On Tue, Mar 17, 2020 at 4:00 AM Thomas De Schampheleire
> <patrickdepinguin@gmail.com> wrote:
> >
> > From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
> >
> > If syslog-ng is selected in Buildroot and net-snmp is not, but net-snmp is
> > found on the host machine (at least its net-snmp-config script) then
> > compilation of syslog-ng fails with:
> >
> > CC modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest-grammar.lo
> > CC modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest.lo
> > CC modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest-plugin.lo
> > arm-none-linux-gnueabi-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include'
> > make[3]: *** [Makefile:17397: modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest-grammar.lo] Error 1
> > make[3]: *** Waiting for unfinished jobs....
> > arm-none-linux-gnueabi-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include'
> > make[3]: *** [Makefile:17404: modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest.lo] Error 1
> > arm-none-linux-gnueabi-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include'
> > make[3]: *** [Makefile:17411: modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest-plugin.lo] Error 1
> > make[2]: *** [Makefile:21428: all-recursive] Error 1
> > make[1]: *** [Makefile:8740: all] Error 2
> > make[1]: Leaving directory '.../buildroot/output/build/syslog-ng-3.25.1'
> > make: *** [package/pkg-generic.mk:269: .../buildroot/output/build/syslog-ng-3.25.1/.stamp_built] Error 2
> >
> > The path /usr/include is obtained via /usr/bin/net-snmp-config.
> >
> > The fix comprises two parts:
> > 1. only enable net-snmp support in syslog-ng if the net-snmp package is
> > enabled in Buildroot
> > 2. for the case where net-snmp is selected in Buildroot, fix the configure
> > script of syslog-ng to allow parsing --with-netsnmp=<path> correctly.
> >
> > Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
>
> One comment below, regardless
>
> Reviewed-by: Chris Packham <judge.packham@gmail.com>
>
> > ---
> > .../0002-configure.ac-fix-with-netsnmp.patch | 41 +++++++++++++++++++
> > package/syslog-ng/syslog-ng.mk | 8 ++++
> > 2 files changed, 49 insertions(+)
> > create mode 100644 package/syslog-ng/0002-configure.ac-fix-with-netsnmp.patch
> >
> > diff --git a/package/syslog-ng/0002-configure.ac-fix-with-netsnmp.patch b/package/syslog-ng/0002-configure.ac-fix-with-netsnmp.patch
> > new file mode 100644
> > index 0000000000..f5b2a39bba
> > --- /dev/null
> > +++ b/package/syslog-ng/0002-configure.ac-fix-with-netsnmp.patch
> > @@ -0,0 +1,41 @@
> > +From 39ab118a7e79b223941b50b372c8ed51f0e21f4b Mon Sep 17 00:00:00 2001
> > +From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
> > +Date: Mon, 16 Mar 2020 15:41:03 +0100
> > +Subject: [PATCH] configure.ac: fix --with-netsnmp
> > +
> > +The option '--with-net-snmp' did not work, because later checks were using
> > +the variable '$with_netsnmp' rather than '$with_net_snmp'.
> > +
> > +There are two possible solutions:
> > +- make the option '--with-netsnmp'
> > +- change the internal variables
> > +
> > +Taking into account that latest upstream has moved away from autotools and
> > +towards cmake, we opt for the first option that has the least amount of
> > +changes.
> > +
> > +Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
> > +Upstream-status: not applicable (latest upstream moved to cmake)
>
> Actually upstream are supporting both cmake and autotools so it's
> probably worth submitting.
>
Thanks, I had misunderstood it.
I now sent a patch upstream, although in light of this
misunderstanding I opted to fix the --with-net-snmp option instead of
renaming it to --with-netsnmp. As a result, if the patch is accepted
upstream, we'll have to update Buildroot accordingly too.
https://github.com/syslog-ng/syslog-ng/pull/3180
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] package/syslog-ng: fix build if net-snmp is installed on the host
2020-03-16 15:01 [Buildroot] [PATCH] package/syslog-ng: fix build if net-snmp is installed on the host Thomas De Schampheleire
2020-03-16 23:22 ` Chris Packham
2020-03-17 20:29 ` Yann E. MORIN
@ 2020-03-27 7:18 ` Peter Korsgaard
2 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2020-03-27 7:18 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin@gmail.com> writes:
> From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
> If syslog-ng is selected in Buildroot and net-snmp is not, but net-snmp is
> found on the host machine (at least its net-snmp-config script) then
> compilation of syslog-ng fails with:
> CC modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest-grammar.lo
> CC modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest.lo
> CC modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest-plugin.lo
> arm-none-linux-gnueabi-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include'
> make[3]: *** [Makefile:17397: modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest-grammar.lo] Error 1
> make[3]: *** Waiting for unfinished jobs....
> arm-none-linux-gnueabi-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include'
> make[3]: *** [Makefile:17404: modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest.lo] Error 1
> arm-none-linux-gnueabi-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include'
> make[3]: *** [Makefile:17411: modules/snmp-dest/modules_snmp_dest_libsnmpdest_la-snmpdest-plugin.lo] Error 1
> make[2]: *** [Makefile:21428: all-recursive] Error 1
> make[1]: *** [Makefile:8740: all] Error 2
> make[1]: Leaving directory '.../buildroot/output/build/syslog-ng-3.25.1'
> make: *** [package/pkg-generic.mk:269: .../buildroot/output/build/syslog-ng-3.25.1/.stamp_built] Error 2
> The path /usr/include is obtained via /usr/bin/net-snmp-config.
> The fix comprises two parts:
> 1. only enable net-snmp support in syslog-ng if the net-snmp package is
> enabled in Buildroot
> 2. for the case where net-snmp is selected in Buildroot, fix the configure
> script of syslog-ng to allow parsing --with-netsnmp=<path> correctly.
> Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Committed to 2019.11.x and 2020.02.x, thanks. 2019.02.x uses an older
syslog-ng version and the patch does not apply as is.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-03-27 7:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-16 15:01 [Buildroot] [PATCH] package/syslog-ng: fix build if net-snmp is installed on the host Thomas De Schampheleire
2020-03-16 23:22 ` Chris Packham
2020-03-18 19:50 ` Thomas De Schampheleire
2020-03-17 20:29 ` Yann E. MORIN
2020-03-27 7:18 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox