Summary: | Latest git fails to compile with radeon | ||
---|---|---|---|
Product: | Mesa | Reporter: | John Dallahan <comeon> |
Component: | Drivers/Gallium/r600 | Assignee: | Default DRI bug account <dri-devel> |
Status: | RESOLVED FIXED | QA Contact: | Default DRI bug account <dri-devel> |
Severity: | major | ||
Priority: | medium | CC: | acelists, benjiwiebe14, comeon, public |
Version: | git | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Complete build log |
Description
John Dallahan
2017-05-25 16:47:20 UTC
Fixed by: commit 44b29dd7b6cdc1a3fde58c367b9de8081ac4167b Author: Eric Engestrom <eric.engestrom@imgtec.com> Date: Fri May 26 11:59:20 2017 +0100 amd/common: add missing libdrm include path *** Bug 101190 has been marked as a duplicate of this bug. *** drm from git doesn't provide amdgpu.h, but amdgpu_drm.h. (In reply to Pavel Vinogradov from comment #3) > drm from git doesn't provide amdgpu.h, but amdgpu_drm.h. It provides both: https://cgit.freedesktop.org/mesa/drm/tree/amdgpu/amdgpu.h https://cgit.freedesktop.org/mesa/drm/tree/include/drm/amdgpu_drm.h hm, strange. do I need to build amdgpu kms as well? for simple radeon hd 4650? (In reply to Alex Deucher from comment #4) > (In reply to Pavel Vinogradov from comment #3) > > drm from git doesn't provide amdgpu.h, but amdgpu_drm.h. > > It provides both: > https://cgit.freedesktop.org/mesa/drm/tree/amdgpu/amdgpu.h > https://cgit.freedesktop.org/mesa/drm/tree/include/drm/amdgpu_drm.h (In reply to Pavel Vinogradov from comment #5) > hm, strange. do I need to build amdgpu kms as well? for simple radeon hd > 4650? You don't need the amdgpu kernel driver. Sorry, I meant the amdgpu kms library in drm itself. (In reply to Alex Deucher from comment #6) > (In reply to Pavel Vinogradov from comment #5) > > hm, strange. do I need to build amdgpu kms as well? for simple radeon hd > > 4650? > > You don't need the amdgpu kernel driver. Thanks, fixed for me too. Created attachment 131547 [details]
Complete build log
This bug is still occurring with the latest git. I attached the complete build log. (In reply to Alex Deucher from comment #4) > (In reply to Pavel Vinogradov from comment #3) > > drm from git doesn't provide amdgpu.h, but amdgpu_drm.h. > > It provides both: > https://cgit.freedesktop.org/mesa/drm/tree/amdgpu/amdgpu.h > https://cgit.freedesktop.org/mesa/drm/tree/include/drm/amdgpu_drm.h libdrm only installs amdgpu.h in /usr/include/libdrm/ if it is compiled with amdgpu support. If libdrm is compiled with radeon support only, then /usr/include/libdrm/amdgpu_drm.h is installed only. Tested with x11-libs/libdrm-2.4.80::gentoo The bug is introduced in https://cgit.freedesktop.org/mesa/mesa/commit/?id=f187a493225e33c5ce514c731a0a140d61dacb0b This series [1] should address it properly although there's some contentious points around patch 2/5 [1] https://patchwork.freedesktop.org/series/24960/ works like a charm. thanks. (In reply to Emil Velikov from comment #12) > This series [1] should address it properly although there's some contentious > points around patch 2/5 > > [1] https://patchwork.freedesktop.org/series/24960/ For anyone wondering why patches have not been merged, yet. Patch 2/5 neuters the partial Opencl support in r600, in an attempt to untangle the convoluted dependencies. A few people are unhappy about it (understandably so) and I've not pushed the patches so that they can resolve this better. With this patch https://patchwork.freedesktop.org/patch/158696/ the build is broken for me now, not using radeon. Two issues: 1) when you remove amdgpu.h from ac_gpu_info.h, you need to (but didn't) add includes for stdint.h and stdbool.h. 2) I get the following error when compiling (after adding the stdint/stdbool includes): In file included from ../../../src/amd/common/ac_gpu_info.c:37:0: /usr/local/include/libdrm/amdgpu.h:107:31: error: conflicting types for ‘amdgpu_device_handle’ typedef struct amdgpu_device *amdgpu_device_handle; ^~~~~~~~~~~~~~~~~~~~ In file included from ../../../src/amd/common/ac_gpu_info.c:26:0: ../../../src/amd/common/ac_gpu_info.h:39:16: note: previous declaration of ‘amdgpu_device_handle’ was here typedef void * amdgpu_device_handle; ^~~~~~~~~~~~~~~~~~~~ And then a few more compiler warnings/errors that I believe tie into the above one and will be resolved when the above is resolved. try current git, the patchset was applied there smoothly. (In reply to Benji Wiebe from comment #15) > With this patch https://patchwork.freedesktop.org/patch/158696/ the build is > broken for me now, not using radeon. Two issues: 1) when you remove amdgpu.h > from ac_gpu_info.h, you need to (but didn't) add includes for stdint.h and > stdbool.h. 2) I get the following error when compiling (after adding the > stdint/stdbool includes): > > In file included from ../../../src/amd/common/ac_gpu_info.c:37:0: > /usr/local/include/libdrm/amdgpu.h:107:31: error: conflicting types for > ‘amdgpu_device_handle’ > typedef struct amdgpu_device *amdgpu_device_handle; > ^~~~~~~~~~~~~~~~~~~~ > In file included from ../../../src/amd/common/ac_gpu_info.c:26:0: > ../../../src/amd/common/ac_gpu_info.h:39:16: note: previous declaration of > ‘amdgpu_device_handle’ was here > typedef void * amdgpu_device_handle; > ^~~~~~~~~~~~~~~~~~~~ > > > > And then a few more compiler warnings/errors that I believe tie into the > above one and will be resolved when the above is resolved. (In reply to Pavel Vinogradov from comment #16) > try current git, the patchset was applied there smoothly. Yes, I tried current git. I did a git bisect and it pointed to that patch I linked. I've also tried current git as of 1:30 AM CDT, still no go. Tomorrow if you haven't gotten it figured out yet I can start up a VM and do a completely fresh build (though to the best of my knowledge this was fresh too, I deleted the build dir first). Hi, with current patch "ac: remove amdgpu.h dependency" applied, on Android (nougat-x86) I get the following building errors: In file included from external/mesa/src/amd/common/ac_gpu_info.c:26: external/mesa/src/amd/common/ac_gpu_info.h:41:2: error: unknown type name 'uint32_t' uint32_t pci_domain; ^ external/mesa/src/amd/common/ac_gpu_info.h:42:2: error: unknown type name 'uint32_t' uint32_t pci_bus; ^ external/mesa/src/amd/common/ac_gpu_info.h:43:2: error: unknown type name 'uint32_t' uint32_t pci_dev; ^ external/mesa/src/amd/common/ac_gpu_info.h:44:2: error: unknown type name 'uint32_t' uint32_t pci_func; ^ external/mesa/src/amd/common/ac_gpu_info.h:47:2: error: unknown type name 'uint32_t' uint32_t pci_id; ^ external/mesa/src/amd/common/ac_gpu_info.h:50:2: error: unknown type name 'uint32_t' uint32_t pte_fragment_size; ^ external/mesa/src/amd/common/ac_gpu_info.h:51:2: error: unknown type name 'uint32_t' uint32_t gart_page_size; ^ external/mesa/src/amd/common/ac_gpu_info.h:52:2: error: unknown type name 'uint64_t' uint64_t gart_size; ^ external/mesa/src/amd/common/ac_gpu_info.h:53:2: error: unknown type name 'uint64_t' uint64_t vram_size; ^ external/mesa/src/amd/common/ac_gpu_info.h:54:2: error: unknown type name 'uint64_t' uint64_t vram_vis_size; ^ external/mesa/src/amd/common/ac_gpu_info.h:55:2: error: unknown type name 'uint64_t' uint64_t max_alloc_size; ^ external/mesa/src/amd/common/ac_gpu_info.h:56:2: error: unknown type name 'uint32_t' uint32_t min_alloc_size; ^ external/mesa/src/amd/common/ac_gpu_info.h:57:2: error: unknown type name 'bool' bool has_dedicated_vram; ^ external/mesa/src/amd/common/ac_gpu_info.h:58:2: error: unknown type name 'bool' bool has_virtual_memory; ^ external/mesa/src/amd/common/ac_gpu_info.h:59:2: error: unknown type name 'bool' bool gfx_ib_pad_with_type2; ^ external/mesa/src/amd/common/ac_gpu_info.h:60:2: error: unknown type name 'bool' bool has_hw_decode; ^ external/mesa/src/amd/common/ac_gpu_info.h:61:2: error: unknown type name 'uint32_t' uint32_t num_sdma_rings; ^ external/mesa/src/amd/common/ac_gpu_info.h:62:2: error: unknown type name 'uint32_t' uint32_t num_compute_rings; ^ external/mesa/src/amd/common/ac_gpu_info.h:63:2: error: unknown type name 'uint32_t' uint32_t uvd_fw_version; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. The following changes are necessary in src/amd/common/ac_gpu_info.h utente@utente-System-Product-Name:~/nougat-x86/external/mesa$ git diff diff --git a/src/amd/common/ac_gpu_info.h b/src/amd/common/ac_gpu_info.h index a72ab58f9a..616a1df7fa 100644 --- a/src/amd/common/ac_gpu_info.h +++ b/src/amd/common/ac_gpu_info.h @@ -26,6 +26,9 @@ #ifndef AC_GPU_INFO_H #define AC_GPU_INFO_H +#include <stdint.h> +#include <stdbool.h> + #include "amd_family.h" #ifdef __cplusplus Having applied that I still get the following build error: In file included from external/mesa/src/amd/common/ac_surface.c:38: external/libdrm/amdgpu/amdgpu.h:107:31: error: typedef redefinition with different types ('struct amdgpu_device *' vs 'void *') typedef struct amdgpu_device *amdgpu_device_handle; ^ 1 error generated. Could you please check on the latter and provide corrective patch? I am available to test build on nougat-x86 Thanks Mauro The issues should be resolved in master, as of commit 1f958c1337290b4062a77f79fc101bb9f4bdf515 (origin/master, origin/HEAD) Author: Emil Velikov <emil.velikov@collabora.com> Date: Fri Jun 16 19:53:50 2017 +0100 radeonsi: include ac_binary.h for struct ac_shader_binary For seemingly unrelated build issues, please file a separate report. Yes this fixes it for me now. Thanks. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.