Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build from source at least on ArchLinux #58

Closed
tytan652 opened this issue May 7, 2021 · 10 comments · Fixed by #64
Closed

Unable to build from source at least on ArchLinux #58

tytan652 opened this issue May 7, 2021 · 10 comments · Fixed by #64
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@tytan652
Copy link
Contributor

tytan652 commented May 7, 2021

I'm trying to update my AUR recipe of obs-rtspserver but when I compile it, I get this:

/home/tytan652/Programming/AUR/obs-rtspserver/src/obs-studio-26.1.2/plugins/obs-rtspserver-2.0.3/rtsp-server/xop/AACSource.cpp: In member function ‘virtual std::string xop::AACSource::GetAttribute()’:
/home/tytan652/Programming/AUR/obs-rtspserver/src/obs-studio-26.1.2/plugins/obs-rtspserver-2.0.3/rtsp-server/xop/AACSource.cpp:73:34: error: format not a string literal and no format arguments [-Werror=format-security]
   73 |   snprintf(nullptr, 0, rtpmap_fmt) + strlen(fmtp_fmt);
      |                                  ^
cc1plus: some warnings being treated as errors
make[2]: *** [plugins/obs-rtspserver-2.0.3/rtsp-server/CMakeFiles/rtsp-server.dir/build.make:314: plugins/obs-rtspserver-2.0.3/rtsp-server/CMakeFiles/rtsp-server.dir/xop/AACSource.cpp.o] Error 1
make[2]: Leaving directory '/home/tytan652/Programming/AUR/obs-rtspserver/src/obs-studio-26.1.2/build'
make[1]: *** [CMakeFiles/Makefile2:1705: plugins/obs-rtspserver-2.0.3/rtsp-server/CMakeFiles/rtsp-server.dir/all] Error 2
make[1]: Leaving directory '/home/tytan652/Programming/AUR/obs-rtspserver/src/obs-studio-26.1.2/build'
make: *** [Makefile:156: all] Error 2
make: Leaving directory '/home/tytan652/Programming/AUR/obs-rtspserver/src/obs-studio-26.1.2/build'

Note that AUR packagers should not modify default flags.
Edit: The same happen with 2.0.1 and 2.0.2. I tried to build it on another ArchLinux machine same happen



PS: There is two AUR recipes for obs-rtspserver:

  • obs-rtspserver built from source
  • obs-rtspserver-bin made with precompiled binaries
@brodi1 brodi1 added bug Something isn't working help wanted Extra attention is needed labels May 9, 2021
@brodi1
Copy link
Collaborator

brodi1 commented Jun 10, 2021

Hi @tytan652 Does this warning / error still occur with OBS 27 / obs-rtspserver 2.0.4?

@tytan652
Copy link
Contributor Author

I'm actually giving it a try.

@tytan652
Copy link
Contributor Author

tytan652 commented Jun 10, 2021

Same error with 2.0.4 with OBS 27

/home/tytan652/Programming/AUR/obs-rtspserver/src/obs-studio-27.0.0/plugins/obs-rtspserver-2.0.4/rtsp-server/xop/AACSource.cpp: In member function 'virtual std::string xop::AACSource::GetAttribute()':
/home/tytan652/Programming/AUR/obs-rtspserver/src/obs-studio-27.0.0/plugins/obs-rtspserver-2.0.4/rtsp-server/xop/AACSource.cpp:75:25: error: format not a string literal and no format arguments [-Werror=format-security]
   75 |                 snprintf(nullptr, 0, rtpmap_fmt) + strlen(fmtp_fmt);
      |                 ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: some warnings being treated as errors
make[2]: *** [plugins/obs-rtspserver-2.0.4/rtsp-server/CMakeFiles/rtsp-server.dir/build.make:314: plugins/obs-rtspserver-2.0.4/rtsp-server/CMakeFiles/rtsp-server.dir/xop/AACSource.cpp.o] Error 1
make[2]: Leaving directory '/home/tytan652/Programming/AUR/obs-rtspserver/src/obs-studio-27.0.0/build'
make[1]: *** [CMakeFiles/Makefile2:1192: plugins/obs-rtspserver-2.0.4/rtsp-server/CMakeFiles/rtsp-server.dir/all] Error 2
make[1]: Leaving directory '/home/tytan652/Programming/AUR/obs-rtspserver/src/obs-studio-27.0.0/build'
make: *** [Makefile:156: all] Error 2
make: Leaving directory '/home/tytan652/Programming/AUR/obs-rtspserver/src/obs-studio-27.0.0/build'

@tytan652
Copy link
Contributor Author

When I look at this
Changing:

snprintf(nullptr, 0, rtpmap_fmt) + strlen(fmtp_fmt);

To:

snprintf(nullptr, 0, "%s", rtpmap_fmt) + strlen(fmtp_fmt);

Make the compilation work, I don't know if it's a good fix.

@brodi1
Copy link
Collaborator

brodi1 commented Jun 10, 2021

@tytan652 I just compiled it with "%d"
Did you tried if the .so file loads?

Edit: I just tried loading the .so file and it loads!

@tytan652
Copy link
Contributor Author

tytan652 commented Jun 10, 2021

It loads with %s even the setting window show up but I got memory leaks 11 on my side.

Edit: 11 memory leaks with %d
Edit: even with obs-rtspserver-bin I get the 11 memory leaks

@tytan652
Copy link
Contributor Author

tytan652 commented Jun 10, 2021

@brodi1
Copy link
Collaborator

brodi1 commented Jun 10, 2021

@tytan652 you are right....

@brodi1
Copy link
Collaborator

brodi1 commented Jun 10, 2021

Edit: even with obs-rtspserver-bin I get the 11 memory leaks

hmm.... I think it is because the other plugins are installed for me there are 13 memory leaks.

obs-rtspserver-bin contains the binary (which was compiled by @iamscottxu) and is downloaded directly from github.

@tytan652
Copy link
Contributor Author

tytan652 commented Jun 10, 2021

I think the 11 memory leaks is another issue. Those one are surely done by not freeing correctly some variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants