Enable papi cross compilation #184

Closed
opened 2025-10-01 15:43:38 +02:00 by abonerib · 1 comment
Collaborator

PAPI has no support for risc-v right now, but it should in the next nixpkgs stable release:

rarias/bscpkgs#10 (comment)

We have to update nosv, nanos6 and other packages that have to disable its support when cross compiling.

PAPI has no support for risc-v right now, but it should in the next nixpkgs stable release: https://jungle.bsc.es/git/rarias/bscpkgs/pulls/10#issuecomment-4501 We have to update nosv, nanos6 and other packages that have to disable its support when cross compiling.
abonerib added this to the 25.11 Release milestone 2025-10-01 15:43:38 +02:00
abonerib added the cross label 2025-10-30 12:25:31 +01:00
Author
Collaborator

With papi 7.2.0, risc-v is still not properly supported. I cannot get libpfm4 to build:

papi.overrideAttrs (old: {
  configureFlags = (old.configureFlags or [ ]) ++ [
    "--enable-perf_event_uncore=no"
    "--with-sysdetect=no"
    "--with-ffsll"
    "--with-tls=__thread"
    "--with-virtualtimer=clock_thread_cputime_id"
    "--with-walltimer=clock_realtime_hr"
  ];
})
In function 'cpuid',
    inlined from 'pfm_amd64_detect' at pfmlib_amd64.c:326:2:
pfmlib_amd64.c:207:9: error: impossible constraint in 'asm'
  207 |         asm volatile("cpuid" : "=a" (*a), "=b" (*b), "=c" (*c), "=d" (*d) : "a" (op) : "memory");
      |         ^~~
In function 'cpuid',
    inlined from 'pfm_amd64_detect' at pfmlib_amd64.c:335:2:
pfmlib_amd64.c:207:9: error: impossible constraint in 'asm'
  207 |         asm volatile("cpuid" : "=a" (*a), "=b" (*b), "=c" (*c), "=d" (*d) : "a" (op) : "memory");
      |         ^~~
make[2]: *** [/build/papi-7.2.0/src/libpfm4/lib/../rules.mk:30: pfmlib_amd64.o] Error 1
make[2]: Leaving directory '/build/papi-7.2.0/src/libpfm4/lib'
make[1]: *** [Makefile:52: lib] Error 2
make[1]: Leaving directory '/build/papi-7.2.0/src/libpfm4'
make: *** [Rules.pfm4_pe:42: libpfm4/lib/libpfm.a] Error 2

Even if we get it to build, there will be no events, so right now there is no incentive to pursue this further.

With papi 7.2.0, risc-v is still not properly supported. I cannot get `libpfm4` to build: ```nix papi.overrideAttrs (old: { configureFlags = (old.configureFlags or [ ]) ++ [ "--enable-perf_event_uncore=no" "--with-sysdetect=no" "--with-ffsll" "--with-tls=__thread" "--with-virtualtimer=clock_thread_cputime_id" "--with-walltimer=clock_realtime_hr" ]; }) ``` ``` In function 'cpuid', inlined from 'pfm_amd64_detect' at pfmlib_amd64.c:326:2: pfmlib_amd64.c:207:9: error: impossible constraint in 'asm' 207 | asm volatile("cpuid" : "=a" (*a), "=b" (*b), "=c" (*c), "=d" (*d) : "a" (op) : "memory"); | ^~~ In function 'cpuid', inlined from 'pfm_amd64_detect' at pfmlib_amd64.c:335:2: pfmlib_amd64.c:207:9: error: impossible constraint in 'asm' 207 | asm volatile("cpuid" : "=a" (*a), "=b" (*b), "=c" (*c), "=d" (*d) : "a" (op) : "memory"); | ^~~ make[2]: *** [/build/papi-7.2.0/src/libpfm4/lib/../rules.mk:30: pfmlib_amd64.o] Error 1 make[2]: Leaving directory '/build/papi-7.2.0/src/libpfm4/lib' make[1]: *** [Makefile:52: lib] Error 2 make[1]: Leaving directory '/build/papi-7.2.0/src/libpfm4' make: *** [Rules.pfm4_pe:42: libpfm4/lib/libpfm.a] Error 2 ``` Even if we get it to build, [there will be no events](https://github.com/icl-utk-edu/papi/pull/149), so right now there is no incentive to pursue this further.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rarias/jungle#184