Package: ck
Version: 0.6.0-1.2
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu focal ubuntu-patch

Dear Maintainer,

ck fails to build from source against glibc 2.30, which is currently in
experimental. In Ubuntu, glibc 2.30 has been used since the last stable
release.

In Ubuntu, the attached patch was applied to achieve the following:

  * d/p/glibc-2.30.patch: Apply patch from upstream to fix FTBFS against glibc
    2.30.

Thanks for considering the patch.

Logan Rosen

-- System Information:
Debian Release: buster/sid
  APT prefers eoan-updates
  APT policy: (500, 'eoan-updates'), (500, 'eoan-security'), (500, 'eoan'), 
(100, 'eoan-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.3.0-29-generic (SMP w/8 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru ck-0.6.0/debian/patches/glibc-2.30.patch 
ck-0.6.0/debian/patches/glibc-2.30.patch
--- ck-0.6.0/debian/patches/glibc-2.30.patch    1969-12-31 19:00:00.000000000 
-0500
+++ ck-0.6.0/debian/patches/glibc-2.30.patch    2020-02-15 12:39:01.000000000 
-0500
@@ -0,0 +1,52 @@
+From b520d58d00b7ed6c5cc9bc97c62f07e09f4f49ad Mon Sep 17 00:00:00 2001
+From: Samy Al Bahra <sba...@backtrace.io>
+Date: Tue, 29 Oct 2019 17:30:09 -0400
+Subject: [PATCH] regressions/common: rename gettid wrapper to common_gettid.
+
+glibc-2.30 added a wrapper to gettid (https://lwn.net/Articles/795127/).
+gettid will clash with the glibc-provided symbol. Remove the
+macro and instead move to a dedicated namespace.
+
+We go this route to avoid introducing unnecessary complexity to
+build.
+
+Fixes #147
+---
+ regressions/common.h | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+--- a/regressions/common.h
++++ b/regressions/common.h
+@@ -267,13 +267,11 @@
+ #define AFFINITY_INITIALIZER {0, 0}
+ 
+ #ifdef __linux__
+-#ifndef gettid
+ static pid_t
+-gettid(void)
++common_gettid(void)
+ {
+       return syscall(__NR_gettid);
+ }
+-#endif /* gettid */
+ 
+ CK_CC_UNUSED static int
+ aff_iterate(struct affinity *acb)
+@@ -285,7 +283,7 @@
+       CPU_ZERO(&s);
+       CPU_SET(c % CORES, &s);
+ 
+-      return sched_setaffinity(gettid(), sizeof(s), &s);
++      return sched_setaffinity(common_gettid(), sizeof(s), &s);
+ }
+ 
+ CK_CC_UNUSED static int
+@@ -297,7 +295,7 @@
+       CPU_ZERO(&s);
+       CPU_SET((*core) % CORES, &s);
+ 
+-      return sched_setaffinity(gettid(), sizeof(s), &s);
++      return sched_setaffinity(common_gettid(), sizeof(s), &s);
+ }
+ #elif defined(__MACH__)
+ CK_CC_UNUSED static int
diff -Nru ck-0.6.0/debian/patches/series ck-0.6.0/debian/patches/series
--- ck-0.6.0/debian/patches/series      2019-11-21 03:36:35.000000000 -0500
+++ ck-0.6.0/debian/patches/series      2020-02-15 12:41:20.000000000 -0500
@@ -1 +1,2 @@
 allow-disable-sse.patch
+glibc-2.30.patch

Reply via email to