Skip to contentSkip to conversation

package/pugixml: drop header-only option

PATCH In review Fabrice Fontaine 2 participants 2 messages Feb 28, 2023 – Mar 5, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/pugixml: drop header-only option

Header-only option raises the following build failure with gerbera since commit cc3a4a7b1de7b158354c650d234339e8a969a730:

/home/thomas/autobuild/instance-2/output-1/host/lib/gcc/nios2-buildroot-linux-gnu/10.4.0/../../../../nios2-buildroot-linux-gnu/bin/ld: CMakeFiles/gerbera.dir/src/main.cc.o: in function `ConfigGenerator::~ConfigGenerator()':
/home/thomas/autobuild/instance-2/output-1/build/gerbera-1.10.0/src/config/config_generator.h:33: undefined reference to `pugi::xml_document::~xml_document()'

This build failure can't be fixed by adding a !BR2_PACKAGE_PUGIXML_HEADER_ONLY dependency as it will create the following recursive dependency:

package/gerbera/Config.in:1:error: recursive dependency detected!

package/gerbera/Config.in:1:    symbol BR2_PACKAGE_GERBERA depends on BR2_PACKAGE_PUGIXML_HEADER_ONLY
package/pugixml/Config.in:42:   symbol BR2_PACKAGE_PUGIXML_HEADER_ONLY depends on BR2_PACKAGE_PUGIXML
package/pugixml/Config.in:1:    symbol BR2_PACKAGE_PUGIXML is selected by BR2_PACKAGE_GERBERA

Moreover, commit 48b2e50eb8df36e3e3ab18692bd9e0dde3b38702 stated that "Compact and header-only modes are not strictly needed for our use case, but we did the work anyway and may be useful for someone else."

So dropping header-only seems to be the right approach

Fixes:
- http://autobuild.buildroot.org/results/800537a1ef5f48d24c20aad7a9c96c56dfdc77f5

---
 Config.in.legacy           | 6 ++++++
 package/pugixml/Config.in  | 9 ---------
 package/pugixml/pugixml.mk | 4 ----
 3 files changed, 6 insertions(+), 13 deletions(-)
Config.in.legacy +6 -0
index 381e1e3a8c..a31543d5fa 100644
@@ -146,6 +146,12 @@ endif
 
 comment "Legacy options removed in 2023.02"
 
+config BR2_PACKAGE_PUGIXML_HEADER_ONLY
+	bool "pugixml header-only removed"
+	select BR2_LEGACY
+	help
+	  The header-only version raises a build failure with gerbera.
+
 config BR2_PACKAGE_UCCP420WLAN
 	bool "uccp420wlan removed"
 	select BR2_LEGACY
package/pugixml/Config.in +0 -9
index 6b7d2e3259..d5a3cb3ebb 100644
@@ -39,15 +39,6 @@ config BR2_PACKAGE_PUGIXML_COMPACT
 
 	  http://pugixml.org/docs/manual.html#dom.memory.compact
 
-config BR2_PACKAGE_PUGIXML_HEADER_ONLY
-	bool "Enable header-only version"
-	help
-	  All source code for pugixml will be included in every
-	  translation unit that includes pugixml.hpp. This is how most
-	  of Boost and STL libraries work.
-
-	  http://pugixml.org/docs/manual.html#install.building.header
-
 endif
 
 comment "pugixml needs a toolchain w/ C++"
package/pugixml/pugixml.mk +0 -4
index c8d59f0864..415227a40a 100644
@@ -31,10 +31,6 @@ endif
 PUGIXML_BUILD_DEFINES += PUGIXML_HAS_LONG_LONG
 HOST_PUGIXML_BUILD_DEFINES += PUGIXML_HAS_LONG_LONG
 
-ifeq ($(BR2_PACKAGE_PUGIXML_HEADER_ONLY),y)
-PUGIXML_BUILD_DEFINES += PUGIXML_HEADER_ONLY
-endif
-
 PUGIXML_CONF_OPTS += -DPUGIXML_BUILD_DEFINES="$(subst $(space),;,$(PUGIXML_BUILD_DEFINES))"
 
 HOST_PUGIXML_CONF_OPTS += \
Signature · 6 lines
2.39.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 26 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabrice" == Fabrice Fontaine <[email protected]> writes:

Header-only option raises the following build failure with gerbera since commit cc3a4a7b1de7b158354c650d234339e8a969a730:

/home/thomas/autobuild/instance-2/output-1/host/lib/gcc/nios2-buildroot-linux-gnu/10.4.0/../../../../nios2-buildroot-linux-gnu/bin/ld:
CMakeFiles/gerbera.dir/src/main.cc.o: in function
`ConfigGenerator::~ConfigGenerator()':
/home/thomas/autobuild/instance-2/output-1/build/gerbera-1.10.0/src/config/config_generator.h:33:
undefined reference to `pugi::xml_document::~xml_document()'

This build failure can't be fixed by adding a !BR2_PACKAGE_PUGIXML_HEADER_ONLY dependency as it will create the following recursive dependency:

package/gerbera/Config.in:1:error: recursive dependency detected! package/gerbera/Config.in:1: symbol BR2_PACKAGE_GERBERA depends on BR2_PACKAGE_PUGIXML_HEADER_ONLY package/pugixml/Config.in:42: symbol BR2_PACKAGE_PUGIXML_HEADER_ONLY depends on BR2_PACKAGE_PUGIXML
package/pugixml/Config.in:1: symbol BR2_PACKAGE_PUGIXML is selected by BR2_PACKAGE_GERBERA

Moreover, commit 48b2e50eb8df36e3e3ab18692bd9e0dde3b38702 stated that "Compact and header-only modes are not strictly needed for our use case, but we did the work anyway and may be useful for someone else."

Quoted 6 lines

So dropping header-only seems to be the right approach

Fixes:
- http://autobuild.buildroot.org/results/800537a1ef5f48d24c20aad7a9c96c56dfdc77f5

Committed, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot