Skip to contentSkip to conversation

gnutls: needs C++ support

PATCH New Peter Seiderer 6 participants 13 messages Mar 21, 2018 – Mar 27, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 gnutls: needs C++ support

Fixes Bug 10846 ([1]):

checking how to run the C++ preprocessor... cpp
configure: error: in `.../build/gnutls-3.5.17':
configure: error: C++ preprocessor "cpp" fails sanity check See `config.log' for more details

[1] https://bugs.busybox.net/show_bug.cgi?id=10846

---
 package/connman/Config.in         | 5 +++--
 package/gnutls/Config.in          | 6 ++++--
 package/libmicrohttpd/Config.in   | 6 ++++--
 package/libsoup/Config.in         | 5 +++--
 package/network-manager/Config.in | 6 ++++--
 package/samba4/Config.in          | 4 ++++
 package/taskd/Config.in           | 2 +-
 package/vpnc/Config.in            | 6 ++++--
 package/webkitgtk/Config.in       | 5 +++--
 9 files changed, 30 insertions(+), 15 deletions(-)
package/connman/Config.in +3 -2
index 253c604e88..309a49829a 100644
@@ -34,14 +34,15 @@ config BR2_PACKAGE_CONNMAN_WIFI
 config BR2_PACKAGE_CONNMAN_WISPR
 	bool "enable WISPr support"
 	depends on !BR2_STATIC_LIBS # gnutls
+	depends on BR2_INSTALL_LIBSTDCPP # gnutls
 	select BR2_PACKAGE_GNUTLS
 	help
 	  Enable support for Wireless Internet Service Provider
 	  roaming (WISPr). A RADIUS server is used to authenticate the
 	  subscriber's credentials.
 
-comment "connman WISPr needs a toolchain w/ dynamic library"
-	depends on BR2_STATIC_LIBS
+comment "connman WISPr needs a toolchain w/ C++, dynamic library"
+	depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP
 
 config BR2_PACKAGE_CONNMAN_BLUETOOTH
 	bool "enable Bluetooth support"
package/gnutls/Config.in +4 -2
index 176951a385..8663788e94 100644
@@ -3,6 +3,7 @@ config BR2_PACKAGE_GNUTLS
 	# https://gitlab.com/gnutls/gnutls/issues/203
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_USE_WCHAR
+	depends on BR2_INSTALL_LIBSTDCPP
 	select BR2_PACKAGE_LIBTASN1
 	select BR2_PACKAGE_LIBUNISTRING
 	select BR2_PACKAGE_NETTLE
@@ -25,5 +26,6 @@ config BR2_PACKAGE_GNUTLS_TOOLS
 
 endif
 
-comment "gnutls needs a toolchain w/ wchar, dynamic library"
-	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS
+comment "gnutls needs a toolchain w/ wchar, C++, dynamic library"
+	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS  || \
+		!BR2_INSTALL_LIBSTDCPP
package/libmicrohttpd/Config.in +4 -2
index 7f3c9bb8fd..9f074fb567 100644
@@ -13,12 +13,14 @@ config BR2_PACKAGE_LIBMICROHTTPD_SSL
 	bool "https support"
 	depends on !BR2_STATIC_LIBS # gnutls
 	depends on BR2_USE_WCHAR
+	depends on BR2_INSTALL_LIBSTDCPP # gnutls
 	select BR2_PACKAGE_GNUTLS
 	help
 	  Enable HTTPS (SSL) support.
 
-comment "libmicrohttpd https support needs a toolchain w/ wchar, dynamic library"
-	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS
+comment "libmicrohttpd https support needs a toolchain w/ wchar, C++, dynamic library"
+	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS  || \
+		!BR2_INSTALL_LIBSTDCPP
 
 endif
 
package/libsoup/Config.in +3 -2
index 236d3c428a..70f7d28b6d 100644
@@ -23,13 +23,14 @@ config BR2_PACKAGE_LIBSOUP_GNOME
 config BR2_PACKAGE_LIBSOUP_SSL
 	bool "https support"
 	depends on !BR2_STATIC_LIBS # gnutls
+	depends on BR2_INSTALL_LIBSTDCPP # gnutls
 	select BR2_PACKAGE_GLIB_NETWORKING
 	select BR2_PACKAGE_GNUTLS
 	help
 	  Enable HTTPS (SSL) support.
 
-comment "libsoup https support needs a toolchain w/ dynamic library"
-	depends on BR2_STATIC_LIBS
+comment "libsoup https support needs a toolchain w/ C++, dynamic library"
+	depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP
 
 endif
 
