RRZE-HPC / likwid

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

[Build] Build failure on Linux ARM64 #516

Closed martin-g closed 1 year ago

martin-g commented 1 year ago

Which version do you want to build? 5.2.2

Which architecture do you want to build for?

To Reproduce I am trying to build a RPM package (RedHat package) using this spec file: https://github.com/openhpc/ohpc/blob/2.x/components/perf-tools/likwid/SPECS/likwid.spec

Output log

[   21s] ===>  COMPILE  GCC/access_x86_rdpmc.o
[   21s] gcc -c  -O2 -std=c99 -Wno-format -fPIC -fPIC -fvisibility=hidden   -DPAGE_ALIGNMENT=4096 -DLIKWID_MONITOR_LOCK -DDEBUGLEV=0 -DVERSION=5 -DRELEASE=2 -DMINORVERSION=2 -DCFGFILE=/etc/likwid.cfg -DTOPOFILE=/etc/likwid_topo.cfg -DINSTALL_PREFIX=/opt/ohpc/pub/libs/gnu12/likwid/5.2.2 -DMAX_NUM_THREADS=300 -DMAX_NUM_NODES=64 -DMAX_NUM_CLIARGS=16384 -DACCESSDAEMON=/opt/ohpc/pub/libs/gnu12/likwid/5.2.2/sbin/likwid-accessD -DFREQDAEMON=/opt/ohpc/pub/libs/gnu12/likwid/5.2.2/sbin/likwid-setFreq -DGROUPPATH=/opt/ohpc/pub/libs/gnu12/likwid/5.2.2/share/likwid/perfgroups -DLIKWIDLOCK=/var/run/likwid.lock -DLIKWIDSOCKETBASE=/tmp/likwid   -DGITCOMMIT=233ab943543480cd46058b34616c174198ba0459 -D_GNU_SOURCE -DCOLOR=BLUE -DHAS_MEMPOLICY -DHAS_SCHEDAFFINITY -DLIKWID_USE_HWLOC -DACCESSMODE=1 -I./src/includes -I/home/abuild/rpmbuild/BUILD/likwid-5.2.2/ext/lua/includes -I/home/abuild/rpmbuild/BUILD/likwid-5.2.2/ext/hwloc/include -I./GCC ./src/access_x86_rdpmc.c -o GCC/access_x86_rdpmc.o
[   21s] In function '__rdpmc',
[   21s]     inlined from 'test_rdpmc.constprop' at ./src/access_x86_rdpmc.c:118:13:
[   21s] ./src/access_x86_rdpmc.c:77:5: error: impossible constraint in 'asm'
[   21s]    77 |     __asm__ volatile("rdpmc" : "=a" (low), "=d" (high) : "c" (counter));
[   21s]       |     ^~~~~~~
[   21s] ./src/access_x86_rdpmc.c:77:5: error: impossible constraint in 'asm'
[   21s] make: *** [Makefile:302: GCC/access_x86_rdpmc.o] Error 1
[   21s] error: Bad exit status from /var/tmp/rpm-tmp.EszyWr (%build)
[   21s] 
[   21s] 
[   21s] RPM build errors:
[   21s]     Bad exit status from /var/tmp/rpm-tmp.EszyWr (%build)
[   21s] 
[   21s]  failed "build likwid.spec" at Wed Feb 22 17:47:39 UTC 2023.

See the attached file for the full logs.

likwid_aarch64.txt

martin-g commented 1 year ago

I read the documentation and I see that I need to use GCCARMv8 (ARM Alinea ?!) instead of GNU GCC.