Same error building depthai-core. I use this command to generate the makefiles:
cmake -S. -Bbuild -D'DEPTHAI_BUILD_EXAMPLES=ON' -D'DEPTHAI_ENABLE_CURL=OFF' -D'BUILD_SHARED_LIBS=ON'
And get these results
[ 30%] Building CXX object CMakeFiles/depthai-core.dir/src/openvino/BlobReader.cpp.o
[ 30%] Building C object CMakeFiles/depthai-core.dir/src/bspatch/bspatch.c.o
[ 31%] Linking CXX shared library libdepthai-core.so
/usr/bin/ld: /home/tony/.hunter/_Base/16cc954/a3a48bb/624857f/Install/lib/libspdlog.a(spdlog.cpp.o): relocation R_X86_64_TPOFF32 against `_ZGVZN6spdlog7details2os9thread_idEvE3tid' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/tony/.hunter/_Base/16cc954/a3a48bb/624857f/Install/lib/libXLink.a(PlatformDeviceFd.cpp.o): relocation R_X86_64_PC32 against symbol `_ZNSt13unordered_mapImPvSt4hashImESt8equal_toImESaISt4pairIKmS0_EEED1Ev' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/depthai-core.dir/build.make:1420: libdepthai-core.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:455: CMakeFiles/depthai-core.dir/all] Error 2