Discussion:
[Mesa-dev] [PATCH] android: r600: fix libelf dependency
Mauro Rossi
2017-06-17 08:26:06 UTC
Permalink
Needed to avoid following building error:

external/mesa/src/gallium/drivers/r600/evergreen_compute.c:27:10:
fatal error: 'gelf.h' file not found
^
1 error generated.

Fixes: d96a210842 ("r600g,compute: provide local copy of functions from ac_binary.c")
---
src/gallium/drivers/r600/Android.mk | 3 +++
1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/r600/Android.mk b/src/gallium/drivers/r600/Android.mk
index e1b0e986e1..ada2a7d4fa 100644
--- a/src/gallium/drivers/r600/Android.mk
+++ b/src/gallium/drivers/r600/Android.mk
@@ -45,6 +45,9 @@ $(intermediates)/egd_tables.h: $(MESA_TOP)/src/gallium/drivers/r600/egd_tables.p
@echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
$(hide) $(MESA_PYTHON2) $(MESA_TOP)/src/gallium/drivers/r600/egd_tables.py $(MESA_TOP)/src/gallium/drivers/r600/evergreend.h > $@

+LOCAL_WHOLE_STATIC_LIBRARIES := \
+ libelf
+
include $(GALLIUM_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
--
2.11.0
Jan Vesely
2017-06-17 08:45:53 UTC
Permalink
Post by Mauro Rossi
fatal error: 'gelf.h' file not found
^
1 error generated.
Fixes: d96a210842 ("r600g,compute: provide local copy of functions from ac_binary.c")
Does wrapping the includes in ifdef HAVE_OPENCL fix the problem as
well?
configuration without opencl should be OK without libelf (we should do
that for automake build as well).

Jan
Post by Mauro Rossi
---
src/gallium/drivers/r600/Android.mk | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/gallium/drivers/r600/Android.mk b/src/gallium/drivers/r600/Android.mk
index e1b0e986e1..ada2a7d4fa 100644
--- a/src/gallium/drivers/r600/Android.mk
+++ b/src/gallium/drivers/r600/Android.mk
@@ -45,6 +45,9 @@ $(intermediates)/egd_tables.h: $(MESA_TOP)/src/gallium/drivers/r600/egd_tables.p
@echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
+LOCAL_WHOLE_STATIC_LIBRARIES := \
+ libelf
+
include $(GALLIUM_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
--
Jan Vesely <***@rutgers.edu>
Mauro Rossi
2017-06-17 11:59:21 UTC
Permalink
Post by Jan Vesely
Post by Mauro Rossi
fatal error: 'gelf.h' file not found
^
1 error generated.
Fixes: d96a210842 ("r600g,compute: provide local copy of functions from ac_binary.c")
Does wrapping the includes in ifdef HAVE_OPENCL fix the problem as
well?
configuration without opencl should be OK without libelf (we should do
that for automake build as well).
Jan
Correct,

Emil's "r600: include libelf headers only as needed" fixes the issue

Thanks
Post by Jan Vesely
Post by Mauro Rossi
---
src/gallium/drivers/r600/Android.mk | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/gallium/drivers/r600/Android.mk b/src/gallium/drivers/r600/Android.mk
index e1b0e986e1..ada2a7d4fa 100644
--- a/src/gallium/drivers/r600/Android.mk
+++ b/src/gallium/drivers/r600/Android.mk
@@ -45,6 +45,9 @@ $(intermediates)/egd_tables.h: $(MESA_TOP)/src/gallium/drivers/r600/egd_tables.p
@echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
+LOCAL_WHOLE_STATIC_LIBRARIES := \
+ libelf
+
include $(GALLIUM_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
--
Loading...