package/network-manager/Config.in +4 -2
index 72658c1278..f480ca2d40 100644
@@ -2,6 +2,7 @@ config BR2_PACKAGE_NETWORK_MANAGER
 	bool "networkmanager"
 	depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS # libgcrypt
 	depends on !BR2_STATIC_LIBS # gnutls
+	depends on BR2_INSTALL_LIBSTDCPP # gnutls
 	depends on BR2_USE_MMU # dbus
 	depends on BR2_PACKAGE_HAS_UDEV
 	# Tested with 3.2, but may even work with earlier versions
@@ -64,8 +65,9 @@ config BR2_PACKAGE_NETWORK_MANAGER_OVS
 
 endif
 
-comment "NetworkManager needs udev /dev management and a glibc toolchain w/ headers >= 3.7, dynamic library"
+comment "NetworkManager needs udev /dev management and a glibc toolchain w/ headers >= 3.7, C++, dynamic library"
 	depends on BR2_USE_MMU
 	depends on !BR2_PACKAGE_HAS_UDEV || \
 		!BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 || \
-		!BR2_TOOLCHAIN_USES_GLIBC || BR2_STATIC_LIBS
+		!BR2_TOOLCHAIN_USES_GLIBC || BR2_STATIC_LIBS  || \
+		!BR2_INSTALL_LIBSTDCPP
package/samba4/Config.in +4 -0
index 298fdc6608..b2d4379c0d 100644
@@ -29,10 +29,14 @@ if BR2_PACKAGE_SAMBA4
 
 config BR2_PACKAGE_SAMBA4_AD_DC
 	bool "AD DC"
+	depends on BR2_INSTALL_LIBSTDCPP
 	select BR2_PACKAGE_GNUTLS
 	help
 	  Enable Active Directory Domain Controller functionality.
 
+comment "samba4 AD DC support needs a toolchain w/ C++"
+	depends on !BR2_INSTALL_LIBSTDCPP
+
 config BR2_PACKAGE_SAMBA4_ADS
 	bool "ADS"
 	select BR2_PACKAGE_OPENLDAP
package/taskd/Config.in +1 -1
index 19d123fb59..e4a1dfab4f 100644
@@ -3,7 +3,7 @@ config BR2_PACKAGE_TASKD
 	depends on !BR2_STATIC_LIBS # gnutls
 	depends on BR2_USE_WCHAR # gnutls
 	depends on BR2_USE_MMU # fork()
-	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_INSTALL_LIBSTDCPP # gnutls
 	select BR2_PACKAGE_GNUTLS
 	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
package/vpnc/Config.in +4 -2
index 6455b0d87a..738413961c 100644
@@ -4,6 +4,7 @@ config BR2_PACKAGE_VPNC
 	depends on !BR2_STATIC_LIBS # gnutls
 	depends on BR2_USE_MMU # fork()
 	depends on BR2_USE_WCHAR # gnutls
+	depends on BR2_INSTALL_LIBSTDCPP # gnutls
 	select BR2_PACKAGE_LIBGCRYPT
 	select BR2_PACKAGE_LIBGPG_ERROR
 	select BR2_PACKAGE_GNUTLS
@@ -16,6 +17,7 @@ config BR2_PACKAGE_VPNC
 
 	  http://www.unix-ag.uni-kl.de/~massar/vpnc
 
-comment "vpnc needs a toolchain w/ wchar, dynamic library"
+comment "vpnc needs a toolchain w/ wchar, C++, dynamic library"
 	depends on BR2_USE_MMU
-	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS
+	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS || \
+		!BR2_INSTALL_LIBSTDCPP
package/webkitgtk/Config.in +3 -2
index 31794ed2a4..10bd55ebb9 100644
@@ -56,13 +56,14 @@ if BR2_PACKAGE_WEBKITGTK
 config BR2_PACKAGE_WEBKITGTK_HTTPS
 	bool "HTTPS support"
 	depends on !BR2_STATIC_LIBS # gnutls -> libsoup
+	depends on BR2_INSTALL_LIBSTDCPP # gnutls -> libsoup
 	select BR2_PACKAGE_CA_CERTIFICATES # runtime
 	select BR2_PACKAGE_LIBSOUP_SSL
 	help
 	  Enable HTTPS protocol support.
 
