I tested building GPAC on the previous version of MacOS, and it worked. 
Apparently, Apple changed something in the new version of Clang, and it's not working in Sonoma

set -e; for i in gpac mp4box  ; do make -C $i all; done
ld: warning: ignoring duplicate libraries: '-lbz2', '-lcaca', '-lfreetype', '-lnghttp2', '-lpng16', '-lpthread', '-lz'
ld: Undefined symbols:
  _memrchr, referenced from:
      _gf_props_parse_value in libgpac_static.a[234](filter_props.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Mac  M1 chips
MacOS Sonoma 14.0 (23A344)

related to https://github.com/gpac/gpac/issues/2640
build fail on mac 
This is a GitHub Issue
repo:gpac
owner:gpac
Title : build fail on mac 
Issue date:

--- start body ---
I tested building GPAC on the previous version of MacOS, and it worked. 
Apparently, Apple changed something in the new version of Clang, and it's not working in Sonoma

set -e; for i in gpac mp4box  ; do make -C $i all; done
ld: warning: ignoring duplicate libraries: '-lbz2', '-lcaca', '-lfreetype', '-lnghttp2', '-lpng16', '-lpthread', '-lz'
ld: Undefined symbols:
  _memrchr, referenced from:
      _gf_props_parse_value in libgpac_static.a[234](filter_props.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Mac  M1 chips
MacOS Sonoma 14.0 (23A344)

related to https://github.com/gpac/gpac/issues/2640
--- end body ---
