This happens when I build b2g while configured for the emulator. Apparently the emulator doesn't have a libcamera.so to link against, at least our version of it.
Created attachment 593741 [details] [diff] [review] Don't link against HAL_getNumberOfCameras because we don't have a camera library on the emulator
Created attachment 593864 [details] [diff] [review] followup The previous patch will fail with devices that have only one camera and try to open the second one. This patch dlsym() the HAL_getNumberOfCameras() instead.
Comment on attachment 593864 [details] [diff] [review] followup This doesn't make sense as a member method here, imho. I hacked because I didn't want to redactor so as to share the lib handle. I don't trust the linker. But let's comprise. Make this a static method and r=me.
and the first part: https://hg.mozilla.org/mozilla-central/rev/558ccc18ea2c