One more time on 1.24.0...

Forum for questions and support relating to the 1.24.x releases only.
Locked
kwire
Posts: 48
Joined: Mon Jan 05, 2009 12:56 am
Location: Ada, Ohio, USA

One more time on 1.24.0...

Post by kwire »

In this thread I worked through some of my learning curve. I am making progress, but am stumped again. So, I am going to try this again with the newly released 1.24.0 version.

Before I started I opened a Konsole window and logged in as root, moved to the ZoneMinder direcotry and did a "make uninstall", then I moved to the ffmpeg directory and did a "make uninstall". I opened MySQL Administrator and deleted the "zm" catalog. I then searched the entire hard drive and deleted any thing that even looked like it was related to ffmpeg or ZoneMinder (except for documentation).

Then these are the steps I followed. I don't think I missed anything in the ocumentation at: http://www.zoneminder.com/wiki/index.php/Documentation, but it is possible.

Can anyone spot something I missed, or tell me why the make of ZoneMinder-1.24.0 fails?

1) Downloaded ffmpeg
2) Extracted to /home/Development/ZM/ffmpeg/ffmpeg-checkout-2009-02-08
3) Open a Konsole window and move to that directory
4) Run these commands

Code: Select all

      $ ./configure --enable-shared --enable-swscale --enable-pthreads --enable-gpl
      login as root
      # make
      # make install-libs
      # make install
      exit root
5) Start MySQL
6) Start Apache (httpd service)
7) Download released version of ZoneMinder-1.24.0
8 ) Extracted to /home/Development/ZM/ZoneMinder-1.24.0
9) Move to that directory
10) Run this command

Code: Select all

      $ ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-libarch=lib64 ZM_SSL_LIB=openssl --with-ffmpeg=/usr/local
11) Create the ZM Database using these steps...

Code: Select all

      
      $ mysql -p -u root </home> grant select,insert,update,delete on zm.* to 'zmuser'@localhost identified by 'zmpass';
      mysql> quit

      This will make the changes take effect
      $ mysqladmin -p -u root reload

      Start MySQL Administrator (logged in as root)
	  a) Check the Catalogs that "zm" is created and noted that there are 180 rows in the "Config" file.
	  b) Check the User Administration that "zmuser" exists.

12) Compile and Install ZoneMinder using these steps:

Code: Select all

      login as root
      make
      make install
13) Start ZoneMinder

Code: Select all

      zmpkg.pl start
The error message I get now is:

/usr/local/bin/zmfix: error while loading shared libraries: libswscale.so.0: cannot open shared object file: No such file or directory


Thanks, Keith
Last edited by kwire on Wed Feb 11, 2009 11:53 am, edited 1 time in total.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Do you know where your libswscale.so.0 is located?
You can symlink to it from /usr/lib64 so it's in your path.
kwire
Posts: 48
Joined: Mon Jan 05, 2009 12:56 am
Location: Ada, Ohio, USA

Post by kwire »

I'm at home now, but I think it was in usr/local/lib. I wondered if it would be OK to link it.

I'll try that tomorrw, Thanks Cordel.
nuck
Posts: 148
Joined: Tue Nov 11, 2008 1:43 am
Location: Canada

Post by nuck »

Try ldd /usr/local/bin/zmfix and see what that has to say.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I don't know if 'make uninstall' in the ffmpeg build dir uninstalls old libraries etc or whether there is a 'make uninstall-libs' variant.

You may need to rerun ldconfig (as root) to rebuild your shared library path. You can run ldconfig -p to see what shared libraries it thinks it knows about,
Phil
nuck
Posts: 148
Joined: Tue Nov 11, 2008 1:43 am
Location: Canada

Post by nuck »

Following on Phil's line of thought, if /usr/local/lib doesn't show up in the search path which it should do (but... ), you will probably want to add it to /etc/ld.so.conf . With any luck, re-running ldconfig will fix you up. Then again, if your luck is anything like mine....
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I am pretty sure /usr/local/lib is in there by default but I had an issue the other day where there were some old copies of the libraries in there whereas the ones I had built I had put somewhere else and it all got very confused.
Phil
nuck
Posts: 148
Joined: Tue Nov 11, 2008 1:43 am
Location: Canada

Post by nuck »

I've read a few posts regarding ubuntu that mentioned /usr/local/lib not being included in /etc/ld.so.conf (or ld.so.confd whichever it is) by default. Don't know if it's still the case or not as they were posts from a couple years back..

