1.28.1 Upgrade Compile error - CentOS 6
-
- Posts: 28
- Joined: Sun Feb 16, 2014 3:10 pm
1.28.1 Upgrade Compile error - CentOS 6
Hi all,
I've tried two different CentOS boxes now and get the error below. Both are CentOS 6.6 64Bit and currently have ZoneMinder 1.28.0 installed.
I have used git to download latest ZoneMinder, did the usual import config as per INSTALL readme, did the cmake bit. But get this error:
[ 63%] Building CXX object src/CMakeFiles/zm.dir/zm_rtsp.cpp.o
cd /root/zm-28-1/ZoneMinder/src && /usr/bin/c++ -Wall -D__STDC_CONSTANT_MACROS -O2 -I/root/zm-28-1/ZoneMinder/src -I/root/zm-28-1/ZoneMinder -o CMakeFiles/zm.dir/zm_rtsp.cpp.o -c /root/zm-28-1/ZoneMinder/src/zm_rtsp.cpp
/root/zm-28-1/ZoneMinder/src/zm_rtsp.cpp: In destructor ‘virtual RtspThread::~RtspThread()’:
/root/zm-28-1/ZoneMinder/src/zm_rtsp.cpp:214: error: ‘avformat_free_context’ was not declared in this scope
make[2]: *** [src/CMakeFiles/zm.dir/zm_rtsp.cpp.o] Error 1
make[2]: Leaving directory `/root/zm-28-1/ZoneMinder'
make[1]: *** [src/CMakeFiles/zm.dir/all] Error 2
make[1]: Leaving directory `/root/zm-28-1/ZoneMinder'
make: *** [all] Error 2
It is exactly the same error on both. I've linked the ffmpeg modules over as per some posts on here with similar errors. But I just cannot get it going!
I suspect it is something to do with ffmpeg?
cmake I used is:
cmake -DZM_DB_HOST="localhost" -DZM_DB_NAME="zm" -DZM_DB_USER="myzm-username" -DZM_DB_PASS="mypassword" -DZM_WEBDIR="/var/www/html/zm" -DZM_CGIDIR="/var/www/cgi-bin" -DZM_CONTENTDIR="/var/www/html/zm/data" -DZM_EXTRA_LIBS="ssl" -DCMAKE_VERBOSE_MAKEFILE="ON" -DCMAKE_INSTALL_PREFIX="/usr" -DCMAKE_CXX_FLAGS_RELEASE="-D__STDC_CONSTANT_MACROS"
Any ideas?
I've tried two different CentOS boxes now and get the error below. Both are CentOS 6.6 64Bit and currently have ZoneMinder 1.28.0 installed.
I have used git to download latest ZoneMinder, did the usual import config as per INSTALL readme, did the cmake bit. But get this error:
[ 63%] Building CXX object src/CMakeFiles/zm.dir/zm_rtsp.cpp.o
cd /root/zm-28-1/ZoneMinder/src && /usr/bin/c++ -Wall -D__STDC_CONSTANT_MACROS -O2 -I/root/zm-28-1/ZoneMinder/src -I/root/zm-28-1/ZoneMinder -o CMakeFiles/zm.dir/zm_rtsp.cpp.o -c /root/zm-28-1/ZoneMinder/src/zm_rtsp.cpp
/root/zm-28-1/ZoneMinder/src/zm_rtsp.cpp: In destructor ‘virtual RtspThread::~RtspThread()’:
/root/zm-28-1/ZoneMinder/src/zm_rtsp.cpp:214: error: ‘avformat_free_context’ was not declared in this scope
make[2]: *** [src/CMakeFiles/zm.dir/zm_rtsp.cpp.o] Error 1
make[2]: Leaving directory `/root/zm-28-1/ZoneMinder'
make[1]: *** [src/CMakeFiles/zm.dir/all] Error 2
make[1]: Leaving directory `/root/zm-28-1/ZoneMinder'
make: *** [all] Error 2
It is exactly the same error on both. I've linked the ffmpeg modules over as per some posts on here with similar errors. But I just cannot get it going!
I suspect it is something to do with ffmpeg?
cmake I used is:
cmake -DZM_DB_HOST="localhost" -DZM_DB_NAME="zm" -DZM_DB_USER="myzm-username" -DZM_DB_PASS="mypassword" -DZM_WEBDIR="/var/www/html/zm" -DZM_CGIDIR="/var/www/cgi-bin" -DZM_CONTENTDIR="/var/www/html/zm/data" -DZM_EXTRA_LIBS="ssl" -DCMAKE_VERBOSE_MAKEFILE="ON" -DCMAKE_INSTALL_PREFIX="/usr" -DCMAKE_CXX_FLAGS_RELEASE="-D__STDC_CONSTANT_MACROS"
Any ideas?
-
- Posts: 494
- Joined: Sun Jun 29, 2014 1:12 pm
- Location: Melbourne, AU
Re: 1.28.1 Upgrade Compile error - CentOS 6
You didn't mention what version of ffmpeg you have, but here is my best guess.
if ( mFormatContext )
213 {
214 avformat_free_context( mFormatContext );
215 mFormatContext = NULL;
216 }
But avformat_free_context is an ffmpeg API change. https://github.com/FFmpeg/FFmpeg/blob/m ... APIchanges
2011-02-04 - f124b08 - lavf 52.96.0 - avformat_free_context()
Add avformat_free_context() in avformat.h.
Old version was av_free_format_context()
All through the code we have these checks for versions of ffmpeg or libav version to pick the correct function to use, but not here. I will log this as an issue in github, and see if I can do the PR to fix it.
You could try updating ffmpeg that should solve the issue, or wait for the PR.
if ( mFormatContext )
213 {
214 avformat_free_context( mFormatContext );
215 mFormatContext = NULL;
216 }
But avformat_free_context is an ffmpeg API change. https://github.com/FFmpeg/FFmpeg/blob/m ... APIchanges
2011-02-04 - f124b08 - lavf 52.96.0 - avformat_free_context()
Add avformat_free_context() in avformat.h.
Old version was av_free_format_context()
All through the code we have these checks for versions of ffmpeg or libav version to pick the correct function to use, but not here. I will log this as an issue in github, and see if I can do the PR to fix it.
You could try updating ffmpeg that should solve the issue, or wait for the PR.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
Random Selection of Cameras (Dahua and Hikvision)
-
- Posts: 494
- Joined: Sun Jun 29, 2014 1:12 pm
- Location: Melbourne, AU
Re: 1.28.1 Upgrade Compile error - CentOS 6
Hopefully this will fix it. https://github.com/ZoneMinder/ZoneMinder/pull/711
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
Random Selection of Cameras (Dahua and Hikvision)
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: 1.28.1 Upgrade Compile error - CentOS 6
We've merged this into master. It should build now.
Note, however, there is a css bug currently in the master branch which corrupts the gui.
You might want to hold off for now using the master branch for your build.
You currently have two options:
1) Patch the 1.28.1 release with the change and rebuild:
https://github.com/ZoneMinder/ZoneMinde ... f25b.patch
2) Use the centos rpms in zmrepo. All dependencies are included, including a recent version of ffmpeg, so you will need to remove the ffmpeg you currently have before installing.
Note, however, there is a css bug currently in the master branch which corrupts the gui.
You might want to hold off for now using the master branch for your build.
You currently have two options:
1) Patch the 1.28.1 release with the change and rebuild:
https://github.com/ZoneMinder/ZoneMinde ... f25b.patch
2) Use the centos rpms in zmrepo. All dependencies are included, including a recent version of ffmpeg, so you will need to remove the ffmpeg you currently have before installing.
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/
All of these can be found at https://zoneminder.blogspot.com/
-
- Posts: 28
- Joined: Sun Feb 16, 2014 3:10 pm
Re: 1.28.1 Upgrade Compile error - CentOS 6
Thanks all!
Patched file and still get the error, although maybe user error as not patched files since the late 90s lol. I used patch zm_rtsp.cpp < that.patch.file.I.downloaded
Will play some more, if not I'll look at reinstalling. I want to update it to CentOS 7 anyway. Possibly change to different hardware too. Didn't know about the zmrepo, that's
pretty good! Thanks!!
Patched file and still get the error, although maybe user error as not patched files since the late 90s lol. I used patch zm_rtsp.cpp < that.patch.file.I.downloaded
Will play some more, if not I'll look at reinstalling. I want to update it to CentOS 7 anyway. Possibly change to different hardware too. Didn't know about the zmrepo, that's
pretty good! Thanks!!
-
- Posts: 28
- Joined: Sun Feb 16, 2014 3:10 pm
Re: 1.28.1 Upgrade Compile error - CentOS 6
Just an update.
I reinstalled CentOS 7 and that had no end of errors, so reverted back to a fresh install of CentOS 6.6.
Used the zmrepo, that is pretty good thanks! All up and running again! Even restored original db, so didn't have to setup cameras again.
With the 1.28.1 GUI bug. Is that where you cannot see a live feed or recordings? I just get a broken jpeg icon in the middle. Tried Firefox and Chrome.
I can see under Event..Show Timeline in the small preview though.. but still cannot view it on click.
I reinstalled CentOS 7 and that had no end of errors, so reverted back to a fresh install of CentOS 6.6.
Used the zmrepo, that is pretty good thanks! All up and running again! Even restored original db, so didn't have to setup cameras again.
With the 1.28.1 GUI bug. Is that where you cannot see a live feed or recordings? I just get a broken jpeg icon in the middle. Tried Firefox and Chrome.
I can see under Event..Show Timeline in the small preview though.. but still cannot view it on click.
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: 1.28.1 Upgrade Compile error - CentOS 6
The GUI bug is *only* in the master branch, but zmrepo will *only* have official releases.
Offical releases != master branch.
Your previous database was not created by one of my rpms, so the first thing you need to do is go to Options -> Paths and verify those paths are still valid. Go through and double check your settings under Options. Start by making sure PATH_ZMS under Options->Paths is set to /cgi-bin/zm/nph-zms. You should look at all the other values and make sure the folders they point to are the right ones. Then go through the steps in the CentOS Readme and verify the apache config is correct as that can cause your issue as well.
Did you "sudo make uninstall" the previous from-source installation before you installed the rpm? That is guaranteed to cause problems if you did not.
If that doesn't help, then post your logs in a reply.
Offical releases != master branch.
Your previous database was not created by one of my rpms, so the first thing you need to do is go to Options -> Paths and verify those paths are still valid. Go through and double check your settings under Options. Start by making sure PATH_ZMS under Options->Paths is set to /cgi-bin/zm/nph-zms. You should look at all the other values and make sure the folders they point to are the right ones. Then go through the steps in the CentOS Readme and verify the apache config is correct as that can cause your issue as well.
Did you "sudo make uninstall" the previous from-source installation before you installed the rpm? That is guaranteed to cause problems if you did not.
If that doesn't help, then post your logs in a reply.
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/
All of these can be found at https://zoneminder.blogspot.com/
-
- Posts: 28
- Joined: Sun Feb 16, 2014 3:10 pm
Re: 1.28.1 Upgrade Compile error - CentOS 6
aha, /cgi-bin/zm/nph-zms fixed it it was pointing to the other location on the previous server from the manual compiled location.
Thanks loads! All up and running!!!
Thanks loads! All up and running!!!
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: 1.28.1 Upgrade Compile error - CentOS 6
Glad you got it working!
Now that you are set up with zmrepo, future upgrades are easy. Just yum update and then read the README for anything new.
Now that you are set up with zmrepo, future upgrades are easy. Just yum update and then read the README for anything new.
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/
All of these can be found at https://zoneminder.blogspot.com/
-
- Posts: 28
- Joined: Sun Feb 16, 2014 3:10 pm
Re: 1.28.1 Upgrade Compile error - CentOS 6
Thanks again, knnniggett!
All setup on home server now too with zmrepo. I did notice CentOS 6 zmrepo updates to 1.28.1, but the CentOS 7 is 1.28.0. Weird as readme
etc all points to 1.28.1. zmupdate.pl doesn't go higher than 1.28.0. I guess it was reverted back to 1.28.0 due to the GUI issues with 1.28.1?
So much easier to install with zmrepo!! Well done to everyone involved in that.
Chris
All setup on home server now too with zmrepo. I did notice CentOS 6 zmrepo updates to 1.28.1, but the CentOS 7 is 1.28.0. Weird as readme
etc all points to 1.28.1. zmupdate.pl doesn't go higher than 1.28.0. I guess it was reverted back to 1.28.0 due to the GUI issues with 1.28.1?
So much easier to install with zmrepo!! Well done to everyone involved in that.
Chris
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: 1.28.1 Upgrade Compile error - CentOS 6
zmrepo only has official releases of zoneminder. The gui issue which you are reffering to was only in a development snapshot, not a release.
Looks like you spotted a packaging issue. I'll push out a new rpm for centos 7 at the next opportunity. Perhaps tonight.
Looks like you spotted a packaging issue. I'll push out a new rpm for centos 7 at the next opportunity. Perhaps tonight.
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/
All of these can be found at https://zoneminder.blogspot.com/
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: 1.28.1 Upgrade Compile error - CentOS 6
The issue you identified with the CentOS 7 package has been fixed and new package has been built. I just synced the new package out to the Internets, and it should show up in a yum update, after your local yum cache expires, which is ~6 hours.chrisn0123 wrote: All setup on home server now too with zmrepo. I did notice CentOS 6 zmrepo updates to 1.28.1, but the CentOS 7 is 1.28.0. Weird as readme
etc all points to 1.28.1. zmupdate.pl doesn't go higher than 1.28.0. I guess it was reverted back to 1.28.0 due to the GUI issues with 1.28.1?
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/
All of these can be found at https://zoneminder.blogspot.com/
-
- Posts: 28
- Joined: Sun Feb 16, 2014 3:10 pm
Re: 1.28.1 Upgrade Compile error - CentOS 6
That has worked great, thanks loads! Now running 1.28.1!