RRZE-HPC / likwid

Performance monitoring and benchmarking suite
https://hpc.fau.de/research/tools/likwid/
GNU General Public License v3.0
1.64k stars 226 forks source link

[Build] redefinition of ‘lua_likwid_rocmSupported’ with ROCM_INTERFACE=true #596

Closed okkevaneck closed 7 months ago

okkevaneck commented 7 months ago

Which version do you want to build? v5.3.0 - latest: https://github.com/RRZE-HPC/likwid/releases/tag/v5.3.0 Tarball: https://github.com/RRZE-HPC/likwid/archive/refs/tags/v5.3.0.tar.gz

Which architecture do you want to build for?

To Reproduce

Output log Error output of make distclean && make

/pfs/lustrep4/projappl/project_465000527/perf_tools/likwid/likwid-5.3.0/src/luawid.c:3700:12: error: redefinition of ‘lua_likwid_rocmSupported’
 static int lua_likwid_rocmSupported(lua_State *L) {
            ^~~~~~~~~~~~~~~~~~~~~~~~
/pfs/lustrep4/projappl/project_465000527/perf_tools/likwid/likwid-5.3.0/src/luawid.c:3036:12: note: previous definition of ‘lua_likwid_rocmSupported’ was here
 static int lua_likwid_rocmSupported(lua_State *L) {
            ^~~~~~~~~~~~~~~~~~~~~~~~
gcc: error: ./GCC/luawid.o: No such file or directory
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: cannot find -llikwid: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:112: likwid-bench] Error 1
make: *** [Makefile:319: bench/likwid-bench] Error 2
okkevaneck commented 7 months ago

I think it's as simple as moving the second function definition inside the else instead of outside. So I made a PR for you, but please correct me if I'm wrong! PR: #597

TomTheBear commented 7 months ago

I think I fixed it already in the master branch but I'm not sure.

okkevaneck commented 7 months ago

PR has been approved.