question about source build error

Forum for questions and support relating to the 1.30.x releases only.
Locked
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

question about source build error

Post by rockedge »

I wanted to work with the latest from the edge version so attempted to compile but the build stops at 84%

Code: Select all

[ 80%] Building CXX object src/CMakeFiles/zm.dir/zm_utils.cpp.o
[ 82%] Building CXX object src/CMakeFiles/zm.dir/zm_video.cpp.o
[ 84%] Building CXX object src/CMakeFiles/zm.dir/zm_videostore.cpp.o
/root/my-applications/zoneminder-master/src/zm_videostore.cpp: In member function ‘bool VideoStore::setup_resampler()’:
/root/my-applications/zoneminder-master/src/zm_videostore.cpp:418:25: error: ‘AVCodecContext’ has no member named ‘refcounted_frames’
   audio_output_context->refcounted_frames = 1;
                         ^
/root/my-applications/zoneminder-master/src/zm_videostore.cpp: In member function ‘void VideoStore::dumpPacket(AVPacket*)’:
/root/my-applications/zoneminder-master/src/zm_videostore.cpp:593:7: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 11 has type ‘int’ [-Wformat=]
       );
       ^
/root/my-applications/zoneminder-master/src/zm_videostore.cpp:593:7: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 11 has type ‘int’ [-Wformat=]
make[2]: *** [src/CMakeFiles/zm.dir/zm_videostore.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/zm.dir/all] Error 2
make: *** [all] Error 
not a critical problem but interested finding out why. It is the first version in awhile not to compile and build successfully.

thanks for any pointers!
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: question about source build error

Post by knight-of-ni »

The first thing we need to know is how are you trying to build zoneminder? Are you using cmake then make install, or are you trying to build a package using the do_debian script provided by us? The latter is the better way to go. If the former, then it is always good see what cmake -D flags you set when you called cmake.

Moving on to the error, ZoneMinder failed to build against the ffmpeg installed on your system so the questions one must ask are:
- what version of ffmpeg is installed on your system?
- are the ffmpeg development headers installed on your system?
- once we've established that the development headers are installed then we need to know where on your filesystem the headers have been installed to
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: question about source build error

Post by rockedge »

knnniggett wrote: Fri Jun 09, 2017 2:17 pm - are the ffmpeg development headers installed on your system?
- once we've established that the development headers are installed then we need to know where on your filesystem the headers have been installed to
Thanks for the insight. I am using

Code: Select all

cmake -C zm_conf.cmake -DZM_CGIDIR=/usr/lib/zoneminder/cgi-bin .
after running

Code: Select all

 ./cmakecacheimport.sh /etc/zm/zm.conf
I thought it had something to do with ffmpeg. I am using a static build of ffmpeg version 3.2.2-static. I do not have the development headers installed I believe. my OS is Puppy Linux Tahr 6.0.6 running ZM 1.30.4 with a Hiawatha web server.
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: question about source build error

Post by rockedge »

I built FFMPEG 3.2.2 from scratch which compiled successfully. I now went past the last error and encounter this now.

Code: Select all

Scanning dependencies of target zma
[ 88%] Building CXX object src/CMakeFiles/zma.dir/zma.cpp.o
Linking CXX executable zma
/usr/local/lib/libavutil.a(mathematics.o): In function `av_rescale_delta':
/root/my-applications/ffmpeg-3.3.2/libavutil/mathematics.c:168: multiple definition of `av_rescale_delta'
libzm.a(zm_ffmpeg.cpp.o):zm_ffmpeg.cpp:(.text+0x84c0): first defined here
/usr/bin/ld: /usr/local/lib/libavcodec.a(cuvid.o): undefined reference to symbol 'dlopen@@GLIBC_2.1'
/lib/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [src/zma] Error 1
make[1]: *** [src/CMakeFiles/zma.dir/all] Error 2
make: *** [all] Error 2
any hints?
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: question about source build error

Post by rockedge »

