Page 1 of 1

Build error

Posted: Fri Aug 19, 2011 10:27 pm
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 );
    }

Re: Build error

Posted: Sat Aug 20, 2011 5:38 pm
by mitch
Its probably a security catch:) It should be:
Error( "%s", e.getMessage().c_str() );

Re: Build error

Posted: Sat Aug 20, 2011 9:17 pm
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.