Disable papi when cross compiling

Even if we do an override to papi get the proper configure flags for
cross-compiling, the memory fences are not defined for risc-v:

mb.h:67:2: error: #error Need to define rmb for this architecture!
This commit is contained in:
Aleix Boné 2025-09-29 15:18:53 +02:00 committed by Rodrigo Arias Mallo
parent dd7f24f455
commit b499123dcb
3 changed files with 6 additions and 6 deletions

View File

@ -20,6 +20,7 @@
#, python3Packages #, python3Packages
, installShellFiles , installShellFiles
, symlinkJoin , symlinkJoin
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
}: }:
let let
@ -87,7 +88,7 @@ stdenv.mkDerivation rec {
--enable-sampling --enable-sampling
--with-unwind=${libunwind.dev} --with-unwind=${libunwind.dev}
--with-xml-prefix=${libxml2.dev} --with-xml-prefix=${libxml2.dev}
--with-papi=${papi} ${lib.optionalString enablePapi "--with-papi=${papi}"}
${if (mpi != null) then ''--with-mpi=${mpi}'' ${if (mpi != null) then ''--with-mpi=${mpi}''
else ''--without-mpi''} else ''--without-mpi''}
--without-dyninst) --without-dyninst)

View File

@ -16,6 +16,7 @@
, jemallocNanos6 ? null , jemallocNanos6 ? null
, cachelineBytes ? 64 , cachelineBytes ? 64
, enableGlibcxxDebug ? false , enableGlibcxxDebug ? false
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
, useGit ? false , useGit ? false
, gitUrl ? "ssh://git@bscpm04.bsc.es/nanos6/nanos6" , gitUrl ? "ssh://git@bscpm04.bsc.es/nanos6/nanos6"
, gitBranch ? "master" , gitBranch ? "master"
@ -97,16 +98,14 @@ in
# TODO: papi_version is needed for configure: # TODO: papi_version is needed for configure:
# ./configure: line 27378: papi_version: command not found # ./configure: line 27378: papi_version: command not found
# This probably breaks cross-compilation # This probably breaks cross-compilation
papi ] ++ lib.optionals enablePapi [ papi ];
];
buildInputs = [ buildInputs = [
boost boost
numactl numactl
hwloc hwloc
papi
ovni ovni
]; ] ++ lib.optionals enablePapi [ papi ];
# Create a script that sets NANOS6_HOME # Create a script that sets NANOS6_HOME
postInstall = '' postInstall = ''

View File

@ -7,7 +7,7 @@
, numactl , numactl
, hwloc , hwloc
, papi , papi
, enablePapi ? true , enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
, cacheline ? 64 # bits , cacheline ? 64 # bits
, ovni ? null , ovni ? null
, useGit ? false , useGit ? false