Any help here or what? Come on and think outside of the box your in...why did it build successfully for me since v 1.26.5 and now it doesn't? what has changed with FFMPEG??? Any thing at all in a form of advice from the masters at the helm?
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: question about source build error

Post by iconnor »

The is a lot of work being done. Update and try again.
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: question about source build error

Post by rockedge »

Thanks for the hard work! I will update from the master branch and keep trying to get a successful build again.
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: question about source build error

Post by rockedge »

I updated to the latest with a git pull then attempted to compile. The build went to 84% and these appeared and halted the compiling.

Code: Select all

[ 82%] Building CXX object src/CMakeFiles/zm.dir/zm_video.cpp.o
[ 84%] Building CXX object src/CMakeFiles/zm.dir/zm_videostore.cpp.o
/root/ftpd/zoneminder-master/src/zm_videostore.cpp: In member function ‘bool VideoStore::setup_resampler()’:
/root/ftpd/zoneminder-master/src/zm_videostore.cpp:436:25: error: ‘AVCodecContext’ has no member named ‘refcounted_frames’
   audio_output_context->refcounted_frames = 1;
                         ^
/root/ftpd/zoneminder-master/src/zm_videostore.cpp: In member function ‘void VideoStore::dumpPacket(AVPacket*)’:
/root/ftpd/zoneminder-master/src/zm_videostore.cpp:611:7: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 11 has type ‘int’ [-Wformat=]
       );
       ^
/root/ftpd/zoneminder-master/src/zm_videostore.cpp:611:7: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 11 has type ‘int’ [-Wformat=]
make[2]: *** [src/CMakeFiles/zm.dir/zm_videostore.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/zm.dir/all] Error 2
make: *** [all] Error 2
I will keep updating and check if ZM will build.
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: question about source build error

Post by rockedge »

pulled the latest code from the master branch...tried to build to no avail. Still stops at 84% completion.
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: question about source build error

Post by iconnor »

I havn't done any testing with ffmpeg 3.3.2 so I will get around to that. Will post here when done.
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: question about source build error

Post by rockedge »

Today pulled the latest code from the master branch. The build went to 88% and stopped BUT on a different error than before.

Code: Select all

Scanning dependencies of target zma
[ 88%] Building CXX object src/CMakeFiles/zma.dir/zma.cpp.o
Linking CXX executable zma
/usr/local/lib/libavutil.a(mathematics.o): In function `av_rescale_delta':
/root/my-applications/ffmpeg-3.3.2/libavutil/mathematics.c:168: multiple definition of `av_rescale_delta'
libzm.a(zm_ffmpeg.cpp.o):zm_ffmpeg.cpp:(.text+0x84c0): first defined here
/usr/bin/ld: /usr/local/lib/libavcodec.a(cuvid.o): undefined reference to symbol 'dlopen@@GLIBC_2.1'
/lib/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [src/zma] Error 1
make[1]: *** [src/CMakeFiles/zma.dir/all] Error 2
make: *** [all] Error 2
root#
sebzmcctv
Posts: 1
Joined: Mon Jul 17, 2017 2:33 am

Re: question about source build error

Post by sebzmcctv »

Dear,
I need Your help, I install zoneminder 1.30.2 from source, every thing
working well, i install 12 cameras on motion detect, 3 cameras working
perfect and rest of all not generating alerts if I opened live feed or open
the montage view and log generating INF ZMS - got signal 15 (exited)

but if I will not opened any live feed alerts generating properly ....

Advance thanks for your kind help.
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: question about source build error

Post by rockedge »

just for sake of information, I was able to successfully build zoneminder 1.31.1 from source using the code from github zoneminder master branch. Using a Puppy Linux Xenial 7.0.6 operating system that I built using the woof-ce scripts. The compilation worked smoothly and installed on top of a zoneminder 1.29.0 setup. After updating the db and setting the permissions and setting up a zm_custom.conf for the path for the /cgi-bin..... ZM started right up and the log is green.
Locked