Open GreggsNBacon opened 6 years ago
Hmm I've not seen this, the file should be in the image. Looks like a potential bug with the pi image rather than mjpg-streamer, but could be a cmake thing.
Are you compiling on an actual pi?
Does vcos.h exist?
I also encountered this problem and found a workaround.
I found that there is no /opt/vc
folder so plugins/input_raspicam/CMakeLists.txt
judges HAS_RASPI OFF
.
but i have vcos.h
at /usr/include/interface/vcos/vcos.h
.
so I edited the CMakeList.txt as:
diff --git a/mjpg-streamer-experimental/plugins/input_raspicam/CMakeLists.txt b/mjpg-streamer-experimental/plugins/input_raspicam/CMakeLists.txt
index bb645b2..ecc42df 100644
--- a/mjpg-streamer-experimental/plugins/input_raspicam/CMakeLists.txt
+++ b/mjpg-streamer-experimental/plugins/input_raspicam/CMakeLists.txt
@@ -1,5 +1,5 @@
-if (EXISTS /opt/vc/include)
+if (EXISTS /usr/include/interface/vcos)
set(HAS_RASPI ON)
else()
set(HAS_RASPI OFF)
@@ -10,13 +10,12 @@ MJPG_STREAMER_PLUGIN_OPTION(input_raspicam "Raspberry Pi input camera plugin"
if (PLUGIN_INPUT_RASPICAM)
- include_directories(/opt/vc/include)
- include_directories(/opt/vc/include/interface/vcos)
- include_directories(/opt/vc/include/interface/vcos/pthreads)
- include_directories(/opt/vc/include/interface/vmcs_host)
- include_directories(/opt/vc/include/interface/vmcs_host/linux)
+ include_directories(/usr/include/interface/vcos)
+ include_directories(/usr/include/interface/vcos/pthreads)
+ include_directories(/usr/include/interface/vmcs_host)
+ include_directories(/usr/include/interface/vmcs_host/linux)
- link_directories(/opt/vc/lib)
+ link_directories(/usr/lib)
MJPG_STREAMER_PLUGIN_COMPILE(input_raspicam input_raspicam.c)
and got input_raspicam.so
successfully.
I'm not sure this method is reasonable, it works on my rpi.
got a fresh install of raspbian running and I keep on encountering this issue :(
it seems that vcos.h doesn't exist or something like that. I tried to install Raspbian via NOOBS. Is that the wrong approach?