I downloaded the PAPI 3 tarball last week and keep getting a segmentation fault in gcc. Whats up?
SOme versions of GCC have a bug that is triggered by a statement in PAPI 3.0. This (one character) is fixed in the current tar ball, but may not be in the one you downloaded. If you see an INTERNAL ERROR from GCC when compiling multiplex.c, do 2 things. 1) edit multiplex.c, line 1021 to have 2 equal signs instead of 1. 2 optional) send a message to your local gcc maintainer and complain. The actual culprit is: assert(retval = PAPI_OK) and it should be assert(retval == PAPI_OK) Of course, both are legal C and nothing should trigger an internal compiler error, but hey… P.S. If your current release compiled with GCC, you’re still ok. As the statement above NEVER gets triggered. It is there as an artifact from the original multiplex.c implementation. So you don’t need to change or upgrade your PAPI or gcc.