Discussion:
[PATCH] android: radeon(s): fix libdrm_amdgpu shared dependencies
(too old to reply)
Mauro Rossi
2017-05-20 15:52:17 UTC
Permalink
Raw Message
Fixes building errors in radeon drivers and winsys:

target C: libmesa_amd_common <= external/mesa/src/amd/common/ac_gpu_info.c
...
target C: libmesa_amd_common <= external/mesa/src/amd/common/ac_surface.c
...
target C: libmesa_pipe_r300 <= external/mesa/src/gallium/drivers/r300/r300_blit.c
...
target C: libmesa_pipe_r300 <= external/mesa/src/gallium/drivers/r300/r300_context.c
...
target C: libmesa_pipe_r300 <= external/mesa/src/gallium/drivers/r300/r300_chipset.c
...
target C: libmesa_pipe_r300 <= external/mesa/src/gallium/drivers/r300/r300_debug.c
...
target C: libmesa_pipe_radeon <= external/mesa/src/gallium/drivers/radeon/cayman_msaa.c
...
target C++: libmesa_pipe_r600 <= external/mesa/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
...
target C++: libmesa_pipe_r600 <= external/mesa/src/gallium/drivers/r600/sb/sb_core.cpp
...
target C: libmesa_pipe_radeonsi <= external/mesa/src/gallium/drivers/radeonsi/si_blit.c
...
target C: libmesa_pipe_radeonsi <= external/mesa/src/gallium/drivers/radeonsi/cik_sdma.c
...
target C: libmesa_winsys_radeon <= external/mesa/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
...
target C: libmesa_winsys_radeon <= external/mesa/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
...
target C: libmesa_winsys_radeon <= external/mesa/src/gallium/winsys/radeon/drm/radeon_drm_surface.c
...

external/mesa/src/amd/common/ac_gpu_info.h:31:10: fatal error: 'amdgpu.h' file not found
^
14 errors

Fixes: 98a2492 "ac_surface: use radeon_info from ac_gpu_info"
---
src/amd/Android.common.mk | 3 +++
src/gallium/drivers/r300/Android.mk | 2 +-
src/gallium/drivers/r600/Android.mk | 2 +-
src/gallium/drivers/radeon/Android.mk | 2 +-
src/gallium/drivers/radeonsi/Android.mk | 2 +-
src/gallium/winsys/radeon/drm/Android.mk | 2 +-
6 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/amd/Android.common.mk b/src/amd/Android.common.mk
index e3915b45bf..39d2732fd9 100644
--- a/src/amd/Android.common.mk
+++ b/src/amd/Android.common.mk
@@ -61,6 +61,9 @@ LOCAL_C_INCLUDES := \
LOCAL_EXPORT_C_INCLUDE_DIRS := \
$(LOCAL_PATH)/common

+LOCAL_SHARED_LIBRARIES := \
+ libdrm_amdgpu
+
LOCAL_STATIC_LIBRARIES := \
libmesa_nir

diff --git a/src/gallium/drivers/r300/Android.mk b/src/gallium/drivers/r300/Android.mk
index 0c89cdbb14..1867c702ea 100644
--- a/src/gallium/drivers/r300/Android.mk
+++ b/src/gallium/drivers/r300/Android.mk
@@ -35,7 +35,7 @@ LOCAL_C_INCLUDES := \
$(MESA_TOP)/src/mesa


-LOCAL_SHARED_LIBRARIES := libdrm_radeon
+LOCAL_SHARED_LIBRARIES := libdrm_radeon libdrm_amdgpu
LOCAL_MODULE := libmesa_pipe_r300

include $(GALLIUM_COMMON_MK)
diff --git a/src/gallium/drivers/r600/Android.mk b/src/gallium/drivers/r600/Android.mk
index 87f433dbae..9f5e1f127c 100644
--- a/src/gallium/drivers/r600/Android.mk
+++ b/src/gallium/drivers/r600/Android.mk
@@ -36,7 +36,7 @@ else
LOCAL_C_INCLUDES += $(MESA_TOP)/src/amd/common
endif

-LOCAL_SHARED_LIBRARIES := libdrm_radeon
+LOCAL_SHARED_LIBRARIES := libdrm_radeon libdrm_amdgpu
LOCAL_MODULE := libmesa_pipe_r600

