Build error

Forum for questions and support relating to the 1.24.x releases only.
Locked
User avatar
Barry Jackson
Posts: 21
Joined: Wed Jun 30, 2010 8:11 pm

Build error

Post by Barry Jackson »

Can anyone suggest what may be cause of this error building Zoneminder 1.24.4 in Mageia x86_64?

Code: Select all

-------snip----------
x86_64-mageia-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/include -I/usr/include -Wall -Wno-sign-compare -fno-inline -I/usr/include -D__STDC_CONSTANT_MACROS  -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -MT zm_rtsp.o -MD -MP -MF .deps/zm_rtsp.Tpo -c -o zm_rtsp.o zm_rtsp.cpp
zm_rtsp.cpp: In member function ‘virtual int RtspThread::run()’:
zm_rtsp.cpp:314:9: error: format not a string literal and no format arguments
The source at zm_rtsp.cpp:314 is :-

Code: Select all

    catch( const Exception &e )
    {
        Error( e.getMessage().c_str() );                         // line 314
        return( -1 );
    }
Yes - I have donated!
mitch
Posts: 169
Joined: Thu Apr 30, 2009 4:18 am

Re: Build error

Post by mitch »

Its probably a security catch:) It should be:
Error( "%s", e.getMessage().c_str() );
User avatar
Barry Jackson
Posts: 21
Joined: Wed Jun 30, 2010 8:11 pm

Re: Build error

Post by Barry Jackson »

mitch wrote:Its probably a security catch:) It should be:
Error( "%s", e.getMessage().c_str() );
Thanks for answering - I suspect you saw my IRC request looking down the nicks ;)
I just discovered the reason and patched it along with two more in zm_signal.cpp and it now almost builds.
I came back to delete my original post and found your reply.
I am attempting to package ZM for Mageia, but I'm a novice packager so it will be a long haul.
Yes - I have donated!
Locked