zoneminder-1.25.0 won't build in slackware64-current
Although it seems to build fine in slackware-13.37 and perhaps also slackware64-13.37, ZoneMinder fails to make in slackware64-current.
I tried the src2pkg script posted here without success. Note that the final script used was never posted, but the problem was missing files and or files in the wrong place, not that the source failed to make.
I would appreciate any help.
The files in the source directory are
README ZoneMinder.info zm_apache.conf
README.PERLDEPS cambozola-0.92.tar.gz zm_logrotate
README.SLACKWARE jscalendar-1.0.zip zoneminder.src2pkg
The tail end of the make says
make: Entering directory `/tmp/zoneminder-1.25.0-src-1/src'
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 -MT zm_logger.o -MD -MP -MF .deps/zm_logger.Tpo -c -o zm_logger.o zm_logger.cpp
zm_logger.cpp: In constructor 'Logger::Logger()':
zm_logger.cpp:112:49: error: 'isatty' was not declared in this scope
zm_logger.cpp: In member function 'void Logger::logFile(const string&)':
zm_logger.cpp:444:69: error: 'getpid' was not declared in this scope
zm_logger.cpp: In member function 'void Logger::logPrint(bool, const char*, int, int, const char*, ...)':
zm_logger.cpp:519:39: error: 'syscall' was not declared in this scope
zm_logger.cpp:521:22: error: 'getpid' was not declared in this scope
zm_logger.cpp: At global scope:
zm_logger.cpp:43:13: warning: 'void subtractTime(timeval*, timeval*)' defined but not used [-Wunused-function]
make: *** [zm_logger.o] Error 1
make: Leaving directory `/tmp/zoneminder-1.25.0-src-1/src'
make: *** [install-recursive] Error 1
The reason it fails in -current and not in 13.37 is down to recent changes in GCC 4.7 that made their way into -current: unistd.h is no longer included in libstdc++, so you'll need to patch that file so that unistd.h is explicitly included. This should probably get reported to the zoneminder developers.
Thank you, that is the fix.
These may not be technically correct, but do fix the problems:
--- src/zm_logger.cpp.org 2012-04-12 00:11:05.606879680 -0700
+++ src/zm_logger.cpp 2012-04-12 00:11:33.075499596 -0700
@@ -33,6 +33,7 @@
bool Logger::smInitialised = false;
Logger *Logger::smInstance = 0;
--- src/zm_thread.h.org 2012-04-12 00:10:04.848687183 -0700
+++ src/zm_thread.h 2012-04-12 00:10:30.415302810 -0700
@@ -17,6 +17,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Trying to patch the files as you suggested, I get:
Copied the text you provided to zm_logger.patch & zm_thread.patch
Whats wrong? Any idea? Thanks!
|All times are GMT -5. The time now is 05:28 AM.|