-comment "webkitgtk https support needs a toolchain w/ dynamic library"
-	depends on BR2_STATIC_LIBS
+comment "webkitgtk https support needs a toolchain w/ C++, dynamic library"
+	depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP
 
 config BR2_PACKAGE_WEBKITGTK_MULTIMEDIA
 	bool "multimedia support"
Signature · 1 line
2.16.2
#1 lore raw

PATCH 2/2 modem-manager: remove wrong gnutls dependency comment

---
 package/modem-manager/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/modem-manager/Config.in +1 -1
index 8e995b4175..215449a50e 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_MODEM_MANAGER
 	bool "modemmanager"
 	depends on BR2_PACKAGE_HAS_UDEV
-	depends on BR2_USE_WCHAR # libglib2 and gnutls
+	depends on BR2_USE_WCHAR # libglib2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, libglib2
 	depends on BR2_USE_MMU # dbus
 	select BR2_PACKAGE_DBUS # runtime dependency
Signature · 1 line
2.16.2
#2 lore raw

PATCH 2/2 modem-manager: remove wrong gnutls dependency comment

Hi Peter,

Quoted 10 lines
---
 package/modem-manager/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/modem-manager/Config.in +0 -0
index 8e995b4175..215449a50e 100644

package/modem-manager/Config.in line 7

Quoted 8 lines
package/modem-manager/Config.in +1 -1
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_MODEM_MANAGER
 	bool "modemmanager"
 	depends on BR2_PACKAGE_HAS_UDEV
-	depends on BR2_USE_WCHAR # libglib2 and gnutls
+	depends on BR2_USE_WCHAR # libglib2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, libglib2
 	depends on BR2_USE_MMU # dbus
 	select BR2_PACKAGE_DBUS # runtime dependency

Thanks for fixing it, ModemManager indeed does not depend on gnutls.

Kind regards,
Petr

#4 lore raw

PATCH 1/2 gnutls: needs C++ support

In reply to Peter Seiderer

Hi Peter,

Quoted 10 lines · Peter Seiderer

Fixes Bug 10846 ([1]):

checking how to run the C++ preprocessor... cpp
configure: error: in `.../build/gnutls-3.5.17':
configure: error: C++ preprocessor "cpp" fails sanity check See `config.log' for more details

[1] https://bugs.busybox.net/show_bug.cgi?id=10846

This is strange. Do you have idea why the autobuilders didn't catch that?

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#5 lore raw

PATCH 1/2 gnutls: needs C++ support

Hello Baruch,

Quoted 10 lines · Baruch Siach

Hi Peter,

Quoted 7 lines · Peter Seiderer

Fixes Bug 10846 ([1]):

checking how to run the C++ preprocessor... cpp
configure: error: in `.../build/gnutls-3.5.17':
configure: error: C++ preprocessor "cpp" fails sanity check See `config.log' for more details

Quoted 5 lines
Quoted 3 lines

[1] https://bugs.busybox.net/show_bug.cgi?id=10846

This is strange. Do you have idea why the autobuilders didn't catch that?

No clue...., maybe the missing combination of hard float and no C++?

Maybe worth an test-pkg run?

Regards,
Peter

Quoted 3 lines

baruch

#6 lore raw

PATCH 1/2 gnutls: needs C++ support

In reply to Baruch Siach

Hello,

Quoted 8 lines · Baruch Siach
Quoted 7 lines · Peter Seiderer

Fixes Bug 10846 ([1]):

checking how to run the C++ preprocessor... cpp
configure: error: in `.../build/gnutls-3.5.17':
configure: error: C++ preprocessor "cpp" fails sanity check See `config.log' for more details

Quoted 5 lines
Quoted 3 lines

[1] https://bugs.busybox.net/show_bug.cgi?id=10846

This is strange. Do you have idea why the autobuilders didn't catch that?

We don't have any toolchain configuration in the autobuilders that has wchar support enabled, but C++ support disabled.

We do have a configuration that is basic (no wchar, no C++), but since gnutls already depends on wchar, it was never tested with this toolchain.

Hence, this doesn't pop-up in the autobuilders.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#7 lore raw

PATCH 1/2 gnutls: needs C++ support

In reply to Peter Seiderer
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Seiderer <[email protected]> writes:

Fixes Bug 10846 ([1]):
checking how to run the C++ preprocessor... cpp
configure: error: in `.../build/gnutls-3.5.17':
configure: error: C++ preprocessor "cpp" fails sanity check See `config.log' for more details

[1] https://bugs.busybox.net/show_bug.cgi?id=10846