include $(GALLIUM_COMMON_MK)
diff --git a/src/gallium/drivers/radeon/Android.mk b/src/gallium/drivers/radeon/Android.mk
index eb1a32182b..d433e97567 100644
--- a/src/gallium/drivers/radeon/Android.mk
+++ b/src/gallium/drivers/radeon/Android.mk
@@ -30,7 +30,7 @@ include $(CLEAR_VARS)

LOCAL_SRC_FILES := $(C_SOURCES)

-LOCAL_SHARED_LIBRARIES := libdrm_radeon libLLVM
+LOCAL_SHARED_LIBRARIES := libdrm_radeon libdrm_amdgpu libLLVM
LOCAL_MODULE := libmesa_pipe_radeon

ifeq ($(MESA_ENABLE_LLVM),true)
diff --git a/src/gallium/drivers/radeonsi/Android.mk b/src/gallium/drivers/radeonsi/Android.mk
index 5676c55983..c08833e9dd 100644
--- a/src/gallium/drivers/radeonsi/Android.mk
+++ b/src/gallium/drivers/radeonsi/Android.mk
@@ -40,7 +40,7 @@ LOCAL_C_INCLUDES := \

LOCAL_STATIC_LIBRARIES := libmesa_amd_common

-LOCAL_SHARED_LIBRARIES := libdrm_radeon libLLVM
+LOCAL_SHARED_LIBRARIES := libdrm_radeon libdrm_amdgpu libLLVM
LOCAL_MODULE := libmesa_pipe_radeonsi

$(call mesa-build-with-llvm)
diff --git a/src/gallium/winsys/radeon/drm/Android.mk b/src/gallium/winsys/radeon/drm/Android.mk
index 2e0c40c066..80f981a317 100644
--- a/src/gallium/winsys/radeon/drm/Android.mk
+++ b/src/gallium/winsys/radeon/drm/Android.mk
@@ -30,7 +30,7 @@ include $(CLEAR_VARS)

LOCAL_SRC_FILES := $(C_SOURCES)

-LOCAL_SHARED_LIBRARIES := libdrm_radeon
+LOCAL_SHARED_LIBRARIES := libdrm_radeon libdrm_amdgpu
LOCAL_MODULE := libmesa_winsys_radeon

include $(GALLIUM_COMMON_MK)
--
2.11.0
Emil Velikov
2017-05-21 16:27:43 UTC
Permalink
Raw Message
Hi Mauro,

There is a similar issue when building with autotools. There's a few
ways to address this so let's see what the devs prefer.

Another temporary workaround is to build radeonsi alongside the other
radeon drivers.

-Emil
Mauro Rossi
2017-05-21 23:34:29 UTC
Permalink
Raw Message
Post by Emil Velikov
Hi Mauro,
There is a similar issue when building with autotools. There's a few
ways to address this so let's see what the devs prefer.
Another temporary workaround is to build radeonsi alongside the other
radeon drivers.
-Emil
Just FYI, I am already building radeonsi (target libmesa_pipe_radeonsi)
Mauro
Mauro Rossi
2017-05-27 09:59:33 UTC
Permalink
Raw Message
Post by Mauro Rossi
Post by Emil Velikov
Hi Mauro,
There is a similar issue when building with autotools. There's a few
ways to address this so let's see what the devs prefer.
Another temporary workaround is to build radeonsi alongside the other
radeon drivers.
-Emil
Just FYI, I am already building radeonsi (target libmesa_pipe_radeonsi)
Mauro
...continuing the sentence so building radeonsi (even if not working
because llvm 3.8 in nougat)
is not a workaround the r% drivers building errors.

After commit 44b29dd "amd/common: add missing libdrm include path",
is there an alternative proposed solution for android building errors that
compares with submitted patch?

