ROCm / ROCT-Thunk-Interface

ROCm's Thunk Interface
Other
83 stars 71 forks source link

[hsathk-amd-1.5.0] string_fortified.h:91:10: error: ‘__builtin_strncpy’ specified bound 64 equals destination size [-Werror=stringop-truncation] #67

Closed Bogdan107 closed 3 years ago

Bogdan107 commented 3 years ago

Compilation of (dev-libs/hsathk-amd-1.5.0 = ROCT-Thunk-Interface-roc-1.5.0) fails with:

FAILED: CMakeFiles/hsakmt.dir/src/topology.c.o 
/usr/bin/x86_64-pc-linux-gnu-gcc -Dhsakmt_EXPORTS -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/include -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src  -DNDEBUG -fPIC -W -Wall -Wextra -Werror -Wno-unused-parameter -Wformat-security -Wswitch-default -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wlogical-op -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code -std=gnu99 -fvisibility=hidden -O2 -fPIC -MD -MT CMakeFiles/hsakmt.dir/src/topology.c.o -MF CMakeFiles/hsakmt.dir/src/topology.c.o.d -o CMakeFiles/hsakmt.dir/src/topology.c.o -c /tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src/topology.c
In file included from /usr/include/string.h:519,
                 from /tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src/topology.c:32:
In function ‘strncpy’,
    inlined from ‘topology_sysfs_get_node_props’ at /tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src/topology.c:819:3:
/usr/include/bits/string_fortified.h:91:10: error: ‘__builtin_strncpy’ specified bound 64 equals destination size [-Werror=stringop-truncation]
   91 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

emerge --info dev-libs/hsathk-amd