Quoted 11 lines
---
 package/connman/Config.in         | 5 +++--
 package/gnutls/Config.in          | 6 ++++--
 package/libmicrohttpd/Config.in   | 6 ++++--
 package/libsoup/Config.in         | 5 +++--
 package/network-manager/Config.in | 6 ++++--
 package/samba4/Config.in          | 4 ++++
 package/taskd/Config.in           | 2 +-
 package/vpnc/Config.in            | 6 ++++--
 package/webkitgtk/Config.in       | 5 +++--
 9 files changed, 30 insertions(+), 15 deletions(-)

It is a bit stupid that we have pull in C++ support here and in all the reverse dependencies just because of a stupid configure check, but I guess it is the simplest/best solution.

Should we then also revert bd39d11d2eaa679f (core/infra: fix build on toolchain without C++)?

Yann, Thomas, Arnout - What do you say?

Quoted 191 lines
package/connman/Config.in +3 -2
index 253c604e88..309a49829a 100644
@@ -34,14 +34,15 @@ config BR2_PACKAGE_CONNMAN_WIFI
 config BR2_PACKAGE_CONNMAN_WISPR
 	bool "enable WISPr support"
 	depends on !BR2_STATIC_LIBS # gnutls
+	depends on BR2_INSTALL_LIBSTDCPP # gnutls
 	select BR2_PACKAGE_GNUTLS
 	help
 	  Enable support for Wireless Internet Service Provider
 	  roaming (WISPr). A RADIUS server is used to authenticate the
 	  subscriber's credentials.
 
-comment "connman WISPr needs a toolchain w/ dynamic library"
-	depends on BR2_STATIC_LIBS
+comment "connman WISPr needs a toolchain w/ C++, dynamic library"
+	depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP
 
 config BR2_PACKAGE_CONNMAN_BLUETOOTH
 	bool "enable Bluetooth support"
package/gnutls/Config.in +4 -2
index 176951a385..8663788e94 100644
@@ -3,6 +3,7 @@ config BR2_PACKAGE_GNUTLS
 	# https://gitlab.com/gnutls/gnutls/issues/203
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_USE_WCHAR
+	depends on BR2_INSTALL_LIBSTDCPP
 	select BR2_PACKAGE_LIBTASN1
 	select BR2_PACKAGE_LIBUNISTRING
 	select BR2_PACKAGE_NETTLE
@@ -25,5 +26,6 @@ config BR2_PACKAGE_GNUTLS_TOOLS
 
 endif
 
-comment "gnutls needs a toolchain w/ wchar, dynamic library"
-	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS
+comment "gnutls needs a toolchain w/ wchar, C++, dynamic library"
+	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS  || \
+		!BR2_INSTALL_LIBSTDCPP
package/libmicrohttpd/Config.in +4 -2
index 7f3c9bb8fd..9f074fb567 100644
@@ -13,12 +13,14 @@ config BR2_PACKAGE_LIBMICROHTTPD_SSL
 	bool "https support"
 	depends on !BR2_STATIC_LIBS # gnutls
 	depends on BR2_USE_WCHAR
+	depends on BR2_INSTALL_LIBSTDCPP # gnutls
 	select BR2_PACKAGE_GNUTLS
 	help
 	  Enable HTTPS (SSL) support.
 
-comment "libmicrohttpd https support needs a toolchain w/ wchar, dynamic library"
-	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS
+comment "libmicrohttpd https support needs a toolchain w/ wchar, C++, dynamic library"
+	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS  || \
+		!BR2_INSTALL_LIBSTDCPP
 
 endif
 
package/libsoup/Config.in +3 -2
index 236d3c428a..70f7d28b6d 100644
@@ -23,13 +23,14 @@ config BR2_PACKAGE_LIBSOUP_GNOME
 config BR2_PACKAGE_LIBSOUP_SSL
 	bool "https support"
 	depends on !BR2_STATIC_LIBS # gnutls
+	depends on BR2_INSTALL_LIBSTDCPP # gnutls
 	select BR2_PACKAGE_GLIB_NETWORKING
 	select BR2_PACKAGE_GNUTLS
 	help
 	  Enable HTTPS (SSL) support.
 
-comment "libsoup https support needs a toolchain w/ dynamic library"
-	depends on BR2_STATIC_LIBS
+comment "libsoup https support needs a toolchain w/ C++, dynamic library"
+	depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP
 
 endif
 
