Static linking error discussed in devtalk should be fixed by this patch.
They have discussed and found the solution. I am just re-checking.
I have also faced the issue.
According to Embree building documentation:
Compiling Embree > CMake Configuration EMBREE_STATIC_LIB: Builds Embree as a static library (OFF by default). Further multiple static libraries are generated for the different ISAs selected (e.g. embree3.a, embree3_sse42.a, embree3_avx.a, embree3_avx2.a, embree3_avx512knl.a, embree3_avx512skx.a). You have to link these libraries in exactly this order of increasing ISA.
Devtalk Discussion: https://devtalk.blender.org/t/ubuntu-18-04-error-when-building-not-first-time-building-on-ubuntu/6723