GPUOpen-Tools / radeon_compute_profiler

The Radeon Compute Profiler (RCP) is a performance analysis tool that gathers data from the API run-time and GPU for OpenCL™ and ROCm/HSA applications. This information can be used by developers to discover bottlenecks in the application and to find ways to optimize the application's performance.
MIT License
84 stars 19 forks source link

Build failure in AMDTActivityLoggerProfileControl.cpp #37

Open baryluk opened 4 years ago

baryluk commented 4 years ago
...
g++ -o /home/user/Common/Src/AMDTActivityLogger/AMDTActivityLoggerProfileControl.os -c -fPIC -Wall -Werror -Wextra -g -fmessage-length=0 -Wno-unknown-pragmas -pthread -std=c++11 -D_LINUX -Wno-expansion-to-defined -Wno-ignored-attributes -Wno-implicit-fallthrough -O3 -DNDEBUG -fvisibility=hidden -Wno-maybe-uninitialized -DAMDT_PUBLIC -std=c++11 -fno-strict-aliasing -D_LINUX -DAMDT_BUILD_SUFFIX= -DAMDT_DEBUG_SUFFIX= -I/home/user/Common/Src/AMDTActivityLogger -I/home/user/Common/Src -I/home/user/Common/Src/TSingleton -I/home/user/Common/Lib/Ext/utf8cpp/source -I/home/user/Common/Src /home/user/Common/Src/AMDTActivityLogger/AMDTActivityLoggerProfileControl.cpp
/home/user/Common/Src/AMDTActivityLogger/AMDTActivityLoggerProfileControl.cpp: In member function 'bool AMDTActivityLoggerProfileControl::CallProfileControlEntryPointFromLibraryWithMode(void*&, const wchar_t*, void (*&)(amdtProfilingControlMode), const char*, amdtProfilingControlMode)':
/home/user/Common/Src/AMDTActivityLogger/AMDTActivityLoggerProfileControl.cpp:176:98: error: cast between incompatible function types from 'osProcedureAddress' {aka 'int (*)()'} to 'ProfilingControlProcWithMode' {aka 'void (*)(amdtProfilingControlMode)'} [-Werror=cast-function-type]
  176 |                 profilingControlProc = reinterpret_cast<ProfilingControlProcWithMode>(procAddress);
      |                                                                                                  ^
cc1plus: all warnings being treated as errors
scons: *** [/home/user/Common/Src/AMDTActivityLogger/AMDTActivityLoggerProfileControl.os] Error 1
scons: building terminated because of errors.
$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 9.3.0-13' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-F9gimE/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-mutex
Thread model: posix
gcc version 9.3.0 (Debian 9.3.0-13) 
Innomi commented 4 years ago

Duplication of https://github.com/GPUOpen-Tools/radeon_compute_profiler/issues/28 Also, have a look at https://github.com/GPUOpen-Tools/radeon_compute_profiler/issues/31 Especially, https://github.com/justxi/rocm/blob/master/dev-util/rcp/files/RCP-5.6-Common_Src_AMDTActivityLogger_SConscript.patch