Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 844127 - dev-util/android-tools-31.0.3_p1 won't compile with GCC 12.1
Summary: dev-util/android-tools-31.0.3_p1 won't compile with GCC 12.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Zac Medico
URL: https://github.com/nmeum/android-tool...
Whiteboard:
Keywords: PATCH
: 840179 848861 (view as bug list)
Depends on:
Blocks: gcc-12
  Show dependency tree
 
Reported: 2022-05-14 01:28 UTC by Mike Lothian
Modified: 2022-09-17 23:19 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Hopefully non-mangled patch (0001-Add-functional-include.patch,619 bytes, patch)
2022-05-14 07:40 UTC, Mike Lothian
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Lothian 2022-05-14 01:28:48 UTC
GCC 12.1 complains about a missing header

From 752fc3bd9a971858dbb7b51a0ef0289232e67e58 Mon Sep 17 00:00:00 2001
From: Mike Lothian <mike@fireburn.co.uk>
Date: Sat, 14 May 2022 02:01:18 +0100
Subject: [PATCH] Add functional include

---
tls/include/adb/tls/tls_connection.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/tls/include/adb/tls/tls_connection.h
b/tls/include/adb/tls/tls_connection.h
index bc5b98ab..a112756c 100644
--- a/tls/include/adb/tls/tls_connection.h
+++ b/tls/include/adb/tls/tls_connection.h
@@ -19,6 +19,7 @@
#include <stddef.h>
#include <stdint.h>

+#include <functional>
#include <string_view>
#include <vector>

Gets things compiling for me

Selinux also complains about a free on a possible non-heap but it's fixed upstream

https://github.com/SELinuxProject/selinux/commit/6e5d16a012e1845774da106846b87090d39ea8f3

Reproducible: Always
Comment 1 Larry the Git Cow gentoo-dev 2022-05-14 01:38:23 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b60f64b5be8e35a125b92cc0ef957f5e2186c7c

commit 9b60f64b5be8e35a125b92cc0ef957f5e2186c7c
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-05-14 01:38:06 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-05-14 01:38:06 +0000

    dev-util/android-tools: fix build with GCC 12
    
    Closes: https://bugs.gentoo.org/844127
    Thanks-to: Mike Lothian <mike@fireburn.co.uk>
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-util/android-tools/android-tools-31.0.3_p1.ebuild     |  4 +++-
 .../files/android-tools-31.0.3_p1-gcc12.patch             | 15 +++++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)
Comment 2 Mike Lothian 2022-05-14 07:07:45 UTC
What about the the SELinux issue?
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-05-14 07:10:00 UTC
(In reply to Mike Lothian from comment #2)
> What about the the SELinux issue?

Dunno? :)

It wasn't clear to me that it actually failed on it or if you were just sharing a warning you saw, given no log.

I'm guessing it did in fact fail to build?
Comment 4 Mike Lothian 2022-05-14 07:40:14 UTC
Sorry I thought I pasted in the warning from portage

 * QA Notice: Package triggers severe warnings which indicate that it
 *            may exhibit random runtime failures.
 * /var/tmp/portage/dev-util/android-tools-31.0.3_p1/work/android-tools-31.0.3p1/vendor/selinux/libselinux/src/label_file.h:289:25: warning: ‘free’ called on pointer ‘mmap_area_89->next_addr’ with nonzero offset 4 [-Wfree-nonheap-object]

 * Please do not file a Gentoo bug and instead report the above QA
 * issues directly to the upstream developers of this software.
 * Homepage: https://github.com/nmeum/android-tools/ https://developer.android.com/

https://github.com/SELinuxProject/selinux/commit/6e5d16a012e1845774da106846b87090d39ea8f3.patch

Also sam_ complained about my patch

[02:34] <sam_> FireBurnUK: patch mangler :(
[02:35] <sam_> patching file tls/include/adb/tls/tls_connection.h
[02:35] <sam_> patch: **** unexpected end of file in patch

I'll attach a properly formatted patch to the bug
Comment 5 Mike Lothian 2022-05-14 07:40:45 UTC
Created attachment 778661 [details, diff]
Hopefully non-mangled patch
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-05-19 03:09:39 UTC
*** Bug 840179 has been marked as a duplicate of this bug. ***
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-05-31 21:44:48 UTC
*** Bug 848861 has been marked as a duplicate of this bug. ***
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-05-31 21:47:40 UTC
It's a real pain to apply patches to the bundled components and I'm not even sure if it actually matters here for this -- I'm inclined to close this as the GCC 12 issue is fixed, and I hope there'll be a new release soon w/ new SELinux anyway, but Zac is free ofc to apply the patch if he wants to.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-05-31 21:47:52 UTC
(In reply to Sam James from comment #8)
> It's a real pain to apply patches to the bundled components and I'm not even
> sure if it actually matters here for this -- I'm inclined to close this as
> the GCC 12 issue is fixed, and I hope there'll be a new release soon w/ new
> SELinux anyway, but Zac is free ofc to apply the patch if he wants to.

(If you made a PR to add the selinux patch to it, I'd merge it though)