package/network-manager/Config.in +4 -2
index 72658c1278..f480ca2d40 100644
@@ -2,6 +2,7 @@ config BR2_PACKAGE_NETWORK_MANAGER
 	bool "networkmanager"
 	depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS # libgcrypt
 	depends on !BR2_STATIC_LIBS # gnutls
+	depends on BR2_INSTALL_LIBSTDCPP # gnutls
 	depends on BR2_USE_MMU # dbus
 	depends on BR2_PACKAGE_HAS_UDEV
 	# Tested with 3.2, but may even work with earlier versions
@@ -64,8 +65,9 @@ config BR2_PACKAGE_NETWORK_MANAGER_OVS
 
 endif
 
-comment "NetworkManager needs udev /dev management and a glibc toolchain w/ headers >= 3.7, dynamic library"
+comment "NetworkManager needs udev /dev management and a glibc toolchain w/ headers >= 3.7, C++, dynamic library"
 	depends on BR2_USE_MMU
 	depends on !BR2_PACKAGE_HAS_UDEV || \
 		!BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 || \
-		!BR2_TOOLCHAIN_USES_GLIBC || BR2_STATIC_LIBS
+		!BR2_TOOLCHAIN_USES_GLIBC || BR2_STATIC_LIBS  || \
+		!BR2_INSTALL_LIBSTDCPP
package/samba4/Config.in +4 -0
index 298fdc6608..b2d4379c0d 100644
@@ -29,10 +29,14 @@ if BR2_PACKAGE_SAMBA4
 
 config BR2_PACKAGE_SAMBA4_AD_DC
 	bool "AD DC"
+	depends on BR2_INSTALL_LIBSTDCPP
 	select BR2_PACKAGE_GNUTLS
 	help
 	  Enable Active Directory Domain Controller functionality.
 
+comment "samba4 AD DC support needs a toolchain w/ C++"
+	depends on !BR2_INSTALL_LIBSTDCPP
+
 config BR2_PACKAGE_SAMBA4_ADS
 	bool "ADS"
 	select BR2_PACKAGE_OPENLDAP
package/taskd/Config.in +1 -1
index 19d123fb59..e4a1dfab4f 100644
@@ -3,7 +3,7 @@ config BR2_PACKAGE_TASKD
 	depends on !BR2_STATIC_LIBS # gnutls
 	depends on BR2_USE_WCHAR # gnutls
 	depends on BR2_USE_MMU # fork()
-	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_INSTALL_LIBSTDCPP # gnutls
 	select BR2_PACKAGE_GNUTLS
 	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
package/vpnc/Config.in +4 -2
index 6455b0d87a..738413961c 100644
@@ -4,6 +4,7 @@ config BR2_PACKAGE_VPNC
 	depends on !BR2_STATIC_LIBS # gnutls
 	depends on BR2_USE_MMU # fork()
 	depends on BR2_USE_WCHAR # gnutls
+	depends on BR2_INSTALL_LIBSTDCPP # gnutls
 	select BR2_PACKAGE_LIBGCRYPT
 	select BR2_PACKAGE_LIBGPG_ERROR
 	select BR2_PACKAGE_GNUTLS
@@ -16,6 +17,7 @@ config BR2_PACKAGE_VPNC
 
 	  http://www.unix-ag.uni-kl.de/~massar/vpnc
 
-comment "vpnc needs a toolchain w/ wchar, dynamic library"
+comment "vpnc needs a toolchain w/ wchar, C++, dynamic library"
 	depends on BR2_USE_MMU
-	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS
+	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS || \
+		!BR2_INSTALL_LIBSTDCPP
package/webkitgtk/Config.in +3 -2
index 31794ed2a4..10bd55ebb9 100644
@@ -56,13 +56,14 @@ if BR2_PACKAGE_WEBKITGTK
 config BR2_PACKAGE_WEBKITGTK_HTTPS
 	bool "HTTPS support"
 	depends on !BR2_STATIC_LIBS # gnutls -> libsoup
+	depends on BR2_INSTALL_LIBSTDCPP # gnutls -> libsoup
 	select BR2_PACKAGE_CA_CERTIFICATES # runtime
 	select BR2_PACKAGE_LIBSOUP_SSL
 	help
 	  Enable HTTPS protocol support.
 
-comment "webkitgtk https support needs a toolchain w/ dynamic library"
-	depends on BR2_STATIC_LIBS
+comment "webkitgtk https support needs a toolchain w/ C++, dynamic library"
+	depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP
 
 config BR2_PACKAGE_WEBKITGTK_MULTIMEDIA
 	bool "multimedia support"
