ROCm / ROCR-Runtime

ROCm Platform Runtime: ROCr a HPC market enhanced HSA based runtime
https://rocm.docs.amd.com/projects/ROCR-Runtime/en/latest/
Other
224 stars 109 forks source link

Build fails with LTO #182

Open eli-schwartz opened 8 months ago

eli-schwartz commented 8 months ago

I tried to build with the following *FLAGS to optimize the build: -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing

Note the -Werror=* flags are used to help detect cases where the compiler tries to optimize by assuming UB cannot exist in the source code -- if it does exist, ordinarily the code would be miscompiled, and this says to make the miscompilation a fatal error.

I got this error:

FAILED: libhsa-runtime64.so.1.11.0 
: && /usr/bin/x86_64-pc-linux-gnu-g++ -fPIC -march=native -fstack-protector-all -O2 -pipe -fdiagnostics-color=always -frecord-gcc-switches -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-clash-protection -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing  -Wformat -Werror=format-security -DNDEBUG  -Wl,-O1 -Wl,--as-needed -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wl,--defsym=__gentoo_check_ldflags__=0  -Wl,-Bdynamic -Wl,-z,noexecstack -Wl,/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/hsacore.so.link -Wl,--version-script=/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/hsacore.so.def -Wl,--enable-new-dtags -shared -Wl,-soname,libhsa-runtime64.so.1 -o libhsa-runtime64.so.1.11.0 CMakeFiles/hsa-runtime64.dir/core/util/lnx/os_linux.cpp.o CMakeFiles/hsa-runtime64.dir/core/util/small_heap.cpp.o CMakeFiles/hsa-runtime64.dir/core/util/timer.cpp.o CMakeFiles/hsa-runtime64.dir/core/util/flag.cpp.o CMakeFiles/hsa-runtime64.dir/core/runtime/amd_blit_kernel.cpp.o CMakeFiles/hsa-runtime64.dir/core/runtime/amd_blit_sdma.cpp.o CMakeFiles/hsa-runtime64.dir/core/runtime/amd_cpu_agent.cpp.o CMakeFiles/hsa-runtime64.dir/core/runtime/amd_gpu_agent.cpp.o CMakeFiles/hsa-runtime64.dir/core/runtime/amd_hsa_loader.cpp.o CMakeFiles/hsa-runtime64.dir/core/runtime/amd_aql_queue.cpp.o CMakeFiles/hsa-runtime64.dir/core/runtime/amd_loader_context.cpp.o CMakeFiles/hsa-runtime64.dir/core/runtime/hsa_ven_amd_loader.cpp.o CMakeFiles/hsa-runtime64.dir/core/runtime/amd_memory_region.cpp.o CMakeFiles/hsa-runtime64.dir/core/runtime/amd_filter_device.cpp.o CMakeFiles/hsa-runtime64.dir/core/runtime/amd_topology.cpp.o CMakeFiles/hsa-runtime64.dir/core/runtime/default_signal.cpp.o CMakeFiles/hsa-runtime64.dir/core/runtime/host_queue.cpp.o CMakeFiles/hsa-runtime64.dir/core/runtime/hsa.cpp.o CMakeFiles/hsa-runtime64.dir/core/runtime/hsa_api_trace.cpp.o CMakeFiles/hsa-runtime64.dir/core/runtime/hsa_ext_amd.cpp.o CMakeFiles/hsa-runtime64.dir/core/runtime/hsa_ext_interface.cpp.o CMakeFiles/hsa-runtime64.dir/core/runtime/interrupt_signal.cpp.o CMakeFiles/hsa-runtime64.dir/core/runtime/intercept_queue.cpp.o CMakeFiles/hsa-runtime64.dir/core/runtime/ipc_signal.cpp.o CMakeFiles/hsa-runtime64.dir/core/runtime/isa.cpp.o CMakeFiles/hsa-runtime64.dir/core/runtime/runtime.cpp.o CMakeFiles/hsa-runtime64.dir/core/runtime/signal.cpp.o CMakeFiles/hsa-runtime64.dir/core/runtime/queue.cpp.o CMakeFiles/hsa-runtime64.dir/core/runtime/cache.cpp.o CMakeFiles/hsa-runtime64.dir/core/runtime/svm_profiler.cpp.o CMakeFiles/hsa-runtime64.dir/core/common/shared.cpp.o CMakeFiles/hsa-runtime64.dir/core/common/hsa_table_interface.cpp.o CMakeFiles/hsa-runtime64.dir/loader/executable.cpp.o CMakeFiles/hsa-runtime64.dir/libamdhsacode/amd_elf_image.cpp.o CMakeFiles/hsa-runtime64.dir/libamdhsacode/amd_hsa_code_util.cpp.o CMakeFiles/hsa-runtime64.dir/libamdhsacode/amd_hsa_locks.cpp.o CMakeFiles/hsa-runtime64.dir/libamdhsacode/amd_options.cpp.o CMakeFiles/hsa-runtime64.dir/libamdhsacode/amd_hsa_code.cpp.o CMakeFiles/hsa-runtime64.dir/image/addrlib/src/addrinterface.cpp.o CMakeFiles/hsa-runtime64.dir/image/addrlib/src/core/coord.cpp.o CMakeFiles/hsa-runtime64.dir/image/addrlib/src/core/addrlib.cpp.o CMakeFiles/hsa-runtime64.dir/image/addrlib/src/core/addrlib1.cpp.o CMakeFiles/hsa-runtime64.dir/image/addrlib/src/core/addrlib2.cpp.o CMakeFiles/hsa-runtime64.dir/image/addrlib/src/core/addrobject.cpp.o CMakeFiles/hsa-runtime64.dir/image/addrlib/src/core/addrelemlib.cpp.o CMakeFiles/hsa-runtime64.dir/image/addrlib/src/r800/ciaddrlib.cpp.o CMakeFiles/hsa-runtime64.dir/image/addrlib/src/r800/egbaddrlib.cpp.o CMakeFiles/hsa-runtime64.dir/image/addrlib/src/r800/siaddrlib.cpp.o CMakeFiles/hsa-runtime64.dir/image/addrlib/src/gfx9/gfx9addrlib.cpp.o CMakeFiles/hsa-runtime64.dir/image/addrlib/src/gfx10/gfx10addrlib.cpp.o CMakeFiles/hsa-runtime64.dir/image/addrlib/src/gfx11/gfx11addrlib.cpp.o CMakeFiles/hsa-runtime64.dir/image/device_info.cpp.o CMakeFiles/hsa-runtime64.dir/image/hsa_ext_image.cpp.o CMakeFiles/hsa-runtime64.dir/image/image_runtime.cpp.o CMakeFiles/hsa-runtime64.dir/image/image_manager.cpp.o CMakeFiles/hsa-runtime64.dir/image/image_manager_kv.cpp.o CMakeFiles/hsa-runtime64.dir/image/image_manager_ai.cpp.o CMakeFiles/hsa-runtime64.dir/image/image_manager_nv.cpp.o CMakeFiles/hsa-runtime64.dir/image/image_manager_gfx11.cpp.o CMakeFiles/hsa-runtime64.dir/image/image_lut_kv.cpp.o CMakeFiles/hsa-runtime64.dir/image/image_lut_gfx11.cpp.o CMakeFiles/hsa-runtime64.dir/image/blit_object_gfx7xx.cpp.o CMakeFiles/hsa-runtime64.dir/image/blit_object_gfx8xx.cpp.o CMakeFiles/hsa-runtime64.dir/image/blit_object_gfx9xx.cpp.o CMakeFiles/hsa-runtime64.dir/image/blit_kernel.cpp.o CMakeFiles/hsa-runtime64.dir/image/blit_src/opencl_blit_objects.cpp.o  /usr/lib64/libhsakmt.so.1.0.6  /usr/lib64/libelf.so  -ldl  -lpthread  -lrt  /usr/lib64/libdrm.so && :
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:287:10: error: type ‘struct <anon>’ violates the C++ One Definition Rule [-Werror=odr]
  287 |   struct {
      |          ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:304:16: note: a different type is defined in another translation unit
  304 |         struct {
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:289:18: note: the first difference of corresponding definitions is field ‘meta_data_address’
  289 |     unsigned int meta_data_address : 32;
      |                  ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:306:44: note: a field with different name is defined in another translation unit
  306 |                 unsigned int               META_DATA_ADDRESS : 32;
      |                                            ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:286:7: error: type ‘union SQ_IMG_RSRC_WORD7’ violates the C++ One Definition Rule [-Werror=odr]
  286 | union SQ_IMG_RSRC_WORD7 {
      |       ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:303:15: note: a different type is defined in another translation unit
  303 |         union SQ_IMG_RSRC_WORD7 {
      |               ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:293:5: note: the first difference of corresponding definitions is field ‘bitfields’
  293 |   } bitfields, bits;
      |     ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:310:11: note: a field of same name but different type is defined in another translation unit
  310 |         } bitfields, bits;
      |           ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:287:10: note: type ‘struct <anon>’ itself violates the C++ One Definition Rule
  287 |   struct {
      |          ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:304:16: note: the incompatible type is defined here
  304 |         struct {
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:260:10: error: type ‘struct <anon>’ violates the C++ One Definition Rule [-Werror=odr]
  260 |   struct {
      |          ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:276:16: note: a different type is defined in another translation unit
  276 |         struct {
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:262:18: note: the first difference of corresponding definitions is field ‘min_lod_warn’
  262 |     unsigned int min_lod_warn : 12;
      |                  ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:278:49: note: a field with different name is defined in another translation unit
  278 |                 unsigned int                    MIN_LOD_WARN : 12;
      |                                                 ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:259:7: error: type ‘union SQ_IMG_RSRC_WORD6’ violates the C++ One Definition Rule [-Werror=odr]
  259 | union SQ_IMG_RSRC_WORD6 {
      |       ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:275:15: note: a different type is defined in another translation unit
  275 |         union SQ_IMG_RSRC_WORD6 {
      |               ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:280:5: note: the first difference of corresponding definitions is field ‘bitfields’
  280 |   } bitfields, bits;
      |     ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:296:11: note: a field of same name but different type is defined in another translation unit
  296 |         } bitfields, bits;
      |           ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:260:10: note: type ‘struct <anon>’ itself violates the C++ One Definition Rule
  260 |   struct {
      |          ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:276:16: note: the incompatible type is defined here
  276 |         struct {
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:243:10: error: type ‘struct <anon>’ violates the C++ One Definition Rule [-Werror=odr]
  243 |   struct {
      |          ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:250:16: note: a different type is defined in another translation unit
  250 |         struct {
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:245:18: note: the first difference of corresponding definitions is field ‘base_array’
  245 |     unsigned int base_array : 13;
      |                  ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:252:51: note: a field with different name is defined in another translation unit
  252 |                 unsigned int                      BASE_ARRAY : 13;
      |                                                   ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:242:7: error: type ‘union SQ_IMG_RSRC_WORD5’ violates the C++ One Definition Rule [-Werror=odr]
  242 | union SQ_IMG_RSRC_WORD5 {
      |       ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:249:15: note: a different type is defined in another translation unit
  249 |         union SQ_IMG_RSRC_WORD5 {
      |               ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:253:5: note: the first difference of corresponding definitions is field ‘bitfields’
  253 |   } bitfields, bits;
      |     ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:268:11: note: a field of same name but different type is defined in another translation unit
  268 |         } bitfields, bits;
      |           ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:243:10: note: type ‘struct <anon>’ itself violates the C++ One Definition Rule
  243 |   struct {
      |          ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:250:16: note: the incompatible type is defined here
  250 |         struct {
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:226:10: error: type ‘struct <anon>’ violates the C++ One Definition Rule [-Werror=odr]
  226 |   struct {
      |          ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:232:16: note: a different type is defined in another translation unit
  232 |         struct {
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:228:18: note: the first difference of corresponding definitions is field ‘depth’
  228 |     unsigned int depth : 13;
      |                  ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:234:56: note: a field with different name is defined in another translation unit
  234 |                 unsigned int                           DEPTH : 13;
      |                                                        ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:225:7: error: type ‘union SQ_IMG_RSRC_WORD4’ violates the C++ One Definition Rule [-Werror=odr]
  225 | union SQ_IMG_RSRC_WORD4 {
      |       ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:231:15: note: a different type is defined in another translation unit
  231 |         union SQ_IMG_RSRC_WORD4 {
      |               ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:236:5: note: the first difference of corresponding definitions is field ‘bitfields’
  236 |   } bitfields, bits;
      |     ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:242:11: note: a field of same name but different type is defined in another translation unit
  242 |         } bitfields, bits;
      |           ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:226:10: note: type ‘struct <anon>’ itself violates the C++ One Definition Rule
  226 |   struct {
      |          ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:232:16: note: the incompatible type is defined here
  232 |         struct {
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:193:10: error: type ‘struct <anon>’ violates the C++ One Definition Rule [-Werror=odr]
  193 |   struct {
      |          ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:202:16: note: a different type is defined in another translation unit
  202 |         struct {
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:195:18: note: the first difference of corresponding definitions is field ‘dst_sel_x’
  195 |     unsigned int dst_sel_x : 3;
      |                  ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:204:52: note: a field with different name is defined in another translation unit
  204 |                 unsigned int                       DST_SEL_X : 3;
      |                                                    ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:192:7: error: type ‘union SQ_IMG_RSRC_WORD3’ violates the C++ One Definition Rule [-Werror=odr]
  192 | union SQ_IMG_RSRC_WORD3 {
      |       ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:201:15: note: a different type is defined in another translation unit
  201 |         union SQ_IMG_RSRC_WORD3 {
      |               ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:219:5: note: the first difference of corresponding definitions is field ‘bitfields’
  219 |   } bitfields, bits;
      |     ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:224:11: note: a field of same name but different type is defined in another translation unit
  224 |         } bitfields, bits;
      |           ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:193:10: note: type ‘struct <anon>’ itself violates the C++ One Definition Rule
  193 |   struct {
      |          ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:202:16: note: the incompatible type is defined here
  202 |         struct {
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:174:10: error: type ‘struct <anon>’ violates the C++ One Definition Rule [-Werror=odr]
  174 |   struct {
      |          ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:182:16: note: a different type is defined in another translation unit
  182 |         struct {
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:176:18: note: the first difference of corresponding definitions is field ‘width’
  176 |     unsigned int width : 14;
      |                  ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:184:56: note: a field with different name is defined in another translation unit
  184 |                 unsigned int                           WIDTH : 14;
      |                                                        ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:173:7: error: type ‘union SQ_IMG_RSRC_WORD2’ violates the C++ One Definition Rule [-Werror=odr]
  173 | union SQ_IMG_RSRC_WORD2 {
      |       ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:181:15: note: a different type is defined in another translation unit
  181 |         union SQ_IMG_RSRC_WORD2 {
      |               ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:186:5: note: the first difference of corresponding definitions is field ‘bitfields’
  186 |   } bitfields, bits;
      |     ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:194:11: note: a field of same name but different type is defined in another translation unit
  194 |         } bitfields, bits;
      |           ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:174:10: note: type ‘struct <anon>’ itself violates the C++ One Definition Rule
  174 |   struct {
      |          ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:182:16: note: the incompatible type is defined here
  182 |         struct {
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:153:10: error: type ‘struct <anon>’ violates the C++ One Definition Rule [-Werror=odr]
  153 |   struct {
      |          ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:158:16: note: a different type is defined in another translation unit
  158 |         struct {
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:155:18: note: the first difference of corresponding definitions is field ‘base_address_hi’
  155 |     unsigned int base_address_hi : 8;
      |                  ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:160:46: note: a field with different name is defined in another translation unit
  160 |                 unsigned int                 BASE_ADDRESS_HI : 8;
      |                                              ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:152:7: error: type ‘union SQ_IMG_RSRC_WORD1’ violates the C++ One Definition Rule [-Werror=odr]
  152 | union SQ_IMG_RSRC_WORD1 {
      |       ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:157:15: note: a different type is defined in another translation unit
  157 |         union SQ_IMG_RSRC_WORD1 {
      |               ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:167:5: note: the first difference of corresponding definitions is field ‘bitfields’
  167 |   } bitfields, bits;
      |     ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:174:11: note: a field of same name but different type is defined in another translation unit
  174 |         } bitfields, bits;
      |           ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:153:10: note: type ‘struct <anon>’ itself violates the C++ One Definition Rule
  153 |   struct {
      |          ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:158:16: note: the incompatible type is defined here
  158 |         struct {
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:140:10: error: type ‘struct <anon>’ violates the C++ One Definition Rule [-Werror=odr]
  140 |   struct {
      |          ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:144:16: note: a different type is defined in another translation unit
  144 |         struct {
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:142:18: note: the first difference of corresponding definitions is field ‘base_address’
  142 |     unsigned int base_address : 32;
      |                  ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:146:49: note: a field with different name is defined in another translation unit
  146 |                 unsigned int                    BASE_ADDRESS : 32;
      |                                                 ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:139:7: error: type ‘union SQ_IMG_RSRC_WORD0’ violates the C++ One Definition Rule [-Werror=odr]
  139 | union SQ_IMG_RSRC_WORD0 {
      |       ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:143:15: note: a different type is defined in another translation unit
  143 |         union SQ_IMG_RSRC_WORD0 {
      |               ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:146:5: note: the first difference of corresponding definitions is field ‘bitfields’
  146 |   } bitfields, bits;
      |     ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:150:11: note: a field of same name but different type is defined in another translation unit
  150 |         } bitfields, bits;
      |           ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:140:10: note: type ‘struct <anon>’ itself violates the C++ One Definition Rule
  140 |   struct {
      |          ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:144:16: note: the incompatible type is defined here
  144 |         struct {
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:101:10: error: type ‘struct <anon>’ violates the C++ One Definition Rule [-Werror=odr]
  101 |   struct {
      |          ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:104:16: note: a different type is defined in another translation unit
  104 |         struct {
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:103:18: note: the first difference of corresponding definitions is field ‘dst_sel_x’
  103 |     unsigned int dst_sel_x : 3;
      |                  ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:106:52: note: a field with different name is defined in another translation unit
  106 |                 unsigned int                       DST_SEL_X : 3;
      |                                                    ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:100:7: error: type ‘union SQ_BUF_RSRC_WORD3’ violates the C++ One Definition Rule [-Werror=odr]
  100 | union SQ_BUF_RSRC_WORD3 {
      |       ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:103:15: note: a different type is defined in another translation unit
  103 |         union SQ_BUF_RSRC_WORD3 {
      |               ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:133:5: note: the first difference of corresponding definitions is field ‘bitfields’
  133 |   } bitfields, bits;
      |     ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:136:11: note: a field of same name but different type is defined in another translation unit
  136 |         } bitfields, bits;
      |           ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:101:10: note: type ‘struct <anon>’ itself violates the C++ One Definition Rule
  101 |   struct {
      |          ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:104:16: note: the incompatible type is defined here
  104 |         struct {
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:358:10: error: type ‘struct <anon>’ violates the C++ One Definition Rule [-Werror=odr]
  358 |   struct {
      |          ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:378:16: note: a different type is defined in another translation unit
  378 |         struct {
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:360:18: note: the first difference of corresponding definitions is field ‘lod_bias’
  360 |     unsigned int lod_bias : 14;
      |                  ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:380:53: note: a field with different name is defined in another translation unit
  380 |                 unsigned int                        LOD_BIAS : 14;
      |                                                     ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:357:7: error: type ‘union SQ_IMG_SAMP_WORD2’ violates the C++ One Definition Rule [-Werror=odr]
  357 | union SQ_IMG_SAMP_WORD2 {
      |       ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:377:15: note: a different type is defined in another translation unit
  377 |         union SQ_IMG_SAMP_WORD2 {
      |               ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:382:5: note: the first difference of corresponding definitions is field ‘bitfields’
  382 |   } bitfields, bits;
      |     ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:402:11: note: a field of same name but different type is defined in another translation unit
  402 |         } bitfields, bits;
      |           ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:358:10: note: type ‘struct <anon>’ itself violates the C++ One Definition Rule
  358 |   struct {
      |          ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:378:16: note: the incompatible type is defined here
  378 |         struct {
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:300:10: error: type ‘struct <anon>’ violates the C++ One Definition Rule [-Werror=odr]
  300 |   struct {
      |          ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:318:16: note: a different type is defined in another translation unit
  318 |         struct {
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:302:18: note: the first difference of corresponding definitions is field ‘clamp_x’
  302 |     unsigned int clamp_x : 3;
      |                  ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:320:54: note: a field with different name is defined in another translation unit
  320 |                 unsigned int                         CLAMP_X : 3;
      |                                                      ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:299:7: error: type ‘union SQ_IMG_SAMP_WORD0’ violates the C++ One Definition Rule [-Werror=odr]
  299 | union SQ_IMG_SAMP_WORD0 {
      |       ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:317:15: note: a different type is defined in another translation unit
  317 |         union SQ_IMG_SAMP_WORD0 {
      |               ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:332:5: note: the first difference of corresponding definitions is field ‘bitfields’
  332 |   } bitfields, bits;
      |     ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:350:11: note: a field of same name but different type is defined in another translation unit
  350 |         } bitfields, bits;
      |           ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:300:10: note: type ‘struct <anon>’ itself violates the C++ One Definition Rule
  300 |   struct {
      |          ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_ai.h:318:16: note: the incompatible type is defined here
  318 |         struct {
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:68:7: error: type ‘union SQ_BUF_RSRC_WORD1’ violates the C++ One Definition Rule [-Werror=odr]
   68 | union SQ_BUF_RSRC_WORD1 {
      |       ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_nv.h:97:7: note: a different type is defined in another translation unit
   97 | union SQ_BUF_RSRC_WORD1 {
      |       ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:81:5: note: the first difference of corresponding definitions is field ‘bitfields’
   81 |   } bitfields, bits;
      |     ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_nv.h:98:23: note: a field of same name but different type is defined in another translation unit
   98 |   sq_buf_rsrc_word1_t bitfields, bits, f;
      |                       ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_kv.h:69:10: note: type name ‘rocr::image::SQ_BUF_RSRC_WORD1::{unnamed type#1}’ should match type name ‘rocr::image::sq_buf_rsrc_word1_t’
   69 |   struct {
      |          ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_nv.h:83:8: note: the incompatible type is defined here
   83 | struct sq_buf_rsrc_word1_t {
      |        ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_nv.h:136:8: error: type ‘struct sq_buf_rsrc_word3_t’ violates the C++ One Definition Rule [-Werror=odr]
  136 | struct sq_buf_rsrc_word3_t {
      |        ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_gfx11.h:135:8: note: a different type is defined in another translation unit
  135 | struct sq_buf_rsrc_word3_t {
      |        ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_nv.h:142:16: note: the first difference of corresponding definitions is field ‘FORMAT’
  142 |   unsigned int FORMAT         : SQ_BUF_RSC_WRD3_FORMAT_SZ;
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_gfx11.h:141:16: note: a field of same name but different type is defined in another translation unit
  141 |   unsigned int FORMAT         : SQ_BUF_RSC_WRD3_FORMAT_SZ;
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_nv.h:83:8: error: type ‘struct sq_buf_rsrc_word1_t’ violates the C++ One Definition Rule [-Werror=odr]
   83 | struct sq_buf_rsrc_word1_t {
      |        ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_gfx11.h:85:8: note: a different type is defined in another translation unit
   85 | struct sq_buf_rsrc_word1_t {
      |        ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_nv.h:87:16: note: the first difference of corresponding definitions is field ‘CACHE_SWIZZLE’
   87 |   unsigned int CACHE_SWIZZLE   : SQ_BUF_RSC_WRD1_CACHE_SWIZZLE_SZ;
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_gfx11.h:89:16: note: a field with different name is defined in another translation unit
   89 |   unsigned int SWIZZLE_ENABLE  : SQ_BUF_RSC_WRD1_SWIZZLE_ENABLE_SZ;
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_nv.h:408:8: error: type ‘struct sq_img_rsrc_word6_t’ violates the C++ One Definition Rule [-Werror=odr]
  408 | struct sq_img_rsrc_word6_t {
      |        ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_gfx11.h:407:8: note: a different type is defined in another translation unit
  407 | struct sq_img_rsrc_word6_t {
      |        ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_nv.h:410:16: note: the first difference of corresponding definitions is field ‘COUNTER_BANK_ID’
  410 |   unsigned int COUNTER_BANK_ID       : SQ_IMG_RSC_WRD6_COUNTER_BANK_ID_SZ;
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_gfx11.h:409:16: note: a field with different name is defined in another translation unit
  409 |   unsigned int MIN_LOD_HI            : SQ_IMG_RSC_WRD6_MIN_LOD_HI_SZ;
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_nv.h:355:8: error: type ‘struct sq_img_rsrc_word5_t’ violates the C++ One Definition Rule [-Werror=odr]
  355 | struct sq_img_rsrc_word5_t {
      |        ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_gfx11.h:357:8: note: a different type is defined in another translation unit
  357 | struct sq_img_rsrc_word5_t {
      |        ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_nv.h:358:16: note: the first difference of corresponding definitions is field ‘MAX_MIP’
  358 |   unsigned int MAX_MIP              : SQ_IMG_RSC_WRD5_MAX_MIP_SZ;
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_gfx11.h:360:39: note: a field with different name is defined in another translation unit
  360 |   unsigned int                      : 4;
      |                                       ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_nv.h:232:8: error: type ‘struct sq_img_rsrc_word2_t’ violates the C++ One Definition Rule [-Werror=odr]
  232 | struct sq_img_rsrc_word2_t {
      |        ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_gfx11.h:236:8: note: a different type is defined in another translation unit
  236 | struct sq_img_rsrc_word2_t {
      |        ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_nv.h:238:33: note: the first difference of corresponding definitions is field ‘<anonymous>’
  238 |   unsigned int                : 1;
      |                                 ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_gfx11.h:242:33: note: a field of same name but different type is defined in another translation unit
  242 |   unsigned int                : 2;
      |                                 ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_nv.h:204:8: error: type ‘struct sq_img_rsrc_word1_t’ violates the C++ One Definition Rule [-Werror=odr]
  204 | struct sq_img_rsrc_word1_t{
      |        ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_gfx11.h:203:8: note: a different type is defined in another translation unit
  203 | struct sq_img_rsrc_word1_t{
      |        ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_nv.h:207:16: note: the first difference of corresponding definitions is field ‘MIN_LOD’
  207 |   unsigned int MIN_LOD         : SQ_IMG_RSC_WRD1_MIN_LOD_SZ;
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_gfx11.h:206:34: note: a field with different name is defined in another translation unit
  206 |   unsigned int                 : 5;
      |                                  ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_nv.h:564:8: error: type ‘struct sq_img_samp_word2_t’ violates the C++ One Definition Rule [-Werror=odr]
  564 | struct sq_img_samp_word2_t {
      |        ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_gfx11.h:562:8: note: a different type is defined in another translation unit
  562 | struct sq_img_samp_word2_t {
      |        ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_nv.h:566:16: note: the first difference of corresponding definitions is field ‘BC_LRS_LB’
  566 |   unsigned int BC_LRS_LB          : SQ_IMG_SAMP_WORD2_BC_LRS_LB_SZ;
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_gfx11.h:564:16: note: a field with different name is defined in another translation unit
  564 |   unsigned int BC_PTR             : SQ_IMG_SAMP_WORD2_BC_PTR_SZ;
      |                ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_nv.h:722:6: error: type ‘rocr::image::FORMAT’ violates the C++ One Definition Rule [-Werror=odr]
  722 | enum FORMAT {
      |      ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_gfx11.h:675:6: note: an enum with different value name is defined in another translation unit
  675 | enum FORMAT {
      |      ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_nv.h:726:1: note: name ‘CFMT_8_UINT’ differs from name ‘CFMT_8_USCALED’ defined in another translation unit
  726 | CFMT_8_UINT            = 5,
      | ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_gfx11.h:679:1: note: mismatching definition
  679 | CFMT_8_USCALED           = 3,
      | ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_nv.h:706:14: error: type ‘rocr::image::type’ violates the C++ One Definition Rule [-Werror=odr]
  706 | typedef enum type {
      |              ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_gfx11.h:659:14: note: an enum with different value name is defined in another translation unit
  659 | typedef enum type {
      |              ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_nv.h:713:1: note: name ‘TYPE_RESERVED_6’ differs from name ‘TYPE_SRGB’ defined in another translation unit
  713 | TYPE_RESERVED_6                          = 0x00000006,
      | ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_gfx11.h:666:1: note: mismatching definition
  666 | TYPE_SRGB                                = 0x00000006,
      | ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_nv.h:634:14: error: type ‘rocr::image::FMT’ violates the C++ One Definition Rule [-Werror=odr]
  634 | typedef enum FMT {
      |              ^
/var/tmp/portage/dev-libs/rocr-runtime-5.7.1-r2/work/ROCR-Runtime-rocm-5.7.1/src/image/resource_gfx11.h:632:14: note: an enum with different number of values is defined in another translation unit
  632 | typedef enum FMT {
      |              ^
lto1: some warnings being treated as errors
lto-wrapper: fatal error: /usr/bin/x86_64-pc-linux-gnu-g++ returned 1 exit status
compilation terminated.
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Downstream report: https://bugs.gentoo.org/856091 Full build log: build.log

ppanchad-amd commented 3 months ago

@eli-schwartz Thanks for reporting the issue. We will be investigating soon. Thanks