Build failure

Forum for questions and support relating to the 1.25.x releases only.
Locked
Segfault
Posts: 8
Joined: Sat Mar 02, 2013 1:22 pm

Build failure

Post by Segfault »

After successful configure the build fails like this:

Code: Select all

x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/include -Iyes/include -Wall -Wno-sign-compare -fno-inline -Iyes/include   -march=core2 -O2 -pipe -mcx16 -msahf -msse4.1 -floop-interchange -floop-strip-mine -floop-block -fno-lto -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
Any clues what's missing?
Cant post the link to pastebin. :(
Segfault
Posts: 8
Joined: Sat Mar 02, 2013 1:22 pm

Re: Build failure

Post by Segfault »

OK, this was because gcc-4.7 does not include unistd.h any more. Now I'm hitting another block.

Code: Select all

x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/include -Iyes/include -Wall -Wno-sign-compare -fno-inline -Iyes/include   -march=core2 -O2 -pipe -mcx16 -msahf -msse4.1 -floop-interchange -floop-strip-mine -floop-block -fno-lto -D__STDC_CONSTANT_MACROS -MT zm_ffmpeg_camera.o -MD -MP -MF .deps/zm_ffmpeg_camera.Tpo -c -o zm_ffmpeg_camera.o zm_ffmpeg_camera.cpp
zm_ffmpeg_camera.cpp:105:44: error: missing binary operator before token "("
In file included from zm_ffmpeg_camera.cpp:24:0:
zm_ffmpeg_camera.h:39:5: error: 'AVFormatContext' does not name a type
zm_ffmpeg_camera.h:41:5: error: 'AVCodecContext' does not name a type
zm_ffmpeg_camera.h:42:5: error: 'AVCodec' does not name a type
zm_ffmpeg_camera.h:44:5: error: 'AVFrame' does not name a type
zm_ffmpeg_camera.h:45:5: error: 'AVFrame' does not name a type
zm_ffmpeg_camera.cpp: In constructor 'FfmpegCamera::FfmpegCamera(int, const string&, int, int, int, int, int, int, int, bool)':
zm_ffmpeg_camera.cpp:35:5: error: 'mFormatContext' was not declared in this scope
zm_ffmpeg_camera.cpp:37:5: error: 'mCodecContext' was not declared in this scope
... more errors like above
How to fix that?
Segfault
Posts: 8
Joined: Sat Mar 02, 2013 1:22 pm

Re: Build failure

Post by Segfault »

Hmmm ... mmm ... I removed FFMPEG from this box, now I get stuck in a new way ...

Code: Select all

zm_local_camera.cpp:742:49: error: invalid conversion from '__u32 {aka unsigned int}' to 'v4l2_buf_type' [-fpermissive]
Segfault
Posts: 8
Joined: Sat Mar 02, 2013 1:22 pm

Re: Build failure

Post by Segfault »

Uh, this was because v4l2 API change in recent kernels. But still no cigar ...

Code: Select all

x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/include -Ino/include -Wall -Wno-sign-compare -fno-inline -Ino/include   -march=core2 -O2 -pipe -mcx16 -msahf -msse4.1 -floop-interchange -floop-strip-mine -floop-block -fno-lto -D__STDC_CONSTANT_MACROS -MT zm_local_camera.o -MD -MP -MF .deps/zm_local_camera.Tpo -c -o zm_local_camera.o zm_local_camera.cpp
zm_local_camera.cpp: In static member function 'static bool LocalCamera::GetCurrentSettings(const char*, char*, int, bool)':
zm_local_camera.cpp:774:22: error: 'PATH_MAX' was not declared in this scope
zm_local_camera.cpp:779:21: error: 'queryDevice' was not declared in this scope
zm_local_camera.cpp:781:22: error: 'queryDevice' was not declared in this scope
zm_local_camera.cpp:782:29: error: 'queryDevice' was not declared in this scope
zm_local_camera.cpp:799:67: error: 'queryDevice' was not declared in this scope
zm_local_camera.cpp:801:54: error: 'queryDevice' was not declared in this scope
zm_local_camera.cpp:811:92: error: 'queryDevice' was not declared in this scope
zm_local_camera.cpp:936:91: error: 'queryDevice' was not declared in this scope
zm_local_camera.cpp:961:82: error: 'queryDevice' was not declared in this scope
make[2]: *** [zm_local_camera.o] Error 1
Anybody knows how to fix that?
Segfault
Posts: 8
Joined: Sat Mar 02, 2013 1:22 pm

Re: Build failure

Post by Segfault »

Giving up, there is no end of problems. :cry:
Segfault
Posts: 8
Joined: Sat Mar 02, 2013 1:22 pm

Re: Build failure

Post by Segfault »

Question!

Is there a ZoneMinder source that builds with current kernel, current GCC, current FFMPEG, etc? :evil:
axelm
Posts: 46
Joined: Wed Feb 06, 2013 1:50 pm

Re: Build failure

Post by axelm »

Segfault wrote:Question!

Is there a ZoneMinder source that builds with current kernel, current GCC, current FFMPEG, etc? :evil:
This one builds fine on my Fedora 18 i686 box.

http://www.zoneminder.com/forums/viewto ... =9&t=20587

./configure --host=i686-redhat-linux-gnu --build=i686-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-libarch=lib --with-mysql=/usr --with-webdir=/usr/share/zoneminder/www --with-cgidir=/usr/libexec/zoneminder/cgi-bin --with-webuser=apache --with-webgroup=apache --enable-mmap=yes --disable-debug --enable-crashtrace=yes --with-ffmpeg=/usr ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass CXXFLAGS="-D__STDC_CONSTANT_MACROS -I/usr/include/ffmpeg -msse2"
axelm
Posts: 46
Joined: Wed Feb 06, 2013 1:50 pm

Re: Build failure

Post by axelm »

gcc version 4.7.2 20121109 (Red Hat 4.7.2-8) (GCC)

ffmpeg versions:
libavutil 51. 73.101 / 51. 73.101
libavcodec 54. 59.100 / 54. 59.100
libavformat 54. 29.104 / 54. 29.104
libavdevice 54. 2.101 / 54. 2.101
libavfilter 3. 17.100 / 3. 17.100
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100

kernel 3.7.9-205.fc18.i686
Segfault
Posts: 8
Joined: Sat Mar 02, 2013 1:22 pm

Re: Build failure

Post by Segfault »

Thank you, axelm

Will get back to it tomorrow morning, right now I'm enjoying Heineken and do not feel l want to mess with it.
Locked