Mauro
Emil Velikov
2017-05-29 15:30:52 UTC
Permalink
Raw Message
Post by Mauro Rossi
Post by Emil Velikov
Hi Mauro,
There is a similar issue when building with autotools. There's a few
ways to address this so let's see what the devs prefer.
Another temporary workaround is to build radeonsi alongside the other
radeon drivers.
-Emil
Just FYI, I am already building radeonsi (target libmesa_pipe_radeonsi)
Mauro
...continuing the sentence so building radeonsi (even if not working because
llvm 3.8 in nougat)
is not a workaround the r% drivers building errors.
After commit 44b29dd "amd/common: add missing libdrm include path",
is there an alternative proposed solution for android building errors that
compares with submitted patch?
The patch mentioned is incomplete/wrong. Can you try "rev 3" of the
following series
https://patchwork.freedesktop.org/series/24960/

-Emil
Mauro Rossi
2017-06-17 17:01:17 UTC
Permalink
Raw Message
Post by Emil Velikov
Post by Mauro Rossi
Post by Emil Velikov
Hi Mauro,
There is a similar issue when building with autotools. There's a few
ways to address this so let's see what the devs prefer.
Another temporary workaround is to build radeonsi alongside the other
radeon drivers.
-Emil
Just FYI, I am already building radeonsi (target libmesa_pipe_radeonsi)
Mauro
...continuing the sentence so building radeonsi (even if not working because
llvm 3.8 in nougat)
is not a workaround the r% drivers building errors.
After commit 44b29dd "amd/common: add missing libdrm include path",
is there an alternative proposed solution for android building errors that
compares with submitted patch?
The patch mentioned is incomplete/wrong. Can you try "rev 3" of the
following series
https://patchwork.freedesktop.org/series/24960/
-Emil
Hi,

