Zoneminder 1.25 not building on modern GCC compilers (4.7)
Posted: Sat Jul 20, 2013 1:18 am
Hello,
I cannot believe nobody reported this on the forums, or I totally failed to find a thread that is related. Anyways, I am trying to build ZOneminder on a slackware64-14 machine with GCC 4.7 and it fails. Apparently, this is due to the fact that "unistd.h is no longer included in libstdc++" in GCC 4.7
See http://www.linuxquestions.org/questions ... ost4993552 for some info (noit a whole lot but still).
Failing to compile ZM 1.25 with GCC4.7 seems very well known, but still the sources are not adapted to recent GCC versions. Patches are not available as well. I am not a dev so its going to be climbing a mountain barefoot for me to patch the files and make it work.'
Has anyone built ZM 1.25 with GCC 4.7+ ?? If so, how?
THe build command fails with:
root@lhost2:~/zm# make
make all-recursive
make[1]: Entering directory `/root/zm'
Making all in src
make[2]: Entering directory `/root/zm/src'
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -Iyes/include -Wall -Wno-sign-compare -Iyes/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[2]: *** [zm_logger.o] Error 1
make[2]: Leaving directory `/root/zm/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/zm'
make: *** [all] Error 2
GCC
root@lhost2:~/zm# gcc -v
Reading specs from /usr/lib64/gcc/x86_64-slackware-linux/4.7.1/specs
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-slackware-linux/4.7.1/lto-wrapper
Target: x86_64-slackware-linux
Configured with: ../gcc-4.7.1/configure --prefix=/usr --libdir=/usr/lib64 --mandir=/usr/man --infodir=/usr/info --enable-shared --enable-bootstrap --enable-languages=ada,c,c++,fortran,go,java,lto,objc --enable-threads=posix --enable-checking=release --enable-objc-gc --with-system-zlib --with-python-dir=/lib64/python2.7/site-packages --disable-libunwind-exceptions --enable-__cxa_atexit --enable-libssp --enable-lto --with-gnu-ld --verbose --enable-java-home --with-java-home=/usr/lib64/jvm/jre --with-jvm-root-dir=/usr/lib64/jvm --with-jvm-jar-dir=/usr/lib64/jvm/jvm-exports --with-arch-directory=amd64 --with-antlr-jar=/slack/TMPTMPTMP/gcc-round-two/antlr-runtime-3.4.jar --enable-java-awt=gtk --disable-gtktest --disable-multilib --target=x86_64-slackware-linux --build=x86_64-slackware-linux --host=x86_64-slackware-linux
Thread model: posix
gcc version 4.7.1 (GCC)
I cannot believe nobody reported this on the forums, or I totally failed to find a thread that is related. Anyways, I am trying to build ZOneminder on a slackware64-14 machine with GCC 4.7 and it fails. Apparently, this is due to the fact that "unistd.h is no longer included in libstdc++" in GCC 4.7
See http://www.linuxquestions.org/questions ... ost4993552 for some info (noit a whole lot but still).
Failing to compile ZM 1.25 with GCC4.7 seems very well known, but still the sources are not adapted to recent GCC versions. Patches are not available as well. I am not a dev so its going to be climbing a mountain barefoot for me to patch the files and make it work.'
Has anyone built ZM 1.25 with GCC 4.7+ ?? If so, how?
THe build command fails with:
root@lhost2:~/zm# make
make all-recursive
make[1]: Entering directory `/root/zm'
Making all in src
make[2]: Entering directory `/root/zm/src'
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -Iyes/include -Wall -Wno-sign-compare -Iyes/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[2]: *** [zm_logger.o] Error 1
make[2]: Leaving directory `/root/zm/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/zm'
make: *** [all] Error 2
GCC
root@lhost2:~/zm# gcc -v
Reading specs from /usr/lib64/gcc/x86_64-slackware-linux/4.7.1/specs
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-slackware-linux/4.7.1/lto-wrapper
Target: x86_64-slackware-linux
Configured with: ../gcc-4.7.1/configure --prefix=/usr --libdir=/usr/lib64 --mandir=/usr/man --infodir=/usr/info --enable-shared --enable-bootstrap --enable-languages=ada,c,c++,fortran,go,java,lto,objc --enable-threads=posix --enable-checking=release --enable-objc-gc --with-system-zlib --with-python-dir=/lib64/python2.7/site-packages --disable-libunwind-exceptions --enable-__cxa_atexit --enable-libssp --enable-lto --with-gnu-ld --verbose --enable-java-home --with-java-home=/usr/lib64/jvm/jre --with-jvm-root-dir=/usr/lib64/jvm --with-jvm-jar-dir=/usr/lib64/jvm/jvm-exports --with-arch-directory=amd64 --with-antlr-jar=/slack/TMPTMPTMP/gcc-round-two/antlr-runtime-3.4.jar --enable-java-awt=gtk --disable-gtktest --disable-multilib --target=x86_64-slackware-linux --build=x86_64-slackware-linux --host=x86_64-slackware-linux
Thread model: posix
gcc version 4.7.1 (GCC)