Message ID | 20240524115704.2501696-1-dmitry.baryshkov@linaro.org |
---|---|
State | Accepted |
Headers | show |
Series | [meta-oe,1/2] android-tools: fix building with GCC 14 | expand |
On Fri, May 24, 2024 at 4:57 AM Dmitry Baryshkov via lists.openembedded.org <dbaryshkov=gmail.com@lists.openembedded.org> wrote: > > libstdc++ in GCC 14 has dropped several nested includes. Include the > <algorithms> header to fix build error: > > system/core/fs_mgr/liblp/utility.cpp: In function 'bool android::fs_mgr::UpdateMetadataForInPlaceSnapshot(LpMetadata*, uint32_t, uint32_t)': > system/core/fs_mgr/liblp/utility.cpp:264:28: error: no matching function for call to 'find(std::vector<LpMetadataPartitionGroup*>::iterator, std::vector<LpMetadataPartitionGroup*>::iterator, __gnu_cxx::__alloc_traits<std::allocator<LpMetadataPartitionGroup>, LpMetadataPartitionGroup>::value_type*)' > 264 | auto it = std::find(new_group_ptrs.begin(), new_group_ptrs.end(), > | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 265 | &metadata->groups[partition.group_index]); > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > --- > .../0001-liblp-fix-building-with-GCC-14.patch | 26 +++++++++++++++++++ > .../android-tools/android-tools_29.0.6.r14.bb | 1 + > 2 files changed, 27 insertions(+) > create mode 100644 meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/0001-liblp-fix-building-with-GCC-14.patch > > diff --git a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/0001-liblp-fix-building-with-GCC-14.patch b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/0001-liblp-fix-building-with-GCC-14.patch > new file mode 100644 > index 000000000000..ccd289c81ba9 > --- /dev/null > +++ b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/0001-liblp-fix-building-with-GCC-14.patch > @@ -0,0 +1,26 @@ > +From 9f4d839847666019cadf57aa34fd366801c11a44 Mon Sep 17 00:00:00 2001 > +From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > +Date: Fri, 24 May 2024 14:13:35 +0300 > +Subject: [PATCH] liblp: fix building with GCC 14 > + > +Upstream-Status: Pending This is worth upstreaming. > +Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > +--- > + system/core/fs_mgr/liblp/utility.cpp | 1 + > + 1 file changed, 1 insertion(+) > + > +diff --git a/system/core/fs_mgr/liblp/utility.cpp b/system/core/fs_mgr/liblp/utility.cpp > +index 48c5c8318d99..0aa8023aa87d 100644 > +--- a/system/core/fs_mgr/liblp/utility.cpp > ++++ b/system/core/fs_mgr/liblp/utility.cpp > +@@ -24,6 +24,7 @@ > + #include <sys/ioctl.h> > + #endif > + > ++#include <algorithm> > + #include <map> > + #include <string> > + #include <vector> > +-- > +2.39.2 > + > diff --git a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools_29.0.6.r14.bb b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools_29.0.6.r14.bb > index f63b5c04b364..176107f2a7e2 100644 > --- a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools_29.0.6.r14.bb > +++ b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools_29.0.6.r14.bb > @@ -52,6 +52,7 @@ SRC_URI += " \ > file://0003-Update-usage-of-usbdevfs_urb-to-match-new-kernel-UAP.patch \ > file://0004-adb-Fix-build-on-big-endian-systems.patch \ > file://0005-adb-Allow-adbd-to-be-run-as-root.patch \ > + file://0001-liblp-fix-building-with-GCC-14.patch \ > " > > S = "${WORKDIR}/git" > -- > 2.39.2 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#110510): https://lists.openembedded.org/g/openembedded-devel/message/110510 > Mute This Topic: https://lists.openembedded.org/mt/106279982/1997914 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
On Fri, 24 May 2024 at 20:34, Khem Raj <raj.khem@gmail.com> wrote: > > On Fri, May 24, 2024 at 4:57 AM Dmitry Baryshkov via > lists.openembedded.org <dbaryshkov=gmail.com@lists.openembedded.org> > wrote: > > > > libstdc++ in GCC 14 has dropped several nested includes. Include the > > <algorithms> header to fix build error: > > > > system/core/fs_mgr/liblp/utility.cpp: In function 'bool android::fs_mgr::UpdateMetadataForInPlaceSnapshot(LpMetadata*, uint32_t, uint32_t)': > > system/core/fs_mgr/liblp/utility.cpp:264:28: error: no matching function for call to 'find(std::vector<LpMetadataPartitionGroup*>::iterator, std::vector<LpMetadataPartitionGroup*>::iterator, __gnu_cxx::__alloc_traits<std::allocator<LpMetadataPartitionGroup>, LpMetadataPartitionGroup>::value_type*)' > > 264 | auto it = std::find(new_group_ptrs.begin(), new_group_ptrs.end(), > > | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > 265 | &metadata->groups[partition.group_index]); > > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > --- > > .../0001-liblp-fix-building-with-GCC-14.patch | 26 +++++++++++++++++++ > > .../android-tools/android-tools_29.0.6.r14.bb | 1 + > > 2 files changed, 27 insertions(+) > > create mode 100644 meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/0001-liblp-fix-building-with-GCC-14.patch > > > > diff --git a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/0001-liblp-fix-building-with-GCC-14.patch b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/0001-liblp-fix-building-with-GCC-14.patch > > new file mode 100644 > > index 000000000000..ccd289c81ba9 > > --- /dev/null > > +++ b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/0001-liblp-fix-building-with-GCC-14.patch > > @@ -0,0 +1,26 @@ > > +From 9f4d839847666019cadf57aa34fd366801c11a44 Mon Sep 17 00:00:00 2001 > > +From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > +Date: Fri, 24 May 2024 14:13:35 +0300 > > +Subject: [PATCH] liblp: fix building with GCC 14 > > + > > +Upstream-Status: Pending > > This is worth upstreaming. I'll see what can be done, but no promises with AOSP. > > > +Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > +---
diff --git a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/0001-liblp-fix-building-with-GCC-14.patch b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/0001-liblp-fix-building-with-GCC-14.patch new file mode 100644 index 000000000000..ccd289c81ba9 --- /dev/null +++ b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/0001-liblp-fix-building-with-GCC-14.patch @@ -0,0 +1,26 @@ +From 9f4d839847666019cadf57aa34fd366801c11a44 Mon Sep 17 00:00:00 2001 +From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> +Date: Fri, 24 May 2024 14:13:35 +0300 +Subject: [PATCH] liblp: fix building with GCC 14 + +Upstream-Status: Pending +Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> +--- + system/core/fs_mgr/liblp/utility.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/system/core/fs_mgr/liblp/utility.cpp b/system/core/fs_mgr/liblp/utility.cpp +index 48c5c8318d99..0aa8023aa87d 100644 +--- a/system/core/fs_mgr/liblp/utility.cpp ++++ b/system/core/fs_mgr/liblp/utility.cpp +@@ -24,6 +24,7 @@ + #include <sys/ioctl.h> + #endif + ++#include <algorithm> + #include <map> + #include <string> + #include <vector> +-- +2.39.2 + diff --git a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools_29.0.6.r14.bb b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools_29.0.6.r14.bb index f63b5c04b364..176107f2a7e2 100644 --- a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools_29.0.6.r14.bb +++ b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools_29.0.6.r14.bb @@ -52,6 +52,7 @@ SRC_URI += " \ file://0003-Update-usage-of-usbdevfs_urb-to-match-new-kernel-UAP.patch \ file://0004-adb-Fix-build-on-big-endian-systems.patch \ file://0005-adb-Allow-adbd-to-be-run-as-root.patch \ + file://0001-liblp-fix-building-with-GCC-14.patch \ " S = "${WORKDIR}/git"
libstdc++ in GCC 14 has dropped several nested includes. Include the <algorithms> header to fix build error: system/core/fs_mgr/liblp/utility.cpp: In function 'bool android::fs_mgr::UpdateMetadataForInPlaceSnapshot(LpMetadata*, uint32_t, uint32_t)': system/core/fs_mgr/liblp/utility.cpp:264:28: error: no matching function for call to 'find(std::vector<LpMetadataPartitionGroup*>::iterator, std::vector<LpMetadataPartitionGroup*>::iterator, __gnu_cxx::__alloc_traits<std::allocator<LpMetadataPartitionGroup>, LpMetadataPartitionGroup>::value_type*)' 264 | auto it = std::find(new_group_ptrs.begin(), new_group_ptrs.end(), | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 265 | &metadata->groups[partition.group_index]); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> --- .../0001-liblp-fix-building-with-GCC-14.patch | 26 +++++++++++++++++++ .../android-tools/android-tools_29.0.6.r14.bb | 1 + 2 files changed, 27 insertions(+) create mode 100644 meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/0001-liblp-fix-building-with-GCC-14.patch