Skip to contentSkip to conversation

lldpd: remove check on CXX compiler

PATCH New Damien Riegel 3 participants 5 messages Dec 18, 2017 – Dec 31, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lldpd: remove check on CXX compiler

lldpd currently depends on a C++ compiler to configure properly, but the package doesn't select that option, so builds fail if BR2_TOOLCHAIN_BUILDROOT_CXX is not selected with following errors:

checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/home/dkc/src/buildroot/build-zii/build/lldpd-0.9.4':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check

This package actually builds fine without C++, so drop this check in configure.ac. Attached patch has already been accepted upstream [1].

[1] https://github.com/vincentbernat/lldpd/pull/261

---
 ...03-configure-remove-check-on-CXX-compiler.patch | 35 ++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 package/lldpd/0003-configure-remove-check-on-CXX-compiler.patch
package/lldpd/0003-configure-remove-check-on-CXX-compiler.patch new file +35 -0
new file mode 100644
index 0000000000..880f603f71
@@ -0,0 +1,35 @@
+From d28b3bfa1b224f7770004dddf4dfaf10ad7ad6c9 Mon Sep 17 00:00:00 2001
+From: Damien Riegel <[email protected]>
+Date: Mon, 18 Dec 2017 14:37:08 -0500
+Subject: [PATCH] configure: remove check on CXX compiler
+
+lldpd fails to build if the toolchain doesn't have a C++ compiler
+because configure fails with the following error:
+
+  checking how to run the C++ preprocessor... /lib/cpp
+  configure: error: in `/home/dkc/src/buildroot/build-zii/build/lldpd-0.9.4':
+  configure: error: C++ preprocessor "/lib/cpp" fails sanity check
+
+Since "8d92800b: build: cleaner way to not alter CFLAGS/CPPFLAGS/LDFLAGS",
+it seems that the dependency on C++ is not required anymore, so there
+is no reason to keep this restriction. Dropping AC_PROG_CXX allows to
+build with a toolchain that doesn't have C++ just fine.
+---
+ configure.ac | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0edceb1..5afe8f2 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -48,7 +48,6 @@ AC_PROG_CC_C99
+ if test x"$ac_cv_prog_cc_c99" = x"no"; then
+   AC_MSG_FAILURE([*** C99 support is mandatory])
+ fi
+-AC_PROG_CXX
+ AM_PROG_CC_C_O
+ AC_PROG_LIBTOOL
+ AC_PROG_LN_S
+-- 
+2.15.1
+
Signature · 1 line
2.15.1
#1 lore raw

PATCH 1/1 lldpd: remove check on CXX compiler

Hello Damien,

2017-12-18 22:19 GMT+01:00 Damien Riegel <[email protected]>:

Quoted 8 lines

lldpd currently depends on a C++ compiler to configure properly, but the package doesn't select that option, so builds fail if BR2_TOOLCHAIN_BUILDROOT_CXX is not selected with following errors:

checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/home/dkc/src/buildroot/build-zii/build/lldpd-0.9.4':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check

Quoted 6 lines

This package actually builds fine without C++, so drop this check in configure.ac. Attached patch has already been accepted upstream [1].

[1] https://github.com/vincentbernat/lldpd/pull/261

Quoted 49 lines
---
 ...03-configure-remove-check-on-CXX-compiler.patch | 35 ++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 package/lldpd/0003-configure-remove-check-on-CXX-compiler.patch
package/lldpd/0003-configure-remove-check-on-CXX-compiler.patch new file +35 -1
new file mode 100644
index 0000000000..880f603f71
@@ -0,0 +1,35 @@
+From d28b3bfa1b224f7770004dddf4dfaf10ad7ad6c9 Mon Sep 17 00:00:00 2001
+From: Damien Riegel <[email protected]>
+Date: Mon, 18 Dec 2017 14:37:08 -0500
+Subject: [PATCH] configure: remove check on CXX compiler
+
+lldpd fails to build if the toolchain doesn't have a C++ compiler
+because configure fails with the following error:
+
+  checking how to run the C++ preprocessor... /lib/cpp
+  configure: error: in `/home/dkc/src/buildroot/build-zii/build/lldpd-0.9.4':
+  configure: error: C++ preprocessor "/lib/cpp" fails sanity check
+
+Since "8d92800b: build: cleaner way to not alter CFLAGS/CPPFLAGS/LDFLAGS",
+it seems that the dependency on C++ is not required anymore, so there
+is no reason to keep this restriction. Dropping AC_PROG_CXX allows to
+build with a toolchain that doesn't have C++ just fine.
+---
+ configure.ac | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0edceb1..5afe8f2 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -48,7 +48,6 @@ AC_PROG_CC_C99
+ if test x"$ac_cv_prog_cc_c99" = x"no"; then
+   AC_MSG_FAILURE([*** C99 support is mandatory])
+ fi
+-AC_PROG_CXX
+ AM_PROG_CC_C_O
+ AC_PROG_LIBTOOL
+ AC_PROG_LN_S
+--
+2.15.1
+
--

2.15.1

#2 lore raw

PATCH 1/1 lldpd: remove check on CXX compiler

In reply to Damien Riegel
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Damien" == Damien Riegel <[email protected]> writes:

lldpd currently depends on a C++ compiler to configure properly, but the package doesn't select that option, so builds fail if BR2_TOOLCHAIN_BUILDROOT_CXX is not selected with following errors:

checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/home/dkc/src/buildroot/build-zii/build/lldpd-0.9.4':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check

Quoted 6 lines

This package actually builds fine without C++, so drop this check in configure.ac. Attached patch has already been accepted upstream [1].

[1] https://github.com/vincentbernat/lldpd/pull/261

Committed after adjusting the comment explaining why we run autoreconf, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 1/1 lldpd: remove check on CXX compiler

In reply to Damien Riegel
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Damien" == Damien Riegel <[email protected]> writes:

lldpd currently depends on a C++ compiler to configure properly, but the package doesn't select that option, so builds fail if BR2_TOOLCHAIN_BUILDROOT_CXX is not selected with following errors:

checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/home/dkc/src/buildroot/build-zii/build/lldpd-0.9.4':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check

Quoted 6 lines

This package actually builds fine without C++, so drop this check in configure.ac. Attached patch has already been accepted upstream [1].

[1] https://github.com/vincentbernat/lldpd/pull/261

Committed to 2017.11.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#4 lore raw

PATCH 1/1 lldpd: remove check on CXX compiler

In reply to Damien Riegel
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Damien" == Damien Riegel <[email protected]> writes:

lldpd currently depends on a C++ compiler to configure properly, but the package doesn't select that option, so builds fail if BR2_TOOLCHAIN_BUILDROOT_CXX is not selected with following errors:

checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/home/dkc/src/buildroot/build-zii/build/lldpd-0.9.4':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check

Quoted 6 lines

This package actually builds fine without C++, so drop this check in configure.ac. Attached patch has already been accepted upstream [1].

[1] https://github.com/vincentbernat/lldpd/pull/261

Committed to 2017.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard