LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 04-11-2012, 05:46 PM   #1
buckprivatemil
LQ Newbie
 
Registered: May 2011
Posts: 6

Rep: Reputation: Disabled
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
 
Old 04-11-2012, 07:28 PM   #2
CTM
Member
 
Registered: Apr 2004
Distribution: Slackware64 14.0 / 14.1
Posts: 131

Rep: Reputation: 50
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.
 
Old 04-12-2012, 02:29 AM   #3
buckprivatemil
LQ Newbie
 
Registered: May 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thank you, that is the fix.

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>

bool Logger::smInitialised = false;
Logger *Logger::smInstance = 0;


02-zm_thread.patch
--- 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.
//

+#include <unistd.h>
#ifndef ZM_THREAD_H
#define ZM_THREAD_H
 
Old 07-19-2013, 08:07 PM   #4
lpallard
Member
 
Registered: Nov 2008
Location: Milky Way
Distribution: Slackware (various releases)
Posts: 970

Rep: Reputation: 44
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

Code:
--- 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>

bool Logger::smInitialised = false;
Logger *Logger::smInstance = 0;
Code:
--- 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.
//

+#include <unistd.h>
#ifndef ZM_THREAD_H
#define ZM_THREAD_H
Then tried to apply the patch.

Whats wrong? Any idea? Thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Slackware64 -current: w3m fails to build... andrew.46 Slackware 12 06-16-2013 01:05 AM
[SOLVED] Cannot build physfs-2.0.2 on slackware64 -current andrew.46 Slackware 2 04-09-2012 10:21 PM
VirtualBox won't run after upgrade to slackware64 current Ook Slackware 9 06-18-2011 07:13 AM
[SOLVED] madwifi driver won;t build with slackware64 13.1 squid890 Linux - Wireless Networking 2 06-07-2010 04:46 PM
What changes must be made in a slackBuild from 11.x To build for Slackware64 current? Alexvader Slackware 5 12-30-2009 01:38 PM


All times are GMT -5. The time now is 06:55 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration