O2 DPG / EVTGEN

I am trying to install O2 DPG packages in my local machine ( Mcbook Pro, macOS Monterey 12.3.1, Apple M1 pro).
While trying to install EVTGEN, I face an error at Building PHOTOS@v.3.64 :
aliBuild build EVTGEN --defaults o2

gfortran -g -lstdc++ -shared -o lib/libPhotospp.so.3.64 -Wl,-soname,libPhotospp.so src/photosCInterfaces/.o src/photos-C/.o src/utilities/*.o
ld: unknown option: -soname
collect2: error: ld returned 1 exit status
make: *** [all] Error 1

The log file is at : CERNBox

Maybe @hristov (as M1 expert) can be of help here.

The EVTGEN packages are not yet ported to Mac OS and for the moment can be used only on Linux.