sysdetect: linker error on IBM POWER9

Issue #120 resolved
Daniel Barry created an issue

When compiling PAPI (commit hash 473bc57) on a POWER9 system, I get the following error:

gcc -E -DFORTRANCAPS papi_fwrappers.c > upper_PAPI_FWRAPPERS.c
rm -f libpapi.so.6.0.0.1 libpapi.so libpapi.so.6.0
/nfs/apps/spacks/2022-02-10/opt/spack/linux-centos7-x86_64/gcc-7.3.0/gcc-10.2.0-qjqscfshevigd64zj3wojtrp3v6j6o5a/bin/gcc -fPIC -DPIC -shared -Wl,-soname -Wl,libpapi.so.6.0 -Xlinker "-rpath" -Xlinker "/data/apps/papi-6.0-fix-powercap/lib" -DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PAPI_EVENTS_TABLE -DUSE_PERFEVENT_RDPMC=1 -DPEINCLUDE="libpfm4/include/perfmon/perf_event.h" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Ilibpfm4/include -fvisibility=hidden -I. -g -Wextra -Wall -DPAPI_NUM_COMP=3 -I/hsa/include -I/hsa/include/hsa -I/rocm_smi/include -I/rocm_smi/include/rocm_smi -I/include -DOSLOCK="linux-lock.h" -DOSCONTEXT="linux-context.h" -O2 x86_cpuid_info.c papi_libpfm4_events.c papi.c papi_internal.c high-level/papi_hl.c extras.c sw_multiplex.c papi_fwrappers.c papi_fwrappers_.c papi_fwrappers__.c upper_PAPI_FWRAPPERS.c threads.c cpus.c linux-memory.c linux-timer.c linux-common.c papi_preset.c papi_vector.c papi_memory.c components/perf_event/perf_event.c components/perf_event/pe_libpfm4_events.c components/perf_event_uncore/perf_event_uncore.c components/sysdetect/sysdetect.c components/sysdetect/nvidia_gpu.c components/sysdetect/amd_gpu.c components/sysdetect/cpu.c components/sysdetect/cpu_utils.c components/sysdetect/os_cpu_utils.c components/sysdetect/linux_cpu_utils.c components/sysdetect/shm.c components/sysdetect/x86_cpu_utils.c -o libpapi.so.6.0.0.1 -Bdynamic -Llibpfm4/lib -lpfm
/tmp/cclJqx56.o:(.bss+0x0): multiple definition of sysdetect_fort_handle' /tmp/ccNd3RHm.o:(.bss+0x0): first defined here /tmp/ccTSfB9R.o:(.bss+0x0): multiple definition of sysdetect_fort_handle'
/tmp/ccNd3RHm.o:/home/dbarry/src/base-papi-xsdk/papi-recover/papi/src/papi_fwrappers.c:80: first defined here
/tmp/ccFzGHXD.o:(.bss+0x0): multiple definition of sysdetect_fort_handle' /tmp/ccNd3RHm.o:/home/dbarry/src/base-papi-xsdk/papi-recover/papi/src/papi_fwrappers.c:80: first defined here collect2: error: ld returned 1 exit status
make[1]: *** [libpapi.so.6.0.0.1] Error 1
make[1]: Leaving directory /home/dbarry/src/base-papi-xsdk/papi-recover/papi/src'
make: *** [libpfm4/lib/libpfm.a] Error 2

Comments (3)

  1. Log in to comment