Signature · 6 lines
2.16.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 1 line
Bye, Peter Korsgaard
#8 lore raw

PATCH 1/2 gnutls: needs C++ support

Hello,

Quoted 8 lines · Peter Korsgaard

It is a bit stupid that we have pull in C++ support here and in all the reverse dependencies just because of a stupid configure check, but I guess it is the simplest/best solution.

Should we then also revert bd39d11d2eaa679f (core/infra: fix build on toolchain without C++)?

Yann, Thomas, Arnout - What do you say?

I just fired up a build to reproduce the issue and have a look. But from what I remember last time I had a look, it was just some completely brain-damaged autoconf sorcery, and there wasn't really any hope of fixing it.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#9 lore raw

PATCH 1/2 gnutls: needs C++ support

All,

On 2018-03-27 10:08 +0200, Thomas Petazzoni spake thusly:

Quoted 8 lines · Peter Korsgaard
Quoted 7 lines

It is a bit stupid that we have pull in C++ support here and in all the reverse dependencies just because of a stupid configure check, but I guess it is the simplest/best solution.

Should we then also revert bd39d11d2eaa679f (core/infra: fix build on toolchain without C++)?

Quoted 6 lines
Quoted 1 line

Yann, Thomas, Arnout - What do you say?

I just fired up a build to reproduce the issue and have a look. But from what I remember last time I had a look, it was just some completely brain-damaged autoconf sorcery, and there wasn't really any hope of fixing it.

Yeah, this is a libtool issue... libtool will call to AC_PROG_CXXCPP as soon as CXX is set and is not 'no':

    https://git.savannah.gnu.org/cgit/libtool.git/tree/m4/libtool.m4#n6305

Currently, we're passing CXX=false when C++ is not enabled. Maybe we whould pass 'no' instead? Lemme run a test...

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#10 lore raw

PATCH 1/2 gnutls: needs C++ support

In reply to Peter Seiderer

Hi Peter,

Quoted 196 lines

Fixes Bug 10846 ([1]):

checking how to run the C++ preprocessor... cpp
configure: error: in `.../build/gnutls-3.5.17':
configure: error: C++ preprocessor "cpp" fails sanity check See `config.log' for more details

[1] https://bugs.busybox.net/show_bug.cgi?id=10846

---
 package/connman/Config.in         | 5 +++--
 package/gnutls/Config.in          | 6 ++++--
 package/libmicrohttpd/Config.in   | 6 ++++--
 package/libsoup/Config.in         | 5 +++--
 package/network-manager/Config.in | 6 ++++--
 package/samba4/Config.in          | 4 ++++
 package/taskd/Config.in           | 2 +-
 package/vpnc/Config.in            | 6 ++++--
 package/webkitgtk/Config.in       | 5 +++--
 9 files changed, 30 insertions(+), 15 deletions(-)
package/connman/Config.in +3 -2
index 253c604e88..309a49829a 100644
@@ -34,14 +34,15 @@ config BR2_PACKAGE_CONNMAN_WIFI
 config BR2_PACKAGE_CONNMAN_WISPR
 	bool "enable WISPr support"
 	depends on !BR2_STATIC_LIBS # gnutls
+	depends on BR2_INSTALL_LIBSTDCPP # gnutls
 	select BR2_PACKAGE_GNUTLS
 	help
 	  Enable support for Wireless Internet Service Provider
 	  roaming (WISPr). A RADIUS server is used to authenticate the
 	  subscriber's credentials.
 
-comment "connman WISPr needs a toolchain w/ dynamic library"
-	depends on BR2_STATIC_LIBS
+comment "connman WISPr needs a toolchain w/ C++, dynamic library"
+	depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP
 
 config BR2_PACKAGE_CONNMAN_BLUETOOTH
 	bool "enable Bluetooth support"
package/gnutls/Config.in +4 -2
index 176951a385..8663788e94 100644
@@ -3,6 +3,7 @@ config BR2_PACKAGE_GNUTLS
 	# https://gitlab.com/gnutls/gnutls/issues/203
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_USE_WCHAR
+	depends on BR2_INSTALL_LIBSTDCPP
 	select BR2_PACKAGE_LIBTASN1
 	select BR2_PACKAGE_LIBUNISTRING
 	select BR2_PACKAGE_NETTLE
@@ -25,5 +26,6 @@ config BR2_PACKAGE_GNUTLS_TOOLS
 
 endif
 
