[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#975054: marked as done (libva: FTBFS on !linux)



Your message dated Mon, 07 Dec 2020 00:06:15 +0100
with message-id <20882883.EfDdHjke4D@thyrus>
and subject line Fixed in libva 2.10.0
has caused the Debian Bug report #975054,
regarding libva: FTBFS on !linux
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
975054: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=975054
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Source: libva
Version: 2.9.0-1
Severity: important
Tags: ftbfs, patch
User: debian-hurd@lists.debian.org debian-kbsd@lists.debian.org
Usertags: hurd kfreebsd

Hello,

libva fails to build due to usage of a linux-specific usage of
syscall(__NR_gettid) in va/va_trace.c. The attached patch,
va_va_trace.c.diff, replaces that call with pthread_self() for non-
linux systems. Build-tested on GNU/Linux, GNU/Hurd and GNU/kFreeBSD.

Thanks!
Index: libva-2.9.0/va/va_trace.c
===================================================================
--- libva-2.9.0.orig/va/va_trace.c
+++ libva-2.9.0/va/va_trace.c
@@ -288,8 +288,13 @@ static void add_trace_config_info(
 {
     struct trace_config_info *pconfig_info;
     int idx = 0;
-    pid_t thd_id = syscall(__NR_gettid);
+    pid_t thd_id;
 
+#ifdef __linux__
+    thd_id = syscall(__NR_gettid);
+#else
+    thd_id = pthread_self();
+#endif
     LOCK_RESOURCE(pva_trace);
 
     for (idx = 0;idx < MAX_TRACE_CTX_NUM;idx++) {
@@ -666,8 +671,14 @@ static struct trace_log_file *start_trac
 {
     struct trace_log_files_manager *plog_files_mgr = NULL;
     struct trace_log_file *plog_file = NULL;
-    pid_t thd_id = syscall(__NR_gettid);
     int i = 0;
+    pid_t thd_id;
+
+#ifdef __linux__
+    thd_id = syscall(__NR_gettid);
+#else
+    thd_id = pthread_self();
+#endif
 
     LOCK_RESOURCE(pva_trace);
 
@@ -705,8 +716,14 @@ static void refresh_log_file(
     struct trace_context *ptra_ctx)
 {
     struct trace_log_file *plog_file = NULL;
-    pid_t thd_id = syscall(__NR_gettid);
     int i = 0;
+    pid_t thd_id;
+
+#ifdef __linux__
+    thd_id = syscall(__NR_gettid);
+#else
+    thd_id = pthread_self();
+#endif
 
     plog_file = ptra_ctx->plog_file;
     if(plog_file && plog_file->thread_id != thd_id) {
@@ -1231,7 +1248,13 @@ static void internal_TraceUpdateContext
 {
     struct trace_context *trace_ctx = NULL;
     int i = 0, delete = 1;
-    pid_t thd_id = syscall(__NR_gettid);
+    pid_t thd_id;
+
+#ifdef __linux__
+    thd_id = syscall(__NR_gettid);
+#else
+    thd_id = pthread_self();
+#endif
 
     if(tra_ctx_idx >= MAX_TRACE_CTX_NUM)
         return;

--- End Message ---
--- Begin Message ---
Source: libva
Source-Version: 2.10.0-1
Done: Sebastian Ramacher <sramacher@debian.org>

This was fixed upstream before 2.10.0:
https://github.com/intel/libva/commit/9ab7db37d11dcec840475933a8721672f02bff79
https://github.com/intel/libva/commit/0ed447df56fe14f9a83886c955365b6d13f972de
and indeed it libva 2.10.0-1 built successfully on non-Linux
architectures. Hence, closing appropriately.

-- 
Pino Toscano

Attachment: signature.asc
Description: This is a digitally signed message part.


--- End Message ---

Reply to: