Hi Lina,
Please try building from the patch branches of the SAM, ssc, wex, and lk repositories instead of the default develop branches. We are actively working in develop and can't guarantee that they will build correctly.
A build from patch branches will result in a version of SAM consistent with the current NREL release version, SAM 2022.11.21 Revision 3.
Let me know if you encounter that error with builds from the patch branches.
Best regards,
Paul.