-comment "gnutls needs a toolchain w/ wchar, dynamic library"
-	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS
+comment "gnutls needs a toolchain w/ wchar, C++, dynamic library"
+	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS  || \
+		!BR2_INSTALL_LIBSTDCPP
package/libmicrohttpd/Config.in +4 -2
index 7f3c9bb8fd..9f074fb567 100644
@@ -13,12 +13,14 @@ config BR2_PACKAGE_LIBMICROHTTPD_SSL
 	bool "https support"
 	depends on !BR2_STATIC_LIBS # gnutls
 	depends on BR2_USE_WCHAR
+	depends on BR2_INSTALL_LIBSTDCPP # gnutls
 	select BR2_PACKAGE_GNUTLS
 	help
 	  Enable HTTPS (SSL) support.
 
-comment "libmicrohttpd https support needs a toolchain w/ wchar, dynamic library"
-	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS
+comment "libmicrohttpd https support needs a toolchain w/ wchar, C++, dynamic library"
+	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS  || \
+		!BR2_INSTALL_LIBSTDCPP
 
 endif
 
package/libsoup/Config.in +3 -2
index 236d3c428a..70f7d28b6d 100644
@@ -23,13 +23,14 @@ config BR2_PACKAGE_LIBSOUP_GNOME
 config BR2_PACKAGE_LIBSOUP_SSL
 	bool "https support"
 	depends on !BR2_STATIC_LIBS # gnutls
+	depends on BR2_INSTALL_LIBSTDCPP # gnutls
 	select BR2_PACKAGE_GLIB_NETWORKING
 	select BR2_PACKAGE_GNUTLS
 	help
 	  Enable HTTPS (SSL) support.
 
-comment "libsoup https support needs a toolchain w/ dynamic library"
-	depends on BR2_STATIC_LIBS
+comment "libsoup https support needs a toolchain w/ C++, dynamic library"
+	depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP
 
 endif
 
package/network-manager/Config.in +4 -2
index 72658c1278..f480ca2d40 100644
@@ -2,6 +2,7 @@ config BR2_PACKAGE_NETWORK_MANAGER
 	bool "networkmanager"
 	depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS # libgcrypt
 	depends on !BR2_STATIC_LIBS # gnutls
+	depends on BR2_INSTALL_LIBSTDCPP # gnutls
 	depends on BR2_USE_MMU # dbus
 	depends on BR2_PACKAGE_HAS_UDEV
 	# Tested with 3.2, but may even work with earlier versions
@@ -64,8 +65,9 @@ config BR2_PACKAGE_NETWORK_MANAGER_OVS
 
 endif
 
-comment "NetworkManager needs udev /dev management and a glibc toolchain w/ headers >= 3.7, dynamic library"
+comment "NetworkManager needs udev /dev management and a glibc toolchain w/ headers >= 3.7, C++, dynamic library"
 	depends on BR2_USE_MMU
 	depends on !BR2_PACKAGE_HAS_UDEV || \
 		!BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 || \
-		!BR2_TOOLCHAIN_USES_GLIBC || BR2_STATIC_LIBS
+		!BR2_TOOLCHAIN_USES_GLIBC || BR2_STATIC_LIBS  || \
+		!BR2_INSTALL_LIBSTDCPP
package/samba4/Config.in +4 -0
index 298fdc6608..b2d4379c0d 100644
@@ -29,10 +29,14 @@ if BR2_PACKAGE_SAMBA4
 
 config BR2_PACKAGE_SAMBA4_AD_DC
 	bool "AD DC"
+	depends on BR2_INSTALL_LIBSTDCPP
 	select BR2_PACKAGE_GNUTLS
 	help
 	  Enable Active Directory Domain Controller functionality.
 
+comment "samba4 AD DC support needs a toolchain w/ C++"
+	depends on !BR2_INSTALL_LIBSTDCPP
+
 config BR2_PACKAGE_SAMBA4_ADS
 	bool "ADS"
 	select BR2_PACKAGE_OPENLDAP
package/taskd/Config.in +1 -1
index 19d123fb59..e4a1dfab4f 100644
@@ -3,7 +3,7 @@ config BR2_PACKAGE_TASKD
 	depends on !BR2_STATIC_LIBS # gnutls
 	depends on BR2_USE_WCHAR # gnutls
 	depends on BR2_USE_MMU # fork()
