package/mpd: fix build of GenParseName
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Mon, 1 Feb 2021 07:41:01 +0000 (08:41 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 13 Feb 2021 23:16:00 +0000 (00:16 +0100)
Fix build of GenParseName which has been added in version 0.22:
https://github.com/MusicPlayerDaemon/MPD/commit/fa45a8adfa44f6bc815ae7428770112c15c76d73

Fixes:
 - http://autobuild.buildroot.org/results/871e1362c44e5b68a149e6a5dd3caf99ea0d904a

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/mpd/0002-src-tag-meson.build-fix-GenParseName-linking.patch [new file with mode: 0644]

diff --git a/package/mpd/0002-src-tag-meson.build-fix-GenParseName-linking.patch b/package/mpd/0002-src-tag-meson.build-fix-GenParseName-linking.patch
new file mode 100644 (file)
index 0000000..e120b3e
--- /dev/null
@@ -0,0 +1,38 @@
+From 4c37d0b316a15213381bd7e07c5dee7526471fc8 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Mon, 1 Feb 2021 08:10:45 +0100
+Subject: [PATCH] src/tag/meson.build: fix GenParseName linking
+
+Set link_language to cpp for GenParseName to avoid the following build
+failure due to gcc being used to link a C and C++ source file:
+
+FAILED: src/tag/GenParseName
+/usr/bin/gcc  -o src/tag/GenParseName src/tag/GenParseName.p/GenParseName.cxx.o src/tag/GenParseName.p/Names.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-O1
+/usr/bin/ld: src/tag/GenParseName.p/GenParseName.cxx.o: in function `std::_Rb_tree<std::basic_string_view<char, std::char_traits<char> >, std::pair<std::basic_string_view<char, std::char_traits<char> > const, TagType>, std::_Select1st<std::pair<std::basic_string_view<char, std::char_traits<char> > const, TagType> >, std::less<std::basic_string_view<char, std::char_traits<char> > >, std::allocator<std::pair<std::basic_string_view<char, std::char_traits<char> > const, TagType> > >::_M_erase(std::_Rb_tree_node<std::pair<std::basic_string_view<char, std::char_traits<char> > const, TagType> >*)':
+GenParseName.cxx:
+(.text._ZNSt8_Rb_treeISt17basic_string_viewIcSt11char_traitsIcEESt4pairIKS3_7TagTypeESt10_Select1stIS7_ESt4lessIS3_ESaIS7_EE8_M_eraseEPSt13_Rb_tree_nodeIS7_E[_ZNSt8_Rb_treeISt17basic_string_viewIcSt11char_traitsIcEESt4pairIKS3_7TagTypeESt10_Select1stIS7_ESt4lessIS3_ESaIS7_EE8_M_eraseEPSt13_Rb_tree_nodeIS7_E]+0x23): undefined reference to `operator delete(void*)'
+
+Fixes:
+ - http://autobuild.buildroot.org/results/871e1362c44e5b68a149e6a5dd3caf99ea0d904a
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/MusicPlayerDaemon/MPD/pull/1068]
+---
+ src/tag/meson.build | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/tag/meson.build b/src/tag/meson.build
+index 064eada18..4fda35e52 100644
+--- a/src/tag/meson.build
++++ b/src/tag/meson.build
+@@ -2,6 +2,7 @@ generate_parse_name = executable(
+   'GenParseName',
+   'GenParseName.cxx',
+   'Names.c',
++  link_language: 'cpp',
+   native: true,
+ )
+-- 
+2.29.2
+