It's been a real long time, but I've been bitten before by the library search order when I've had older and newer versions of the same libraries kicking around for different reasons (in hindsight, not a wisest of ideas).
kwire
Posts: 48
Joined: Mon Jan 05, 2009 12:56 am
Location: Ada, Ohio, USA

It works!!!

Post by kwire »

Hi all,

Thank you for your help. I have been able to get ZoneMinder 1.24.0 running. Yippee!!!

I thought I'd document my problem in the hope it will help somebody else.

To recap, After installation I tried to start ZoneMinder using

Code: Select all

 zmpkg.pl start
and got this error...

Code: Select all

 /usr/local/bin/zmfix: error while loading shared libraries: libswscale.so.0: cannot open shared object file: No such file or directory
Something was wrong with my install of ffmpeg. I had downloaded the latest source and compiled.

I noticed they were installed in the /usr/local/lib directory. I ran a ls on that directory and noticed many of them are links. Not important, but I thought interesting...

Code: Select all

# ls /usr/local/lib -l
total 53600
-rw-r--r-- 1 root root 38424016 2009-02-10 20:55 libavcodec.a
lrwxrwxrwx 1 root root       21 2009-02-10 20:55 libavcodec.so -> libavcodec.so.52.14.0
lrwxrwxrwx 1 root root       21 2009-02-10 20:55 libavcodec.so.52 -> libavcodec.so.52.14.0
-rwxr-xr-x 1 root root  4846768 2009-02-10 20:55 libavcodec.so.52.14.0
-rw-r--r-- 1 root root   501404 2009-02-10 20:55 libavdevice.a
lrwxrwxrwx 1 root root       21 2009-02-10 20:55 libavdevice.so -> libavdevice.so.52.1.0
lrwxrwxrwx 1 root root       21 2009-02-10 20:55 libavdevice.so.52 -> libavdevice.so.52.1.0
-rwxr-xr-x 1 root root    29416 2009-02-10 20:55 libavdevice.so.52.1.0
-rw-r--r-- 1 root root  9025812 2009-02-10 20:55 libavformat.a
lrwxrwxrwx 1 root root       22 2009-02-10 20:55 libavformat.so -> libavformat.so.52.26.0
lrwxrwxrwx 1 root root       22 2009-02-10 20:55 libavformat.so.52 -> libavformat.so.52.26.0
-rwxr-xr-x 1 root root   686552 2009-02-10 20:55 libavformat.so.52.26.0
-rw-r--r-- 1 root root   289908 2009-02-10 20:55 libavutil.a
lrwxrwxrwx 1 root root       20 2009-02-10 20:55 libavutil.so -> libavutil.so.49.14.0
lrwxrwxrwx 1 root root       20 2009-02-10 20:55 libavutil.so.49 -> libavutil.so.49.14.0
-rwxr-xr-x 1 root root    44744 2009-02-10 20:55 libavutil.so.49.14.0
-rw-r--r-- 1 root root   731416 2009-02-10 20:55 libswscale.a
lrwxrwxrwx 1 root root       19 2009-02-10 20:55 libswscale.so -> libswscale.so.0.6.1
lrwxrwxrwx 1 root root       19 2009-02-10 20:55 libswscale.so.0 -> libswscale.so.0.6.1
-rwxr-xr-x 1 root root   180960 2009-02-10 20:55 libswscale.so.0.6.1
drwxr-xr-x 3 root root     4096 2009-02-05 19:10 perl5
drwxr-xr-x 2 root root     4096 2009-02-10 20:55 pkgconfig
drwxr-xr-x 2 root root     4096 2009-02-10 20:55 vhook
On the ZoneMinder Forum nuck suggested running "ldd /usr/local/bin/zmfix" and it showed that there were four ffmpeg libraries it couldn't find...

Code: Select all

