I was also facing the same issue with XCode 16. Try replacing SDKROOT=macosx with SDKROOT=(xcrun --sdk macosx --show-sdk-path) Its working for me.
SDKROOT=macosx
SDKROOT=(xcrun --sdk macosx --show-sdk-path)