Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 691764 - dev-util/android-tools-9.0.0_p3 : /.../unistd_ext.h:34:16: error: declaration of _pid_t gettid() noexcept has a different exception specifier
Summary: dev-util/android-tools-9.0.0_p3 : /.../unistd_ext.h:34:16: error: declaration...
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:
Whiteboard:
Keywords:
: 695906 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-08-08 17:21 UTC by Toralf Förster
Modified: 2020-03-10 00:23 UTC (History)
8 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,15.70 KB, text/plain)
2019-08-08 17:21 UTC, Toralf Förster
Details
dev-util:android-tools-9.0.0_p3:20190808-092344.log (dev-util:android-tools-9.0.0_p3:20190808-092344.log,220.62 KB, text/plain)
2019-08-08 17:21 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,119.52 KB, text/plain)
2019-08-08 17:21 UTC, Toralf Förster
Details
environment (environment,156.60 KB, text/plain)
2019-08-08 17:21 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,15.67 KB, application/x-bzip)
2019-08-08 17:21 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,186.95 KB, application/x-bzip)
2019-08-08 17:21 UTC, Toralf Förster
Details
use-glibc-s-gettid-when-using-glibc-2.30.patch (use-glibc-s-gettid-when-using-glibc-2.30.patch,1.23 KB, patch)
2019-11-12 15:41 UTC, Greg Turner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2019-08-08 17:21:20 UTC
In file included from /usr/include/unistd.h:1170,
                 from core/libcutils/threads.cpp:29:
/usr/include/bits/unistd_ext.h:34:16: error: declaration of ‘__pid_t gettid() noexcept’ has a different exception specifier
   34 | extern __pid_t gettid (void) __THROW;
      |                ^~~~~~
In file included from core/libcutils/threads.cpp:17:

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_hardened-libressl-20190806-091828

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-9.1.0 *

Available Python interpreters, in order of preference:
  [1]   python3.6
  [2]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.36.0 *



emerge -qpvO dev-util/android-tools
--- Invalid atom in /etc/portage/package.accept_keywords/00unstable: sys-libs/glibc-2.30
Comment 1 Toralf Förster gentoo-dev 2019-08-08 17:21:23 UTC
Created attachment 586224 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2019-08-08 17:21:26 UTC
Created attachment 586226 [details]
dev-util:android-tools-9.0.0_p3:20190808-092344.log
Comment 3 Toralf Förster gentoo-dev 2019-08-08 17:21:29 UTC
Created attachment 586228 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2019-08-08 17:21:31 UTC
Created attachment 586230 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2019-08-08 17:21:34 UTC
Created attachment 586232 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2019-08-08 17:21:37 UTC
Created attachment 586234 [details]
logs.tbz2
Comment 7 Sergei Trofimovich gentoo-dev 2019-09-26 19:27:49 UTC
The failure here is glibc-2.30's gettid() collision:

FAILED: core/libcutils/threads.cpp.o 
x86_64-pc-linux-gnu-g++ -std=gnu++17 -O2 -pipe -march=native  -D_GNU_SOURCE -Icore/libcutils/include -Icore/include -c core/libcutils/threads.cpp -o core/libcutils/threads.cpp.o
In file included from /usr/include/unistd.h:1170,
                 from core/libcutils/threads.cpp:29:
/usr/include/bits/unistd_ext.h:34:16: error: declaration of ‘__pid_t gettid() noexcept’ has a different exception specifier
   34 | extern __pid_t gettid (void) __THROW;
      |                ^~~~~~
In file included from core/libcutils/threads.cpp:17:
core/libcutils/include/cutils/threads.h:40:14: note: from previous declaration ‘pid_t gettid()’
   40 | extern pid_t gettid();
      |              ^~~~~~
Comment 8 Sergei Trofimovich gentoo-dev 2019-09-30 19:01:07 UTC
*** Bug 695906 has been marked as a duplicate of this bug. ***
Comment 9 Hank Leininger 2019-11-10 18:46:14 UTC
(In reply to Sergei Trofimovich from comment #7)
> The failure here is glibc-2.30's gettid() collision:

It looks like upstream merged a fix for this in https://github.com/nmeum/android-tools/pull/9

I don't have time to test it right now, maybe some other watcher can?
Comment 10 Greg Turner 2019-11-12 15:41:10 UTC
Created attachment 595900 [details, diff]
use-glibc-s-gettid-when-using-glibc-2.30.patch

(In reply to Hank Leininger from comment #9)
> (In reply to Sergei Trofimovich from comment #7)
> > The failure here is glibc-2.30's gettid() collision:
> 
> It looks like upstream merged a fix for this in
> https://github.com/nmeum/android-tools/pull/9
> 
> I don't have time to test it right now, maybe some other watcher can?

Here is, for the lack of a better term, a epatchuserified version of https://raw.githubusercontent.com/nmeum/android-tools/237abccb95cadd78f2c431bc34974c2598804c21/patches/core/0022-Use-glibc-s-gettid-when-using-glibc-2.30.patch which does indeed resolve the problem on my ~amd64.  Ideally if the ebuild were to adopt such a thing, it might try harder than I did to use the original patch (but there was fuzz on the epatchuser side of src_prepare... depending on which ebuild phase that patchfuzz came from, maybe not worth the effort or even possible, so, gl! :)  Your OCD may vary :P).
Comment 11 Stefan Strogin gentoo-dev 2019-11-12 21:21:50 UTC
Thanks for the fix. Works for me.
Comment 12 Hank Leininger 2019-11-20 00:47:28 UTC
Worked for me as well, thank you.
Comment 13 Larry the Git Cow gentoo-dev 2019-12-09 04:03:41 UTC
The bug has been closed via the following commit(s):

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

commit ce40dac7505118d5fcff820d21e338b571ab79ed
Author:     Tobias M <tmmonckton@gmail.com>
AuthorDate: 2019-11-10 17:37:00 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-12-09 04:03:32 +0000

    dev-util/android-tools: 9.0.0_p3-r1 revbump for bug 691764
    
    This patch prevents collisions with the gettid() function in glibc-2.30.
    
    Closes: https://bugs.gentoo.org/691764
    Package-Manager: Portage-2.3.81, Repoman-2.3.20
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 dev-util/android-tools/Manifest                    |   1 +
 .../android-tools/android-tools-9.0.0_p3-r1.ebuild | 135 +++++++++++++++++++++
 2 files changed, 136 insertions(+)