Page 1 of 1
libdts on debian sarge problem (FIX)
Posted: Sat Jan 21, 2006 9:20 pm
by maciekc
When you get this kind of error when compiling zoneminder. This is probably when using ffmpeg support.
Code: Select all
g++ -g -O2 -L/usr/lib -L/usr/lib/mysql -o zmc zmc.o zm.o zm_db.o zm_config.o zm_coord.o zm_box.o zm_poly.o zm_image.o zm_event.o zm_zone.o zm_camera.o zm_local_camera.o zm_remote_camera.o zm_file_camera.o zm_monitor.o zm_user.o zm_mpeg.o zm_jpeg.o zm_regexp.o zm_buffer.o zm_debug.o -lavformat -lavcodec -lcrypto -lmysqlclient -ldl -lz -ljpeg
/usr/lib/libavcodec.a(dtsdec.o)(.text+0x33d): In function `dts_decode_frame':
: undefined reference to `dts_frame'
/usr/lib/libavcodec.a(dtsdec.o)(.text+0x395): In function `dts_decode_frame':
: undefined reference to `dts_blocks_num'
/usr/lib/libavcodec.a(dtsdec.o)(.text+0x3bf): In function `dts_decode_frame':
: undefined reference to `dts_block'
/usr/lib/libavcodec.a(dtsdec.o)(.text+0x3fd): In function `dts_decode_frame':
: undefined reference to `dts_samples'
/usr/lib/libavcodec.a(dtsdec.o)(.text+0x485): In function `dts_decode_frame':
: undefined reference to `dts_syncinfo'
/usr/lib/libavcodec.a(dtsdec.o)(.text+0x51e): In function `dts_decode_init':
: undefined reference to `dts_init'
collect2: ld returned 1 exit status
Try to add -ldts to this line in ./src/Makefile
LIBS = -lavformat -lavcodec -lcrypto -lmysqlclient -ldl -lz -ljpeg
Please Phil add this fix to the next release
Posted: Sat Jan 21, 2006 9:34 pm
by zoneminder
The 1.22.0 release has a configure parameter --with-extra-libs which is designed for this kind of circumstance, e.g. when you need to add non standard libraries.
I'd be interested if someone could try it out though and confirm it does funciton correctly in this kind of situation.
Posted: Fri Jan 27, 2006 2:51 am
by gneuf
I did this, using "ffmpeg-config". You tell it "ffmpeg-config --libs avcodec libavformat", and i t emits the LIBS = line specified. I used the link-line in the build.
But...that doesn't work. The link still fails on Debian Sarge 3.1r1. Even including libdts in the link didn't work...so...I downloaded the latest CVS of ffmpeg, built and installed it *after* removing the Debian ffmpeg package.
That worked like a charm!
Posted: Fri Jan 27, 2006 9:40 pm
by tommy
I am currently using ZM 1.19.3 on a Debian system and want to move up to the current ZM version. There are some changes to the ZM configure script and I would like to know exactly what you did regarding ffmpeg.
After downloading the CVS did you do a "make install" and "make installlib"?
What did your ZM configure line look like apropos ffmpeg?
Where does "ffmpeg-config --libs avcodec libavformat" fit in with the "--with-extra-libs" parameters?
thanks
tommy
Posted: Sun Jan 29, 2006 7:17 am
by gneuf
ffmpeg-config is a script that was installed with ffmpeg on my Debian.
It emits a link-line that can be used for the --with-extra-libs.
Or so I thought. That doesn't work on my Debian system.
After getting ffmpeg from CVS, do:
shell> ../configure
{lots of output}
shell> make
{lots of output}
shell> make install
{lots of output}
shell> make installlibs
{lots of output}
Then the newest ZM will link. Here's my configure flags for ZM:
./configure --enable-debug=No --with-webdir=/var/www/zm --with-cgidir=/usr/lib/cgi-bin --with-ffmpeg=/usr/local/lib --with-webuser=www-data --with-webgroup=www-data
Look, ma! No --with-extra-libs!
This works on Debian 3.1r0, using apache2.
Hope this helps...
Posted: Sun Jan 29, 2006 7:01 pm
by tommy
Thanks for the info. I hope to give it a try in the next week or so.
tommy
Confirming maciekc's fix
Posted: Mon Jun 12, 2006 2:00 am
by dfaulkner
zoneminder wrote:The 1.22.0 release has a configure parameter --with-extra-libs which is designed for this kind of circumstance, e.g. when you need to add non standard libraries.
I'd be interested if someone could try it out though and confirm it does funciton correctly in this kind of situation.
Hi there. I have in fact just tried this on Ubuntu 6.06 Server (Dapper Drake). My experience is the same as that of maciekc. Here's what I did.
- Enable the 'universe' repository in /etc/apt/sources.list
- Add the following packages to the base LAMP server install:
build-essential libmysqlclient15-dev libjpeg62 libjpeg-progs libjpeg62-dev libjpeg62 libjpeg-progs libjpeg62-dev libssl-dev openssl libssl0.9.8-dbg libssl0.9.8 libpcre3 libpcre3-dev libpcre3 libpcre3-dev libwww-perl libio-socket-ssl-perl libmailtools-perl libhtml-format-perl libcompress-zlib-perl libwww-perl libio-socket-ssl-perl libmailtools-perl libhtml-format-perl libcompress-zlib-perl libwww-perl libio-socket-ssl-perl libmailtools-perl libhtml-format-perl libcompress-zlib-perl libwww-perl libio-socket-ssl-perl libmailtools-perl libhtml-format-perl libcompress-zlib-perl
- use the following configure line:
Code: Select all
$ ./configure \
--with-webdir=/var/www/zm/html \
--with-cgidir=/var/www/zm/cgi \
--with-webuser=www-data \
--with-webgroup=www-data \
--with-extralibs="-ldc1394_control -logg -ldts -lvorbisenc -ltheora -lgsm" \
CFLAGS="-g -O3 -march=pentium4" \
CXXFLAGS="-g -O3 -march=pentium4" \
ZM_DB_NAME=zm \
ZM_DB_USER=zm \
ZM_DB_PASS=********
- run make
This gets me the following error (lines broken for readability):
Code: Select all
g++ -g -O3 -march=pentium4 -L/usr/lib -L/usr/lib/mysql \
-ldc1394_control -logg -ldts -lvorbisenc -ltheora -lgsm \
-o zmc zmc.o zm.o zm_db.o zm_config.o zm_coord.o zm_box.o zm_poly.o \
zm_image.o zm_event.o zm_zone.o zm_camera.o zm_local_camera.o \
zm_remote_camera.o zm_file_camera.o zm_monitor.o zm_user.o zm_mpeg.o \
zm_jpeg.o zm_regexp.o zm_signal.o zm_buffer.o zm_debug.o \
-lavformat -lavcodec -lavutil -lpcre -lcrypto -lmysqlclient -ldl -lz -ljpeg
/usr/lib/libavcodec.a(dtsdec.o): In function `dts_decode_init': undefined reference to `dts_init'
/usr/lib/libavcodec.a(dtsdec.o): In function `dts_decode_frame': undefined reference to `dts_frame'
/usr/lib/libavcodec.a(dtsdec.o): In function `dts_decode_frame': undefined reference to `dts_blocks_num'
/usr/lib/libavcodec.a(dtsdec.o): In function `dts_decode_frame': undefined reference to `dts_block'
/usr/lib/libavcodec.a(dtsdec.o): In function `dts_decode_frame': undefined reference to `dts_samples'
/usr/lib/libavcodec.a(dtsdec.o): In function `dts_decode_frame': undefined reference to `dts_blocks_num'
/usr/lib/libavcodec.a(dtsdec.o): In function `dts_decode_frame': undefined reference to `dts_syncinfo'
collect2: ld returned 1 exit status
Some digging turns up the fact that there is no corresponding libdts package to mate with libdts-dev. According to
Debian Bug #285590, the API is not stable, and as such no shared library is provided.
It's been a while since I've actively done development, so I'm a bit fuzzy on exactly what goes where, but I have found, like maciekc, that if I add '-ldts' to the LIBS variable in src/Makefile (after running configure), that everything compiles just fine.
There is doubtless a way to specify this on the command line as a build option, either to configure or to make itself, but I'm not sure of exactly what that might be. I'm also not sure that this workaround is successful (any thoughts, maciekc?), but zm has compiled clean, so I'm going to proceed.
Feel free to followup or contact with questions. I'm happy to help with debugging, etc.
Should I give up on Ubuntu?
Posted: Tue Jun 13, 2006 5:36 pm
by MrCottonmouth
I don't know what to do. I tried following the instructions in this post with no luck at all. Maybe I should download the Fedora cd's and start over again.
Re: Should I give up on Ubuntu?
Posted: Fri Jun 16, 2006 2:27 pm
by dfaulkner
MrCottonmouth wrote:I tried following the instructions in this post with no luck at all.
What exactly happened? If you're willing to provide some of the error output there's a good chance that someone can assist.
Also, I've posted a
sister thread to this at ubuntuforums.com. It has largely similar information, but may help you. I'll also be writing a more complete discussion as soon as I complete the work I'm doing with ZM right now.
Posted: Thu Jul 27, 2006 11:28 pm
by binarydude
dfailkner,
when i run the config line i get this:
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
i did a fresh ubuntu lamp install, updated/upgraded the distro, and installed the packages just as you suggested.
Posted: Sat Jul 29, 2006 12:13 pm
by dfaulkner
binarydude wrote:
when i run the config line i get this:
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
i did a fresh ubuntu lamp install, updated/upgraded the distro, and installed the packages just as you suggested.
I'm not sure what's going on. I've never come across that particular error before. The error seems to indicate that GCC can't create output files. Perhaps it's a permissions issue? Are you running configure as a user that has write permission in the ZM tree?
(I know that's an obvious question, and I apologize for that, but the obvious has bitten me before!
)