Portage 3.0.13 (python 3.9.1-final-0, default/linux/amd64/17.1/no-multilib/hardened, gcc-10.2.0, glibc-2.32-r6, 5.10.14-gentoo-x86_64 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.10.14-gentoo-x86_64-x86_64-AMD_Ryzen_5_4600H_with_Radeon_Graphics-with-glibc2.32
sh bash 5.0_p18
ld GNU gold (Gentoo 2.35.1 p2 2.35.1) 1.16
ccache version 4.1 [disabled]
app-shells/bash:          5.0_p18::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.30.3::gentoo
dev-lang/python:          2.7.18-r6::gentoo, 3.7.9-r2::gentoo, 3.8.7-r1::gentoo, 3.9.1-r1::gentoo
dev-util/ccache:          4.1::gentoo
dev-util/cmake:           3.18.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1-r1::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.15.1-r2::gentoo, 1.16.2-r1::gentoo
sys-devel/binutils:       2.35.1-r1::gentoo
sys-devel/gcc:            9.3.0-r2::gentoo, 10.2.0-r5::gentoo
sys-devel/gcc-config:     2.3.2-r1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r6::gentoo

CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=znver2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CXXFLAGS="-march=znver2 -O2 -pipe"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs candy cgroup compress-build-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync metadata-transfer multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms split-elog split-log splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
LANG="ru_RU.UTF-8"
LC_ALL="ru_RU.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en ru uk ua"
MAKEOPTS="-j12 --load-average=11"
PKGDIR="/usr/portage/packages"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, PORTAGE_BINHOST

Full make log:

 * Package:    dev-libs/hsathk-amd-1.5.0
 * Repository: localrepo
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
 * FEATURES:   compressdebug network-sandbox preserve-libs sandbox splitdebug userpriv usersandbox
 * Hardcoded definition(s) removed in CMakeLists.txt:
 *  set ( CMAKE_VERBOSE_MAKEFILE on )
>>> Working in BUILD_DIR: "/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/hsathk-amd-1.5.0_build"
cmake -C /tmp/portage/dev-libs/hsathk-amd-1.5.0/work/hsathk-amd-1.5.0_build/gentoo_common_config.cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Gentoo -DCMAKE_TOOLCHAIN_FILE=/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/hsathk-amd-1.5.0_build/gentoo_toolchain.cmake  /tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0
loading initial cache file /tmp/portage/dev-libs/hsathk-amd-1.5.0/work/hsathk-amd-1.5.0_build/gentoo_common_config.cmake
-- The C compiler identification is GNU 10.2.0
-- The CXX compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
fatal: not a git repository (or any parent up to mount point /tmp)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
-- <<< Gentoo configuration >>>
Build type      Gentoo
Install path    /usr
Compiler flags:
C               -fPIC -W -Wall -Wextra -Werror -Wno-unused-parameter -Wformat-security -Wswitch-default -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wlogical-op -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code -std=gnu99 -fvisibility=hidden -O2
C++             -march=znver2 -O2 -pipe
Linker flags:
Executable      -Wl,-O1 -Wl,--as-needed
Module          -Wl,-O1 -Wl,--as-needed
Shared          -Wl,--version-script=/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src/libhsakmt.ver -Wl,-soname=libhsakmt.so.$(VERSION_MAJOR) -Wl,-z,nodelete

-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/portage/dev-libs/hsathk-amd-1.5.0/work/hsathk-amd-1.5.0_build
>>> Working in BUILD_DIR: "/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/hsathk-amd-1.5.0_build"
ninja -v -j12 -l11
[1/17] /usr/bin/x86_64-pc-linux-gnu-gcc -Dhsakmt_EXPORTS -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/include -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src  -DNDEBUG -fPIC -W -Wall -Wextra -Werror -Wno-unused-parameter -Wformat-security -Wswitch-default -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wlogical-op -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code -std=gnu99 -fvisibility=hidden -O2 -fPIC -MD -MT CMakeFiles/hsakmt.dir/src/globals.c.o -MF CMakeFiles/hsakmt.dir/src/globals.c.o.d -o CMakeFiles/hsakmt.dir/src/globals.c.o -c /tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src/globals.c
[2/17] /usr/bin/x86_64-pc-linux-gnu-gcc -Dhsakmt_EXPORTS -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/include -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src  -DNDEBUG -fPIC -W -Wall -Wextra -Werror -Wno-unused-parameter -Wformat-security -Wswitch-default -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wlogical-op -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code -std=gnu99 -fvisibility=hidden -O2 -fPIC -MD -MT CMakeFiles/hsakmt.dir/src/time.c.o -MF CMakeFiles/hsakmt.dir/src/time.c.o.d -o CMakeFiles/hsakmt.dir/src/time.c.o -c /tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src/time.c
[3/17] /usr/bin/x86_64-pc-linux-gnu-gcc -Dhsakmt_EXPORTS -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/include -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src  -DNDEBUG -fPIC -W -Wall -Wextra -Werror -Wno-unused-parameter -Wformat-security -Wswitch-default -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wlogical-op -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code -std=gnu99 -fvisibility=hidden -O2 -fPIC -MD -MT CMakeFiles/hsakmt.dir/src/libhsakmt.c.o -MF CMakeFiles/hsakmt.dir/src/libhsakmt.c.o.d -o CMakeFiles/hsakmt.dir/src/libhsakmt.c.o -c /tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src/libhsakmt.c
[4/17] cd /tmp/portage/dev-libs/hsathk-amd-1.5.0/work/hsathk-amd-1.5.0_build && /usr/bin/cmake -E create_symlink ../libhsakmt/lib/libhsakmt.so libhsakmt.so-link
[5/17] /usr/bin/x86_64-pc-linux-gnu-gcc -Dhsakmt_EXPORTS -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/include -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src  -DNDEBUG -fPIC -W -Wall -Wextra -Werror -Wno-unused-parameter -Wformat-security -Wswitch-default -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wlogical-op -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code -std=gnu99 -fvisibility=hidden -O2 -fPIC -MD -MT CMakeFiles/hsakmt.dir/src/openclose.c.o -MF CMakeFiles/hsakmt.dir/src/openclose.c.o.d -o CMakeFiles/hsakmt.dir/src/openclose.c.o -c /tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src/openclose.c
[6/17] cd /tmp/portage/dev-libs/hsathk-amd-1.5.0/work/hsathk-amd-1.5.0_build && /usr/bin/cmake -E create_symlink ../libhsakmt/include/libhsakmt libhsakmt-link
[7/17] /usr/bin/x86_64-pc-linux-gnu-gcc -Dhsakmt_EXPORTS -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/include -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src  -DNDEBUG -fPIC -W -Wall -Wextra -Werror -Wno-unused-parameter -Wformat-security -Wswitch-default -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wlogical-op -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code -std=gnu99 -fvisibility=hidden -O2 -fPIC -MD -MT CMakeFiles/hsakmt.dir/src/debug.c.o -MF CMakeFiles/hsakmt.dir/src/debug.c.o.d -o CMakeFiles/hsakmt.dir/src/debug.c.o -c /tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src/debug.c
[8/17] /usr/bin/x86_64-pc-linux-gnu-gcc -Dhsakmt_EXPORTS -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/include -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src  -DNDEBUG -fPIC -W -Wall -Wextra -Werror -Wno-unused-parameter -Wformat-security -Wswitch-default -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wlogical-op -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code -std=gnu99 -fvisibility=hidden -O2 -fPIC -MD -MT CMakeFiles/hsakmt.dir/src/pmc_table.c.o -MF CMakeFiles/hsakmt.dir/src/pmc_table.c.o.d -o CMakeFiles/hsakmt.dir/src/pmc_table.c.o -c /tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src/pmc_table.c
[9/17] /usr/bin/x86_64-pc-linux-gnu-gcc -Dhsakmt_EXPORTS -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/include -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src  -DNDEBUG -fPIC -W -Wall -Wextra -Werror -Wno-unused-parameter -Wformat-security -Wswitch-default -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wlogical-op -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code -std=gnu99 -fvisibility=hidden -O2 -fPIC -MD -MT CMakeFiles/hsakmt.dir/src/version.c.o -MF CMakeFiles/hsakmt.dir/src/version.c.o.d -o CMakeFiles/hsakmt.dir/src/version.c.o -c /tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src/version.c
[10/17] /usr/bin/x86_64-pc-linux-gnu-gcc -Dhsakmt_EXPORTS -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/include -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src  -DNDEBUG -fPIC -W -Wall -Wextra -Werror -Wno-unused-parameter -Wformat-security -Wswitch-default -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wlogical-op -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code -std=gnu99 -fvisibility=hidden -O2 -fPIC -MD -MT CMakeFiles/hsakmt.dir/src/events.c.o -MF CMakeFiles/hsakmt.dir/src/events.c.o.d -o CMakeFiles/hsakmt.dir/src/events.c.o -c /tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src/events.c
[11/17] /usr/bin/x86_64-pc-linux-gnu-gcc -Dhsakmt_EXPORTS -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/include -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src  -DNDEBUG -fPIC -W -Wall -Wextra -Werror -Wno-unused-parameter -Wformat-security -Wswitch-default -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wlogical-op -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code -std=gnu99 -fvisibility=hidden -O2 -fPIC -MD -MT CMakeFiles/hsakmt.dir/src/memory.c.o -MF CMakeFiles/hsakmt.dir/src/memory.c.o.d -o CMakeFiles/hsakmt.dir/src/memory.c.o -c /tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src/memory.c
[12/17] /usr/bin/x86_64-pc-linux-gnu-gcc -Dhsakmt_EXPORTS -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/include -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src  -DNDEBUG -fPIC -W -Wall -Wextra -Werror -Wno-unused-parameter -Wformat-security -Wswitch-default -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wlogical-op -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code -std=gnu99 -fvisibility=hidden -O2 -fPIC -MD -MT CMakeFiles/hsakmt.dir/src/queues.c.o -MF CMakeFiles/hsakmt.dir/src/queues.c.o.d -o CMakeFiles/hsakmt.dir/src/queues.c.o -c /tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src/queues.c
[13/17] /usr/bin/x86_64-pc-linux-gnu-gcc -Dhsakmt_EXPORTS -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/include -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src  -DNDEBUG -fPIC -W -Wall -Wextra -Werror -Wno-unused-parameter -Wformat-security -Wswitch-default -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wlogical-op -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code -std=gnu99 -fvisibility=hidden -O2 -fPIC -MD -MT CMakeFiles/hsakmt.dir/src/perfctr.c.o -MF CMakeFiles/hsakmt.dir/src/perfctr.c.o.d -o CMakeFiles/hsakmt.dir/src/perfctr.c.o -c /tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src/perfctr.c
[14/17] /usr/bin/x86_64-pc-linux-gnu-gcc -Dhsakmt_EXPORTS -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/include -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src  -DNDEBUG -fPIC -W -Wall -Wextra -Werror -Wno-unused-parameter -Wformat-security -Wswitch-default -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wlogical-op -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code -std=gnu99 -fvisibility=hidden -O2 -fPIC -MD -MT CMakeFiles/hsakmt.dir/src/topology.c.o -MF CMakeFiles/hsakmt.dir/src/topology.c.o.d -o CMakeFiles/hsakmt.dir/src/topology.c.o -c /tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src/topology.c
FAILED: CMakeFiles/hsakmt.dir/src/topology.c.o 
/usr/bin/x86_64-pc-linux-gnu-gcc -Dhsakmt_EXPORTS -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/include -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src  -DNDEBUG -fPIC -W -Wall -Wextra -Werror -Wno-unused-parameter -Wformat-security -Wswitch-default -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wlogical-op -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code -std=gnu99 -fvisibility=hidden -O2 -fPIC -MD -MT CMakeFiles/hsakmt.dir/src/topology.c.o -MF CMakeFiles/hsakmt.dir/src/topology.c.o.d -o CMakeFiles/hsakmt.dir/src/topology.c.o -c /tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src/topology.c
In file included from /usr/include/string.h:519,
                 from /tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src/topology.c:32:
In function ‘strncpy’,
    inlined from ‘topology_sysfs_get_node_props’ at /tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src/topology.c:819:3:
/usr/include/bits/string_fortified.h:91:10: error: ‘__builtin_strncpy’ specified bound 64 equals destination size [-Werror=stringop-truncation]
   91 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
[15/17] /usr/bin/x86_64-pc-linux-gnu-gcc -Dhsakmt_EXPORTS -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/include -I/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src  -DNDEBUG -fPIC -W -Wall -Wextra -Werror -Wno-unused-parameter -Wformat-security -Wswitch-default -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wlogical-op -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code -std=gnu99 -fvisibility=hidden -O2 -fPIC -MD -MT CMakeFiles/hsakmt.dir/src/fmm.c.o -MF CMakeFiles/hsakmt.dir/src/fmm.c.o.d -o CMakeFiles/hsakmt.dir/src/fmm.c.o -c /tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0/src/fmm.c
ninja: build stopped: subcommand failed.
 * ERROR: dev-libs/hsathk-amd-1.5.0::localrepo failed (compile phase):
 *   ninja -v -j12 -l11 failed
 * 
 * Call stack:
 *     ebuild.sh, line  125:  Called src_compile
 *   environment, line 2171:  Called cmake-utils_src_compile
 *   environment, line  780:  Called cmake-utils_src_make
 *   environment, line  964:  Called _cmake_ninja_src_make
 *   environment, line  527:  Called eninja
 *   environment, line 1270:  Called die
 * The specific snippet of code:
 *       "$@" || die "${nonfatal_args[@]}" "${*} failed"
 * 
 * If you need support, post the output of `emerge --info '=dev-libs/hsathk-amd-1.5.0::localrepo'`,
 * the complete build log and the output of `emerge -pqv '=dev-libs/hsathk-amd-1.5.0::localrepo'`.
 * The complete build log is located at '/var/log/portage/build/dev-libs/hsathk-amd-1.5.0:20210210-101631.log.gz'.
 * For convenience, a symlink to the build log is located at '/tmp/portage/dev-libs/hsathk-amd-1.5.0/temp/build.log.gz'.
 * The ebuild environment file is located at '/tmp/portage/dev-libs/hsathk-amd-1.5.0/temp/environment'.
 * Working directory: '/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/hsathk-amd-1.5.0_build'
 * S: '/tmp/portage/dev-libs/hsathk-amd-1.5.0/work/ROCT-Thunk-Interface-roc-1.5.0'

Maybe this will help resolve the error? https://marc.info/?l=linux-netdev&m=157838861907264&w=1

kentrussell commented 3 years ago

This was resolved in ROCm 2.0 back in 2018. Please ensure that you're using a newer branch for your work, as we don't support backporting fixes to previous releases. The fix for this can be found at: 74723d7 Fix compiler warning on Fedora 28: https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/commit/74723d7e0fbe5ae778667df8b595113601a8f78a

Closing due to this only being present on branches created in 2017.

Bogdan107 commented 3 years ago

Sorry, I'm use old ebuild, which use fxkamd/drm-next-wip branch. After changing branch to fxkamd/hmm-wip - compilation finished with SUCCESS..

fxkamd commented 3 years ago

Neither of the -wip branches are official release branches. I'd recommend you use one of the release branches or master.