GPUOpen-Tools / radeon_gpu_analyzer

The Radeon GPU Analyzer (RGA) is an offline compiler and code analysis tool for Vulkan, DirectX, OpenGL, and OpenCL.
MIT License
412 stars 53 forks source link

compilation error on Ubuntu 18.04.03 LTS #57

Open pemgithub opened 4 years ago

pemgithub commented 4 years ago

I followed README.md "Building on Ubuntu". To install qt, I ran (sudo apt-get install qtbase5-dev). README.md says to use Qt 5.9.2, so next I will try installing from http://download.qt.io/official_releases/qt/5.9/5.9.2/ -> qt-opensource-linux-x64-5.9.2.run. However, my make errors seem unrelated to Qt.

$ cd ~/pemCode/GPUOpen/RGA/Build $ ./Prebuild.sh --vk-include /usr/include/vulkan/ --vk-lib /usr/lib/x86_64-linux-gnu $ cd Linux/Make/Build $ make

[ 25%] Building CXX object Core/Vulkan/Backend/CMakeFiles/VulkanBackend.dir/__/__/__/Utils/Vulkan/Src/rgPsoSerializerVulkan.cpp.o
In file included from /home/pemgithub/pemCode/GPUOpen/RGA/Utils/Vulkan/Src/rgPsoSerializerVulkan.cpp:6:0:
/home/pemgithub/pemCode/GPUOpen/RGA/Core/Vulkan/Backend/../../../../Common/Lib/Ext/json/json-3.2.0/single_include/nlohmann/json.hpp:1:1: error: expected unqualified-id before ‘<’ token
 <HTML><HEAD>
 ^
In file included from /usr/include/c++/7/vector:63:0,
                 from /home/pemgithub/pemCode/GPUOpen/RGA/Core/Vulkan/Backend/../../../../RGA/Utils/Vulkan/Include/rgPipelineTypes.h:4,
                 from /home/pemgithub/pemCode/GPUOpen/RGA/Core/Vulkan/Backend/../../../../RGA/Utils/Vulkan/Include/rgPsoSerializerVulkan.h:7,
                 from /home/pemgithub/pemCode/GPUOpen/RGA/Utils/Vulkan/Src/rgPsoSerializerVulkan.cpp:7:
/usr/include/c++/7/bits/stl_uninitialized.h: In static member function ‘static _ForwardIterator std::__uninitialized_copy<_TrivialValueTypes>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator)’:
/usr/include/c++/7/bits/stl_uninitialized.h:83:8: error: ‘_Construct’ is not a member of ‘std’
   std::_Construct(std::__addressof(*__cur), *__first);
        ^~~~~~~~~~
/usr/include/c++/7/bits/stl_uninitialized.h:88:13: error: ‘_Destroy’ is not a member of ‘std’
        std::_Destroy(__result, __cur);
             ^~~~~~~~
/usr/include/c++/7/bits/stl_uninitialized.h: In static member function ‘static void std::__uninitialized_fill<_TrivialValueType>::__uninit_fill(_ForwardIterator, _ForwardIterator, const _Tp&)’:
/usr/include/c++/7/bits/stl_uninitialized.h:150:8: error: ‘_Construct’ is not a member of ‘std’
   std::_Construct(std::__addressof(*__cur), __x);
pemgithub commented 4 years ago

Update: I installed (http://download.qt.io/official_releases/qt/5.9/5.9.2/ -> qt-opensource-linux-x64-5.9.2.run) to ~/pemInstalls, then I tried (./Prebuild.sh --vk-include /usr/include/vulkan/ --vk-lib /usr/lib/x86_64-linux-gnu --qt ~/pemInstalls/Qt5.9.2/5.9.2/gcc_64) (cd Linux/Make/Debug/) (make). I get the same errors during make.

$ make
[  2%] Built target AMDTBaseTools
[ 18%] Built target AMDTOSWrappers
[ 25%] Built target RadeonGPUAnalyzerBackend
[ 25%] Built target DeviceInfoLib
[ 25%] Building CXX object Core/Vulkan/Backend/CMakeFiles/VulkanBackend.dir/__/__/__/Utils/Vulkan/Src/rgPsoSerializerVulkan.cpp.o
In file included from /home/pemgithub/pemCode/GPUOpen/RGA/Utils/Vulkan/Src/rgPsoSerializerVulkan.cpp:6:0:
/home/pemgithub/pemCode/GPUOpen/RGA/Core/Vulkan/Backend/../../../../Common/Lib/Ext/json/json-3.2.0/single_include/nlohmann/json.hpp:1:1: error: expected unqualified-id before ‘<’ token
 <HTML><HEAD>
 ^
In file included from /usr/include/c++/7/vector:63:0,
                 from /home/pemgithub/pemCode/GPUOpen/RGA/Core/Vulkan/Backend/../../../../RGA/Utils/Vulkan/Include/rgPipelineTypes.h:4,
                 from /home/pemgithub/pemCode/GPUOpen/RGA/Core/Vulkan/Backend/../../../../RGA/Utils/Vulkan/Include/rgPsoSerializerVulkan.h:7,
                 from /home/pemgithub/pemCode/GPUOpen/RGA/Utils/Vulkan/Src/rgPsoSerializerVulkan.cpp:7:
/usr/include/c++/7/bits/stl_uninitialized.h: In static member function ‘static _ForwardIterator std::__uninitialized_copy<_TrivialValueTypes>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator)’:
/usr/include/c++/7/bits/stl_uninitialized.h:83:8: error: ‘_Construct’ is not a member of ‘std’
   std::_Construct(std::__addressof(*__cur), *__first);
        ^~~~~~~~~~
/usr/include/c++/7/bits/stl_uninitialized.h:88:13: error: ‘_Destroy’ is not a member of ‘std’
        std::_Destroy(__result, __cur);
             ^~~~~~~~
/usr/include/c++/7/bits/stl_uninitialized.h: In static member function ‘static void std::__uninitialized_fill<_TrivialValueType>::__uninit_fill(_ForwardIterator, _ForwardIterator, const _Tp&)’:
/usr/include/c++/7/bits/stl_uninitialized.h:150:8: error: ‘_Construct’ is not a member of ‘std’
   std::_Construct(std::__addressof(*__cur), __x);
        ^~~~~~~~~~
/usr/include/c++/7/bits/stl_uninitialized.h:154:13: error: ‘_Destroy’ is not a member of ‘std’
        std::_Destroy(__first, __cur);
pemgithub commented 4 years ago

Update: I tried the manual variation described in README.md (instead of running Prebuild.sh):

$ cd Build
$ python3 FetchDependencies.py
$ cd ..
$ mkdir _build
$ cd _build
$ cmake -DCMAKE_BUILD_TYPE=Release ../
$ make

I get the same errors.

pemgithub commented 4 years ago

verified I'm using "gcc 4.7.2 or later" per README.md:

$ gcc --version
gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
AmitBM commented 4 years ago

Hi pemgithub, What version of the Vulkan SDK are you using?