[Beignet] [PATCH] Fix libva examples build error

Luo, Xionghu xionghu.luo at intel.com
Wed Jun 14 03:32:55 UTC 2017


Need deinit submodules for existing projects, or else still failed to update libva repo.

Another issue is "undefined reference to 'drm_intel_get_min_eu_in_pool' "

Luo Xionghu
Best Regards

-----Original Message-----
From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of Pan, Xiuli
Sent: Tuesday, June 13, 2017 4:25 PM
To: Pan, Xiuli <xiuli.pan at intel.com>; beignet at lists.freedesktop.org
Subject: Re: [Beignet] [PATCH] Fix libva examples build error

Ping.

-----Original Message-----
From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of Xiuli Pan
Sent: Friday, May 5, 2017 16:23
To: beignet at lists.freedesktop.org
Cc: Pan, Xiuli <xiuli.pan at intel.com>
Subject: [Beignet] [PATCH] Fix libva examples build error

From: Pan Xiuli <xiuli.pan at intel.com>

Now libva has moved from freedesktop to github and been spilt into two projects. Change the submodule to make sure the test case can be built.

Signed-off-by: Pan Xiuli <xiuli.pan at intel.com>
---
 .gitmodules                     |  5 ++++-
 examples/CMakeLists.txt         | 14 +++++++++++---
 examples/thirdparty/libva       |  2 +-
 examples/thirdparty/libva-utils |  1 +
 4 files changed, 17 insertions(+), 5 deletions(-)  create mode 160000 examples/thirdparty/libva-utils

diff --git a/.gitmodules b/.gitmodules
index 2f761c0..b635a84 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,6 @@
 [submodule "examples/thirdparty/libva"]
 	path = examples/thirdparty/libva
-	url = git://anongit.freedesktop.org/libva
+	url = https://github.com/01org/libva.git
+[submodule "examples/thirdparty/libva-utils"]
+	path = examples/thirdparty/libva-utils
+	url = https://github.com/01org/libva-utils.git
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index a9e35c2..2a165bc 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -30,15 +30,23 @@ IF(LIBVA_BUF_SH_DEP OR V4L2_BUF_SH_DEP)
     EXECUTE_PROCESS(COMMAND git checkout master WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libva)
   ENDIF ("LS_RESULT" STREQUAL "")
 
+  EXECUTE_PROCESS(COMMAND ls 
+ "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libva-utils" OUTPUT_VARIABLE LS_RESULT)  IF ("LS_RESULT" STREQUAL "")
+    EXECUTE_PROCESS(COMMAND git submodule init WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..)
+    EXECUTE_PROCESS(COMMAND git submodule update WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..)
+    EXECUTE_PROCESS(COMMAND git checkout master WORKING_DIRECTORY 
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libva-utils)
+  ENDIF ("LS_RESULT" STREQUAL "")
+
+
   INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libva/va
-                      ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libva/test/common)
+                      
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libva-utils/common)
 
   link_directories (${LIBVA_LIBDIR}
                     ${LIBVA-X11_LIBDIR})
 
   set (va_display_sources
-    ./thirdparty/libva/test/common/va_display.c
-    ./thirdparty/libva/test/common/va_display_x11.c)
+    ./thirdparty/libva-utils/common/va_display.c
+    ./thirdparty/libva-utils/common/va_display_x11.c)
 
   ADD_DEFINITIONS(-DHAVE_VA_X11)
 
diff --git a/examples/thirdparty/libva b/examples/thirdparty/libva index f974172..bd949b7 160000
--- a/examples/thirdparty/libva
+++ b/examples/thirdparty/libva
@@ -1 +1 @@
-Subproject commit f9741725839ea144e9a6a1827f74503ee39946c3
+Subproject commit bd949b77e8f0226a746b5fc2002b01a0e9ea1f2e
diff --git a/examples/thirdparty/libva-utils b/examples/thirdparty/libva-utils new file mode 160000 index 0000000..2fc915d
--- /dev/null
+++ b/examples/thirdparty/libva-utils
@@ -0,0 +1 @@
+Subproject commit 2fc915d48927e7065cf99c397701f8406093eba9
--
2.7.4

_______________________________________________
Beignet mailing list
Beignet at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/beignet
_______________________________________________
Beignet mailing list
Beignet at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list