[SOLVED] zoneminder-1.25.0 won't build in slackware64-current
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
ZoneMinder-1.25.0.tar.gz slack-desc
The tail end of the make says
make[1]: 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[1]: *** [zm_logger.o] Error 1
make[1]: Leaving directory `/tmp/zoneminder-1.25.0-src-1/src'
make: *** [install-recursive] Error 1
--
buck
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.
These may not be technically correct, but do fix the problems:
01-zm_logger.patch
--- 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 @@
#include <signal.h>
#include <stdarg.h>
#include <errno.h>
+#include <unistd.h>
Trying to patch the files as you suggested, I get:
Code:
bash-4.2# patch -p1 < zm_logger.patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- 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
--------------------------
File to patch: /root/zm/src/zm_logger.cpp
patching file /root/zm/src/zm_logger.cpp
patch: **** malformed patch at line 9: bool Logger::smInitialised = false;
Perhaps I am not applying the patch properly? To do so I:
Copied the text you provided to zm_logger.patch & zm_thread.patch
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.