Dear @cporzio ,
starting from last point, the last line make: *** [all] Error 2 simply indicates that there was an error in the compilation and you should scroll through the terminal output up to find the first occurrence.
I notice that there was a mistake in my previous copy&paste for the second command above. It should be
pkgutil --pkg-info=com.apple.pkg.CLTools_Executables with two minus signs (and not a emdash) . Could you please send me the output of the correct command?
Finally, you’re using gfortran from HomeBrew to compile FLUKA. While this is possible, you’ll encounter issues with Flair. We recommend using MacPorts as per the Flair installation page (section Mac OSX) Official flair site.
If you need HomeBrew, ensure you keep the two package managers separate. A solution is outlined in this post SIGBUS error on first run - #7 by luillo
Best, Luigi