Motion - Support Question 2006x 03x 02x 152208

Motion with mysql on x86_64

Question

Hi I have the same problem that was seen in http://www.lavrsen.dk/twiki/bin/view/Motion/BugReport2005x08x02x070017 and i have been taking a look in the mailarchive without getting further on that solution.

Im testing FC5 test3 on a 64bit PC, Mysql is installed from RPM's and is working but on FC 64bit many libs is to find in/usr/lib64/ and i think thats the problem.

As in the closed error report i have tryed to point the libs out for configure and i have tryed to place the lib paths in ld.so.conf + ldconfig but no matter what i try configure claims that it can not find libmysqlclient.x but they are there in /usr/lib64/mysql.

I will not post this as an bug for as long the Fedora version im using is a test but i'm afraid that the problem is not in Fedora but in the configure script but i can't figure out why og where?

Any sugestions what goes wrong or what to post here to get to the solution?

/Klaus

Environment

Motion version: 3.2.4 + latest
ffmpeg version: 0.4.9pre1 i think
Libraries: ffmpeg, mysql
Server OS: Fedora Core 5 Test3, Kernel 2.6.1x x86_64

-- TWikiGuest - 02 Mar 2006

Answer

What it the full path for mysql.h and libmysqlclient.so*/*libmysqlclient.a ?

I've check configure and it doesn't look in autodectection method in /usr/lib64/ , anyway if you pass --with-mysql= parameter to configure it should work , so please try to do it and report if it work .

-- AngelCarpintero - 03 Mar 2006

Follow Up

]# locate mysql.h
/usr/include/mysql/mysql.h
/usr/share/doc/selinux-policy-2.2.21/html/services_mysql.html
/usr/src/debug/mysql-5.0.18/include/mysql.h
/usr/src/debug/mysql-5.0.18/innobase/include/row0mysql.h

# locate libmysqlclient.
/usr/lib/debug/usr/lib64/mysql/libmysqlclient.so.15.0.0.debug
/usr/lib64/mysql/libmysqlclient.a
/usr/lib64/mysql/libmysqlclient.so
/usr/lib64/mysql/libmysqlclient.so.15
/usr/lib64/mysql/libmysqlclient.so.15.0.0

# ls -al /usr/lib64/mysql/libmysqlclient.*
-rw-r--r-- 1 root root 1693508 Feb 12 19:10 /usr/lib64/mysql/libmysqlclient.a
lrwxrwxrwx 1 root root      24 Mar  2 14:22 /usr/lib64/mysql/libmysqlclient.so -> libmysqlclient.so.15.0.0
lrwxrwxrwx 1 root root      24 Mar  2 14:22 /usr/lib64/mysql/libmysqlclient.so.15 -> libmysqlclient.so.15.0.0
-rwxr-xr-x 1 root root 1367280 Feb 12 19:10 /usr/lib64/mysql/libmysqlclient.so.15.0.0

# ./configure --with-mysql=/usr/lib64
# ./configure --with-mysql=/usr/lib64/mysql

Both above or with trailing slash result in:

..
checking for MySQL... no
Invalid MySQL directory - unable to find libmysqlclient.a or libmysqlclient.so.
..
   ************************
   *   Configure status   *
   ************************

OS             :     Linux
pthread Support:     Yes
jpeg Support:        Yes
V4L included:        Yes
FFmpeg Support:      Yes
MYSQL Support:       No
PostgreSQL Support:  No

CFLAGS:  -g -O2 -DHAVE_FFMPEG -I/usr/local/include/ffmpeg -DTYPE_32BIT="int" -DHAVE_BSWAP
LIBS: -lm  -lpthread -ljpeg -L/usr/local/lib -lavformat -lavcodec -lm -lz
LDFLAGS:   -L/usr/local/lib

Install prefix:       /usr/local

Kernel right now is:

kernel.x86_64                            2.6.15-1.2008_FC5      installed
kernel-devel.x86_64                      2.6.15-1.2008_FC5      installed
kernel-doc.noarch                        2.6.15-1.2008_FC5      installed

The following mysql rpm's is installed:

mysql.x86_64                             5.0.18-2.1             installed
mysql-administrator.x86_64               1.1.6-2.fc5            installed
mysql-connector-odbc.x86_64              3.51.12-1.2.1          installed
mysql-debuginfo.x86_64                   5.0.18-2.1             installed
mysql-devel.x86_64                       5.0.18-2.1             installed
mysql-gui-common.x86_64                  1.1.6-2.fc5            installed
mysql-server.x86_64                      5.0.18-2.1             installed

I have tried with following installed at the same time with no better luck:

mysqlclient10.x86_64                     3.23.58-9.2            development
mysqlclient10-devel.x86_64               3.23.58-9.2            development
mysqlclient14.x86_64                     4.1.14-4.2             development
mysqlclient14-devel.x86_64               4.1.14-4.2             development

/klaus

-- TWikiGuest - 04 Mar 2006
Ok , try to use the configure.in that i've attached , copy the file inside motion directory and type :

autoconf
./configure
make
make install

-- AngelCarpintero - 04 Mar 2006

Follow Up #2

That looked okay now.

   ************************
   *   Configure status   *
   ************************

OS             :     Linux
pthread Support:     Yes
jpeg Support:        Yes
V4L included:        Yes
FFmpeg Support:      Yes
MYSQL Support:       Yes
PostgreSQL Support:  No

CFLAGS:  -g -O2 -DHAVE_FFMPEG -I/usr/local/include/ffmpeg -DHAVE_MYSQL -I /usr/include/mysql -DTYPE_32BIT="int" -DHAVE_BSWAP
LIBS: -lm  -lpthread -ljpeg -L/usr/local/lib -lavformat -lavcodec -lm -lz -L/usr/lib64/mysql -lmysqlclient -lz
LDFLAGS:   -L/usr/local/lib

Install prefix:       /usr/local

I had a little trouble first as i could see that configure did not change but after manual delete of configure and config.status it worked. The only thing that i noticed was this:

gcc -g -O2 -DHAVE_FFMPEG -I/usr/local/include/ffmpeg -DHAVE_MYSQL -I /usr/include/mysql -DTYPE_32BIT="int" -DHAVE_BSWAP  ..
..  -Wall -DVERSION=\"3.2.5\" -D_REENTRANT -Dsysconfdir=\"/usr/local/etc\"   -c -o picture.o picture.c
picture.c: In function ‘overlay_smartmask’:
picture.c:407: warning: value computed is not used

But that has nothing to with this stuff i'm sure wink

configure, make, make install is okay - motion is working okay but i have not tried if motion is working with mysql as i do not know how to test that, i just didn't like that motion couldn't find mysql.

If you want me to test if it does work with mysql i need to know what fields and structures to make tex. motion.dist.conf working or another tiny test config for netcams.

Was this fix made special for this case or can the result hopefully be used generaly so configure works on both normal and 64 bit systems?

/klaus

-- TWikiGuest - 04 Mar 2006

To test mysql just take a look to the guide :

http://www.lavrsen.dk/twiki/bin/view/Motion/UsingDatabases

This fix i actually fixed for 64 bit systems , so i've included it in motion svn trunk.

Thanks for the report wink

-- AngelCarpintero - 04 Mar 2006

select * from security;
+--------+------------------------------------------+-------+-----------+---------------------+---------------------+
| camera | filename                                 | frame | file_type | time_stamp          | text_event          |
+--------+------------------------------------------+-------+-----------+---------------------+---------------------+
|      1 | /home/klaus/motion/01-20060305180237.avi |     1 |         8 | 2006-03-05 18:02:37 | 20060305180237-cam1 |
+--------+------------------------------------------+-------+-----------+---------------------+---------------------+
1 row in set (0.00 sec)

Well everything looks fine now, also latest daily after the autoconfig thing.

Thanks. smile

-- TheOtherBug - 05 Mar 2006
Topic revision: r8 - 05 Mar 2006, AngelCarpintero
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.