after rebase on top of 1f958c133 ("radeonsi: include ac_binary.h for
struct ac_shader_binary")
I still see residual building errors in amd/common

Please review the following patch.
Thanks

Mauro

From 6339dc99dc23f491cb1cce09b55d4013f6d0da63 Mon Sep 17 00:00:00 2001
From: Mauro Rossi <***@gmail.com>
Date: Sat, 20 May 2017 17:31:36 +0200
Subject: [PATCH] android: amd/common: fix libdrm_amdgpu shared
dependency

Fixes building errors in amd/common:

target C: libmesa_amd_common <= external/mesa/src/amd/common/ac_gpu_info.c
...
target C: libmesa_amd_common <= external/mesa/src/amd/common/ac_surface.c
...

external/mesa/src/amd/common/ac_gpu_info.h:31:10: fatal error:
'amdgpu.h' file not found
^
2 errors

Fixes: 98a2492 ("ac_surface: use radeon_info from ac_gpu_info")
---
src/amd/Android.common.mk | 3 +++
6 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/amd/Android.common.mk b/src/amd/Android.common.mk
index e3915b45bf..39d2732fd9 100644
--- a/src/amd/Android.common.mk
+++ b/src/amd/Android.common.mk
@@ -61,6 +61,9 @@ LOCAL_C_INCLUDES := \
LOCAL_EXPORT_C_INCLUDE_DIRS := \
$(LOCAL_PATH)/common

+LOCAL_SHARED_LIBRARIES := \
+ libdrm_amdgpu
+
LOCAL_STATIC_LIBRARIES := \
libmesa_nir
--
2.11.0
Emil Velikov
2017-06-17 17:46:14 UTC
Permalink
Raw Message
Post by Mauro Rossi
Post by Emil Velikov
Post by Mauro Rossi
Post by Emil Velikov
Hi Mauro,
There is a similar issue when building with autotools. There's a few
ways to address this so let's see what the devs prefer.
Another temporary workaround is to build radeonsi alongside the other
radeon drivers.
-Emil
Just FYI, I am already building radeonsi (target libmesa_pipe_radeonsi)
Mauro
...continuing the sentence so building radeonsi (even if not working because
llvm 3.8 in nougat)
is not a workaround the r% drivers building errors.
After commit 44b29dd "amd/common: add missing libdrm include path",
is there an alternative proposed solution for android building errors that
compares with submitted patch?
The patch mentioned is incomplete/wrong. Can you try "rev 3" of the
following series
https://patchwork.freedesktop.org/series/24960/
-Emil
Hi,
after rebase on top of 1f958c133 ("radeonsi: include ac_binary.h for
struct ac_shader_binary")
I still see residual building errors in amd/common
Please review the following patch.
Thanks
Mauro
From 6339dc99dc23f491cb1cce09b55d4013f6d0da63 Mon Sep 17 00:00:00 2001
Date: Sat, 20 May 2017 17:31:36 +0200
Subject: [PATCH] android: amd/common: fix libdrm_amdgpu shared
dependency
target C: libmesa_amd_common <= external/mesa/src/amd/common/ac_gpu_info.c
...
target C: libmesa_amd_common <= external/mesa/src/amd/common/ac_surface.c
...
'amdgpu.h' file not found
^
2 errors
Fixes: 98a2492 ("ac_surface: use radeon_info from ac_gpu_info")
---
src/amd/Android.common.mk | 3 +++
6 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/amd/Android.common.mk b/src/amd/Android.common.mk
index e3915b45bf..39d2732fd9 100644
--- a/src/amd/Android.common.mk
+++ b/src/amd/Android.common.mk
@@ -61,6 +61,9 @@ LOCAL_C_INCLUDES := \
LOCAL_EXPORT_C_INCLUDE_DIRS := \
$(LOCAL_PATH)/common
+LOCAL_SHARED_LIBRARIES := \
+ libdrm_amdgpu
+
Looks spot on - pushed to master. Thanks Mauro!

For the future please send patches via git send-email - the GMail MUI
badly changes the contents.
Any disposable comments can go after the --- line.

-Emil
Mauro Rossi
2017-06-17 17:54:27 UTC
Permalink
Raw Message
Post by Emil Velikov
Post by Mauro Rossi
Post by Emil Velikov
Post by Mauro Rossi
Post by Emil Velikov
Hi Mauro,
There is a similar issue when building with autotools. There's a few
ways to address this so let's see what the devs prefer.
Another temporary workaround is to build radeonsi alongside the other
radeon drivers.
-Emil
Just FYI, I am already building radeonsi (target libmesa_pipe_radeonsi)
Mauro
...continuing the sentence so building radeonsi (even if not working because
llvm 3.8 in nougat)
is not a workaround the r% drivers building errors.
After commit 44b29dd "amd/common: add missing libdrm include path",
is there an alternative proposed solution for android building errors that
compares with submitted patch?
The patch mentioned is incomplete/wrong. Can you try "rev 3" of the
following series
https://patchwork.freedesktop.org/series/24960/
-Emil
Hi,
after rebase on top of 1f958c133 ("radeonsi: include ac_binary.h for
struct ac_shader_binary")
I still see residual building errors in amd/common
Please review the following patch.
Thanks
Mauro
From 6339dc99dc23f491cb1cce09b55d4013f6d0da63 Mon Sep 17 00:00:00 2001
Date: Sat, 20 May 2017 17:31:36 +0200
Subject: [PATCH] android: amd/common: fix libdrm_amdgpu shared
dependency
target C: libmesa_amd_common <= external/mesa/src/amd/common/ac_gpu_info.c
...
target C: libmesa_amd_common <= external/mesa/src/amd/common/ac_surface.c
...
external/mesa/src/amd/common/ac_gpu_info.h:31:10: fatal error: 'amdgpu.h' file not found
^
2 errors
Fixes: 98a2492 ("ac_surface: use radeon_info from ac_gpu_info")
---
src/amd/Android.common.mk | 3 +++
6 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/amd/Android.common.mk b/src/amd/Android.common.mk
index e3915b45bf..39d2732fd9 100644
--- a/src/amd/Android.common.mk
+++ b/src/amd/Android.common.mk
@@ -61,6 +61,9 @@ LOCAL_C_INCLUDES := \
LOCAL_EXPORT_C_INCLUDE_DIRS := \
$(LOCAL_PATH)/common
+LOCAL_SHARED_LIBRARIES := \
+ libdrm_amdgpu
+
Looks spot on - pushed to master. Thanks Mauro!
For the future please send patches via git send-email - the GMail MUI
badly changes the contents.
Any disposable comments can go after the --- line.
-Emil
Ok,
BTW using "normal text mode" in sending (and "show original" in received)
it is possible to avoid gmail issues.
Mauro
Emil Velikov
2017-06-17 18:03:53 UTC
Permalink
Raw Message
Post by Mauro Rossi
Ok,
BTW using "normal text mode" in sending (and "show original" in received)
it is possible to avoid gmail issues.
Nope, from my experience :-(

-Emil

Loading...