shakurocom / janus-plugin-rtmp

Janus plugin for RTMP broadcasting
GNU General Public License v3.0
16 stars 11 forks source link

Header file missing error while building. #3

Open danushkak opened 3 years ago

danushkak commented 3 years ago

I have installed Janus at /opt/janus with --libdir=/usr/lib64.

Did the following and got the error.

$ apt install libgstreamer1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad
$ sudo cp /home/ubuntu/janus-gateway/{.,plugins}/*.h /opt/janus
$ git clone https://github.com/shakurocom/janus-plugin-rtmp.git
$ cd janus-plugin-rtmp
$ ./autogen.sh
$ ./configure --prefix=/usr
$ make
depbase=`echo src/libjanus_rtmp.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/bash ./libtool  --tag=CC   --mode=compile gcc -DPACKAGE_NAME=\"janus_plugin_rtmp\" -DPACKAGE_TARNAME=\"janus_plugin_rtmp\" -DPACKAGE_VERSION=\"0.0.1\" -DPACKAGE_STRING=\"janus_plugin_rtmp\ 0.0.1\" -DPACKAGE_BUGREPORT=\"agureiev@shakuro.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"janus_plugin_rtmp\" -DVERSION=\"0.0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I.     -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -MT src/libjanus_rtmp.lo -MD -MP -MF $depbase.Tpo -c -o src/libjanus_rtmp.lo src/libjanus_rtmp.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DPACKAGE_NAME=\"janus_plugin_rtmp\" -DPACKAGE_TARNAME=\"janus_plugin_rtmp\" -DPACKAGE_VERSION=\"0.0.1\" "-DPACKAGE_STRING=\"janus_plugin_rtmp 0.0.1\"" -DPACKAGE_BUGREPORT=\"agureiev@shakuro.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"janus_plugin_rtmp\" -DVERSION=\"0.0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -MT src/libjanus_rtmp.lo -MD -MP -MF src/.deps/libjanus_rtmp.Tpo -c src/libjanus_rtmp.c  -fPIC -DPIC -o src/.libs/libjanus_rtmp.o
src/libjanus_rtmp.c:21:10: fatal error: janus/plugin.h: No such file or directory
   21 | #include "janus/plugin.h"
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:471: src/libjanus_rtmp.lo] Error 1

Also tried $ ./configure --prefix=/usr --libdir=/usr/lib64 but got the same error.

alg commented 3 years ago

I think it happened because you copied headers into /opt/janus while specified --prefix=/usr.

danushkak commented 3 years ago

I think it happened because you copied headers into /opt/janus while specified --prefix=/usr.

What do you suggest? Where should I copy the headers and what commands should I execute?

alg commented 3 years ago

I suggest you follow the commands here: https://github.com/shakurocom/janus-plugin-rtmp

danushkak commented 3 years ago

I followed that. Since the janus installation path is different what do you suggest I use as the prefix? --prefix=/opt/janus ?

alg commented 3 years ago

I need to experiment to suggest, and not having time for that now. I use Janus in Docker containers and installing them in that very location.

vipulpatel310 commented 3 years ago

Need to copy header files into build directory mkdir janus-plugin-rtmp/janus cp /janus-gateway/{.,plugins}/*.h janus-plugin-rtmp/janus cd janus-plugin-rtmp ./configure --prefix=/opt/janus make && sudo make install