-	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_INSTALL_LIBSTDCPP # gnutls
 	select BR2_PACKAGE_GNUTLS
 	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
package/vpnc/Config.in +4 -2
index 6455b0d87a..738413961c 100644
@@ -4,6 +4,7 @@ config BR2_PACKAGE_VPNC
 	depends on !BR2_STATIC_LIBS # gnutls
 	depends on BR2_USE_MMU # fork()
 	depends on BR2_USE_WCHAR # gnutls
+	depends on BR2_INSTALL_LIBSTDCPP # gnutls
 	select BR2_PACKAGE_LIBGCRYPT
 	select BR2_PACKAGE_LIBGPG_ERROR
 	select BR2_PACKAGE_GNUTLS
@@ -16,6 +17,7 @@ config BR2_PACKAGE_VPNC
 
 	  http://www.unix-ag.uni-kl.de/~massar/vpnc
 
-comment "vpnc needs a toolchain w/ wchar, dynamic library"
+comment "vpnc needs a toolchain w/ wchar, C++, dynamic library"
 	depends on BR2_USE_MMU
-	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS
+	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS || \
+		!BR2_INSTALL_LIBSTDCPP
package/webkitgtk/Config.in +1 -0
index 31794ed2a4..10bd55ebb9 100644
@@ -56,13 +56,14 @@ if BR2_PACKAGE_WEBKITGTK
 config BR2_PACKAGE_WEBKITGTK_HTTPS
 	bool "HTTPS support"
 	depends on !BR2_STATIC_LIBS # gnutls -> libsoup
+	depends on BR2_INSTALL_LIBSTDCPP # gnutls -> libsoup
 	select BR2_PACKAGE_CA_CERTIFICATES # runtime
 	select BR2_PACKAGE_LIBSOUP_SSL

package/webkitgtk/Config.in if BR2_PACKAGE_WEBKITGTK · line 69

Quoted 10 lines
package/webkitgtk/Config.in +2 -2
 	help
 	  Enable HTTPS protocol support.
 
-comment "webkitgtk https support needs a toolchain w/ dynamic library"
-	depends on BR2_STATIC_LIBS
+comment "webkitgtk https support needs a toolchain w/ C++, dynamic library"
+	depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP
 
 config BR2_PACKAGE_WEBKITGTK_MULTIMEDIA
 	bool "multimedia support"

The only thing I can know and can confirm on this issue is that Connman and NetworkManager depend on GnuTLS (NetworkManager can use NSS, but that IMHO not in buildroot).

Looking at GnuTLS it looks like it includes <cstdlib>, hence really depends on C++ toolchain.

Kind regards,
Petr

#11 lore raw

PATCH 1/2 gnutls: needs C++ support

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Petr" == Petr Vorel <[email protected]> writes:

Hi,

Quoted 5 lines
Quoted 2 lines

config BR2_PACKAGE_WEBKITGTK_MULTIMEDIA
bool "multimedia support"

The only thing I can know and can confirm on this issue is that Connman and NetworkManager depend on GnuTLS (NetworkManager can use NSS, but that IMHO not in buildroot).

It is (libnss).

Quoted 2 lines

Looking at GnuTLS it looks like it includes <cstdlib>, hence really depends on C++ toolchain.

Yes, but those are conditionally includes:

/* Many header files from the libstdc++ coming with g++ 3.3 or newer include
<libintl.h>, which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of <libintl.h> a NOP. */
#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)

# include <cstdlib>
# if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H
#  include <libintl.h>
# endif
#endif
Signature · 1 line
Bye, Peter Korsgaard
#12 lore raw

PATCH 1/2 gnutls: needs C++ support

Hi Peter,

Quoted 19 lines

Hi,

Quoted 5 lines
Quoted 2 lines

config BR2_PACKAGE_WEBKITGTK_MULTIMEDIA
bool "multimedia support"

The only thing I can know and can confirm on this issue is that Connman and NetworkManager depend on GnuTLS (NetworkManager can use NSS, but that IMHO not in buildroot).

It is (libnss).

Quoted 2 lines

Looking at GnuTLS it looks like it includes <cstdlib>, hence really depends on C++ toolchain.

Yes, but those are conditionally includes:

/* Many header files from the libstdc++ coming with g++ 3.3 or newer include
<libintl.h>, which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of <libintl.h> a NOP. */
#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)

Quoted 5 lines
# include <cstdlib>
# if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H
#  include <libintl.h>
# endif
#endif

You're right, thanks for update on both.

Kind regards,
Petr