Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build error on Ubuntu 18.04.03 LTS #45

Closed
pemgithub opened this issue Nov 14, 2019 · 2 comments
Closed

build error on Ubuntu 18.04.03 LTS #45

pemgithub opened this issue Nov 14, 2019 · 2 comments

Comments

@pemgithub
Copy link

I ran the following:

python PreBuild.py 
cd CMakeBuild/x64/debug
make

I get build errors including:

[ 73%] Linking CXX shared library ../../../../../Output/release/libGPUPerfAPIGL.so
[ 73%] Built target GPUPerfAPIGL
Scanning dependencies of target GPUPerfAPIVK
[ 73%] Building CXX object Src/GPUPerfAPIVk/CMakeFiles/GPUPerfAPIVK.dir/VkCommandListSwQueries.cpp.o
In file included from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkIncludes.h:19:0,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkSoftwareCountersResults.h:11,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkCommandListSWQueryGroup.h:12,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkCommandListSwQueries.h:13,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkCommandListSwQueries.cpp:9:
/home/pemgithub/pemCode/GPUOpen/GPA/../Common/Src/AmdVkExt/vk_amd_shader_core_properties2.h:59:16: error: redefinition of ‘struct VkPhysicalDeviceShaderCoreProperties2AMD’
 typedef struct VkPhysicalDeviceShaderCoreProperties2AMD {
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/vulkan/vulkan.h:21:0,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkIncludes.h:11,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkSoftwareCountersResults.h:11,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkCommandListSWQueryGroup.h:12,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkCommandListSwQueries.h:13,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkCommandListSwQueries.cpp:9:
/usr/include/vulkan/vulkan_core.h:9569:16: note: previous definition of ‘struct VkPhysicalDeviceShaderCoreProperties2AMD’
 typedef struct VkPhysicalDeviceShaderCoreProperties2AMD {
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkIncludes.h:19:0,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkSoftwareCountersResults.h:11,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkCommandListSWQueryGroup.h:12,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkCommandListSwQueries.h:13,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkCommandListSwQueries.cpp:9:
/home/pemgithub/pemCode/GPUOpen/GPA/../Common/Src/AmdVkExt/vk_amd_shader_core_properties2.h:64:3: error: conflicting declaration ‘typedef int VkPhysicalDeviceShaderCoreProperties2AMD’
 } VkPhysicalDeviceShaderCoreProperties2AMD;
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/vulkan/vulkan.h:21:0,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkIncludes.h:11,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkSoftwareCountersResults.h:11,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkCommandListSWQueryGroup.h:12,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkCommandListSwQueries.h:13,
                 from /home/pemgithub/pemCode/GPUOpen/GPA/Src/GPUPerfAPIVk/VkCommandListSwQueries.cpp:9:
/usr/include/vulkan/vulkan_core.h:9574:3: note: previous declaration as ‘typedef struct VkPhysicalDeviceShaderCoreProperties2AMD VkPhysicalDeviceShaderCoreProperties2AMD’
 } VkPhysicalDeviceShaderCoreProperties2AMD;
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Src/GPUPerfAPIVk/CMakeFiles/GPUPerfAPIVK.dir/build.make:62: recipe for target 'Src/GPUPerfAPIVk/CMakeFiles/GPUPerfAPIVK.dir/VkCommandListSwQueries.cpp.o' failed
make[2]: *** [Src/GPUPerfAPIVk/CMakeFiles/GPUPerfAPIVK.dir/VkCommandListSwQueries.cpp.o] Error 1
CMakeFiles/Makefile2:420: recipe for target 'Src/GPUPerfAPIVk/CMakeFiles/GPUPerfAPIVK.dir/all' failed
make[1]: *** [Src/GPUPerfAPIVk/CMakeFiles/GPUPerfAPIVK.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
@pemgithub
Copy link
Author

My issue was an incompatibility with the latest Vulkan SDK on Ubuntu 18.04.03 LTS.

GPUOpen/GPA/Src/GPUPerfAPIVk/VkIncludes.h includes <vulkan/vulkan.h> and <vk_amd_shader_core_properties2.h>.
GPUOpen/Common/Src/AmdVkExt/vk_amd_shader_core_properties2.h defines struct VkPhysicalDeviceShaderCoreProperties2AMD.
However, struct VkPhysicalDeviceShaderCoreProperties2AMD is already defined in /usr/include/vulkan/vulkan_core.h (from Vulkan SDK).

As a workaround, I commented out VkPhysicalDeviceShaderCoreProperties2AMD definition in vk_amd_shader_core_properties2.h. From vk_amd_shader_core_properties2.h:

* @brief Temporary internal header for shader core properties2. Should be removed once the extension is published
*        and the API gets included in the official Vulkan header.

@PLohrmannAMD
Copy link
Contributor

Thank you for reporting this issue. It was resolved in GPA v3.5 released in December 2019.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants