The "case" statement for "ENOCMP" in _pe_init_component( ) is incorrect.
It should be "ECMP" as this is what is returned by the call to _papi_libpfm4_init( ).
Presently if no default PMU is found the message "Unknown libpfm4 related error" is issued.
It should be "Error libpfm4 no PMUs found"
Note that in the _papi_libpfm4_init( ) function the disable_reason string is set for some errors, only to be reset by the caller. Setting the string in _papi_libpfm4_init( ) is probably not necessary. Or the caller can check if the disable_reason is set and if not formulate the message.
The other "ENOCMP" error conditions in the perf_event.c file are also suspect and should be re-evaluated as they will also trigger a "Unknown libpfm4 related error".