Edward-Wu / srt-live-server

srt live server for low latency
Other
644 stars 192 forks source link

make issue: srt/srt.h not found #110

Open sonezu opened 2 years ago

sonezu commented 2 years ago

Hi guys, this is probably a pretty simple issue since I'm a linux novice. I'm on a managed linux (Debian) system without sudo rights. I've installed srt and cmake via homebrew without any issues and I'm using srt-live-transmit quite often without any problem.

I've created a clone sls directory and went to the command line:

$ make
g++ -c -g slscore/SLSEpollThread.cpp -o obj/SLSEpollThread.o 
In file included from slscore/SLSEpollThread.cpp:30:0:
slscore/SLSEpollThread.hpp:29:21: fatal error: srt/srt.h: No such file or directory
compilation terminated.
make: *** [Makefile:61: obj/SLSEpollThread.o] Error 1

I can only assume that the script is looking for the srt library in the wrong place since it is located at ~/.linuxbrew/Cellar/srt/1.4.4/include

I've spent a lot of time to get this whole thing running but I seem to be stuck now and need your help! Thanks a lot!

AmarKalabic commented 2 years ago

Hey, have you managed to solve this in the mean time? I am struggling with the same issue

edit: I have managed to solve this by properly installing SRT (running make install after make).

PatTheMav commented 1 year ago

Late to the party, but you need to add the library and include search paths to the compiler flags to use the Homebrew locations when invoking make, like so:

CFLAGS="-I/opt/homebrew/Cellar/openssl@3/3.0.5/include -I/opt/homebrew/Cellar/srt/1.5.1/include -I/opt/homebrew/Cellar/srt/1.5.1/include/srt -L/opt/homebrew/Cellar/srt/1.5.1/lib -lsrt" make