# ldd /usr/local/bin/zmfix
        linux-vdso.so.1 =>  (0x00007fff62ffe000)
        libbz2.so.1 => /lib64/libbz2.so.1 (0x0000003fafc00000)
        libswscale.so.0 => 
        libavformat.so.52 =>
        libavcodec.so.52 =>
        libavutil.so.49 =>
        libpcre.so.0 => /lib64/libpcre.so.0 (0x0000003fbcc00000)
        libcrypto.so.7 => /lib64/libcrypto.so.7 (0x0000003fadc00000)
        libmysqlclient.so.15 => /usr/lib64/mysql/libmysqlclient.so.15 (0x0000003fa6000000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003fa5400000)
        libdl.so.2 => /lib64/libdl.so.2 (0x0000003fa5000000)
        libz.so.1 => /lib64/libz.so.1 (0x0000003fa5800000)
        libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x0000003fb6600000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003fab000000)
        libm.so.6 => /lib64/libm.so.6 (0x0000003fa4c00000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003faa000000)
        libc.so.6 => /lib64/libc.so.6 (0x0000003fa4800000)
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x0000003fb4c00000)
        libnsl.so.1 => /lib64/libnsl.so.1 (0x0000003fb3a00000)
        libssl.so.7 => /lib64/libssl.so.7 (0x0000003faec00000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003fa4400000)
        libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x0000003fae000000)
        libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x0000003facc00000)
        libcom_err.so.2 => /lib64/libcom_err.so.2 (0x0000003fac000000)
        libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x0000003fac800000)
        libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x0000003fad400000)
        libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x0000003fad800000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x0000003fabc00000)
        libselinux.so.1 => /lib64/libselinux.so.1 (0x0000003fa5c00000)
I think I finally got this one. I created the file in "/etc/ld.so.conf.d/kaw_ffmpeg.conf"
It contains one line: "/usr/local/lib"

As Phil suggested I ran "ldconf" ( as su ) and then looking at the output of:

ldd /usr/local/bin/zmfix

I see all the ffmpeg libraries are found.

Code: Select all

# ldd /usr/local/bin/zmfix
        linux-vdso.so.1 =>  (0x00007fff62ffe000)
        libbz2.so.1 => /lib64/libbz2.so.1 (0x0000003fafc00000)
        libswscale.so.0 => /usr/local/lib/libswscale.so.0 (0x0000000000c96000)
        libavformat.so.52 => /usr/local/lib/libavformat.so.52 (0x000000000060f000)
        libavcodec.so.52 => /usr/local/lib/libavcodec.so.52 (0x00007f7c5a53c000)
        libavutil.so.49 => /usr/local/lib/libavutil.so.49 (0x0000000000110000)
        libpcre.so.0 => /lib64/libpcre.so.0 (0x0000003fbcc00000)
        libcrypto.so.7 => /lib64/libcrypto.so.7 (0x0000003fadc00000)
        libmysqlclient.so.15 => /usr/lib64/mysql/libmysqlclient.so.15 (0x0000003fa6000000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003fa5400000)
        libdl.so.2 => /lib64/libdl.so.2 (0x0000003fa5000000)
        libz.so.1 => /lib64/libz.so.1 (0x0000003fa5800000)
        libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x0000003fb6600000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003fab000000)
        libm.so.6 => /lib64/libm.so.6 (0x0000003fa4c00000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003faa000000)
        libc.so.6 => /lib64/libc.so.6 (0x0000003fa4800000)
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x0000003fb4c00000)
        libnsl.so.1 => /lib64/libnsl.so.1 (0x0000003fb3a00000)
        libssl.so.7 => /lib64/libssl.so.7 (0x0000003faec00000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003fa4400000)
        libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x0000003fae000000)
        libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x0000003facc00000)
        libcom_err.so.2 => /lib64/libcom_err.so.2 (0x0000003fac000000)
        libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x0000003fac800000)
        libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x0000003fad400000)
        libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x0000003fad800000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x0000003fabc00000)
        libselinux.so.1 => /lib64/libselinux.so.1 (0x0000003fa5c00000)
Now when I could start ZoneMinder using: zmpkg.pl start

Opened a new page in FireFox and pint it to "http://localhost/zm/"

Yippee!!!!

I have added two Axis 207 Cameras using the "Preset" and things are moving along.

Thanks again Cordel, nuck and Phil.

Keith
nuck
Posts: 148
Joined: Tue Nov 11, 2008 1:43 am
Location: Canada

Post by nuck »

I think I finally got this one. I created the file in "/etc/ld.so.conf.d/kaw_ffmpeg.conf"
It contains one line: "/usr/local/lib"
I don't think that file is going to do much for you. (?) The content is correct but it should be in either /etc/ld.so.conf or ld.so.confd, whichever is appropriate for your system. If you need it at all.

Either way, it doesn't matter. Running ldconfig is what will have done the trick for you.

Glad you got it working.
Locked