Raspbian on Raspberry Pi 4 uses ARMv7 binaries while Pi Zero uses ARMv6hf. You can easily use ARMv6hf binaries on ARMv7 CPUs but not the other way around. So build your libraries on your target platform or use cross compilation.
The camera is probably running out of GPU memory. Check config.txt in the /boot/ folder. The gpu_mem option should be at least 128.
Possible Duplicate of : What causes ENOSPC error when using the Raspberry Pi camera module?