google-code-export / ffmpegthumbnailer

Automatically exported from code.google.com/p/ffmpegthumbnailer
GNU General Public License v2.0
1 stars 1 forks source link

Compiling problem - Undefined references in moviedecoder.cpp #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi there,

I tried to compile and install ffmpegthumbnailer on my Debian Etch server.
make failes with the following output:

g++ -DPACKAGE_NAME=\"ffmpegthumbnailer\"
-DPACKAGE_TARNAME=\"ffmpegthumbnailer\" -DPACKAGE_VERSION=\"1.2.4\"
-DPACKAGE_STRING=\"ffmpegthumbnailer\ 1.2.4\" -DPACKAGE_BUGREPORT=\"\"
-DPACKAGE=\"ffmpegthumbnailer\" -DVERSION=\"1.2.4\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DSTDC_HEADERS=1
-DHAVE_INTTYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_JPEGLIB_H=1
-DHAVE_LIBAVCODEC_AVCODEC_H=1 -DHAVE_LIBAVFORMAT_AVFORMAT_H=1
-DHAVE_LIBAVUTIL_AVUTIL_H=1 -DHAVE_LIBSWSCALE_SWSCALE_H=1 -I.     -g -O2
-MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.cpp
mv -f .deps/main.Tpo .deps/main.Po
/bin/sh ../libtool --tag=CXX   --mode=link g++  -g -O2   -o
ffmpegthumbnailer main.o /home/server/movie/ffmpeg/libavutil/libavutil.a
/home/server/movie/ffmpeg/libavformat/libavformat.a
/home/server/movie/ffmpeg/libavcodec/libavcodec.a
/home/server/movie/ffmpeg/libswscale/libswscale.a -lz -lm -ldl   -lpng12  
libffmpegthumbnailer/libffmpegthumbnailer.la -ljpeg
mkdir .libs
g++ -g -O2 -o ffmpegthumbnailer main.o 
/home/server/movie/ffmpeg/libavutil/libavutil.a
/home/server/movie/ffmpeg/libavformat/libavformat.a
/home/server/movie/ffmpeg/libavcodec/libavcodec.a
/home/server/movie/ffmpeg/libswscale/libswscale.a -lm
libffmpegthumbnailer/.libs/libffmpegthumbnailer.a -lz -ldl -lpng12
/usr/lib/libjpeg.so
libffmpegthumbnailer/.libs/libffmpegthumbnailer.a(moviedecoder.o): In
function `MovieDecoder::createAVFrame(AVFrame**, int, int, int)':
/home/server/movie/ffmpegthumbnailer-1.2.4/src/libffmpegthumbnailer/moviedecoder
.cpp:326:
undefined reference to `avcodec_alloc_frame'
/home/server/movie/ffmpegthumbnailer-1.2.4/src/libffmpegthumbnailer/moviedecoder
.cpp:328:
undefined reference to `avpicture_get_size'
libffmpegthumbnailer/.libs/libffmpegthumbnailer.a(moviedecoder.o): In
function `MovieDecoder::destroy()':
/home/server/movie/ffmpegthumbnailer-1.2.4/src/libffmpegthumbnailer/moviedecoder
.cpp:75:
undefined reference to `avcodec_close'
/home/server/movie/ffmpegthumbnailer-1.2.4/src/libffmpegthumbnailer/moviedecoder
.cpp:81:
undefined reference to `av_close_input_file'
/home/server/movie/ffmpegthumbnailer-1.2.4/src/libffmpegthumbnailer/moviedecoder
.cpp:87:
undefined reference to `av_free'
libffmpegthumbnailer/.libs/libffmpegthumbnailer.a(moviedecoder.o): In
function `MovieDecoder::getVideoPacket(AVPacket&)':
/home/server/movie/ffmpegthumbnailer-1.2.4/src/libffmpegthumbnailer/moviedecoder
.cpp:251:
undefined reference to `av_read_frame'
libffmpegthumbnailer/.libs/libffmpegthumbnailer.a(moviedecoder.o): In
function `MovieDecoder::convertAndScaleFrame(int, int, int&, int&)':
/home/server/movie/ffmpegthumbnailer-1.2.4/src/libffmpegthumbnailer/moviedecoder
.cpp:291:
undefined reference to `sws_getContext'
/home/server/movie/ffmpegthumbnailer-1.2.4/src/libffmpegthumbnailer/moviedecoder
.cpp:303:
undefined reference to `sws_scale'
/home/server/movie/ffmpegthumbnailer-1.2.4/src/libffmpegthumbnailer/moviedecoder
.cpp:304:
undefined reference to `sws_freeContext'
/home/server/movie/ffmpegthumbnailer-1.2.4/src/libffmpegthumbnailer/moviedecoder
.cpp:306:
undefined reference to `av_free'
libffmpegthumbnailer/.libs/libffmpegthumbnailer.a(moviedecoder.o): In
function `MovieDecoder::getScaledVideoFrame(int, VideoFrame&)':
/home/server/movie/ffmpegthumbnailer-1.2.4/src/libffmpegthumbnailer/moviedecoder
.cpp:271:
undefined reference to `avpicture_deinterlace'
libffmpegthumbnailer/.libs/libffmpegthumbnailer.a(moviedecoder.o): In
function `MovieDecoder::decodeVideoPacket(AVPacket&)':
/home/server/movie/ffmpegthumbnailer-1.2.4/src/libffmpegthumbnailer/moviedecoder
.cpp:231:
undefined reference to `avcodec_decode_video'
libffmpegthumbnailer/.libs/libffmpegthumbnailer.a(moviedecoder.o): In
function `MovieDecoder::seek(int)':
/home/server/movie/ffmpegthumbnailer-1.2.4/src/libffmpegthumbnailer/moviedecoder
.cpp:177:
undefined reference to `av_seek_frame'
/home/server/movie/ffmpegthumbnailer-1.2.4/src/libffmpegthumbnailer/moviedecoder
.cpp:180:
undefined reference to `avcodec_flush_buffers'
libffmpegthumbnailer/.libs/libffmpegthumbnailer.a(moviedecoder.o): In
function `MovieDecoder::initializeVideo()':
/home/server/movie/ffmpegthumbnailer-1.2.4/src/libffmpegthumbnailer/moviedecoder
.cpp:120:
undefined reference to `avcodec_find_decoder'
/home/server/movie/ffmpegthumbnailer-1.2.4/src/libffmpegthumbnailer/moviedecoder
.cpp:132:
undefined reference to `avcodec_open'
libffmpegthumbnailer/.libs/libffmpegthumbnailer.a(moviedecoder.o): In
function `MovieDecoder::initialize(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)':
/home/server/movie/ffmpegthumbnailer-1.2.4/src/libffmpegthumbnailer/moviedecoder
.cpp:53:
undefined reference to `av_register_all'
/home/server/movie/ffmpegthumbnailer-1.2.4/src/libffmpegthumbnailer/moviedecoder
.cpp:54:
undefined reference to `avcodec_init'
/home/server/movie/ffmpegthumbnailer-1.2.4/src/libffmpegthumbnailer/moviedecoder
.cpp:55:
undefined reference to `avcodec_register_all'
/home/server/movie/ffmpegthumbnailer-1.2.4/src/libffmpegthumbnailer/moviedecoder
.cpp:57:
undefined reference to `av_open_input_file'
/home/server/movie/ffmpegthumbnailer-1.2.4/src/libffmpegthumbnailer/moviedecoder
.cpp:62:
undefined reference to `av_find_stream_info'
/home/server/movie/ffmpegthumbnailer-1.2.4/src/libffmpegthumbnailer/moviedecoder
.cpp:68:
undefined reference to `avcodec_alloc_frame'
libffmpegthumbnailer/.libs/libffmpegthumbnailer.a(moviedecoder.o): In
function `MovieDecoder::createAVFrame(AVFrame**, int, int, int)':
/home/server/movie/ffmpegthumbnailer-1.2.4/src/libffmpegthumbnailer/moviedecoder
.cpp:331:
undefined reference to `avpicture_fill'
collect2: ld returned 1 exit status
make[2]: *** [ffmpegthumbnailer] Error 1
make[2]: Leaving directory `/home/server/movie/ffmpegthumbnailer-1.2.4/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/server/movie/ffmpegthumbnailer-1.2.4/src'
make: *** [all-recursive] Error 1

We use a subversion checkout of ffmpeg (from yesterday), not the one
available in the repositories. Any hints to solve this problem?

What steps will reproduce the problem?
1. checkout and install ffmpeg from cvs (./configure --disable-ffserver
--enable-avfilter --enable-swscale --enable-gpl)
2. checkout and configure ffmpegthumbnailer (./configure --disable-shared)
3. run make

What version of the product are you using? On what operating system?
ffmpegthumbnailer 1.2.4
ffmpeg SVN-r12931 (compiles fine and works without any problem)
OS: Debian Etch

Please provide any additional information below.
I have attached the output of the command ./configure --disable-shared (I
get nasty -fPIC errors without the disable-shared flag).

Original issue reported on code.google.com by jaeg...@gmail.com on 24 Apr 2008 at 8:44

Attachments:

GoogleCodeExporter commented 9 years ago
I will try to compile against the latest version of ffmpeg this evening and see 
what
happens. It seems like it can't find the necessary function in you ffmpeg libs 
during
linking.

Original comment by dirk.vdb on 24 Apr 2008 at 9:27

GoogleCodeExporter commented 9 years ago
Everything works fine here, make sure the libraries are build correctly and in 
the
right location.

Original comment by dirk.vdb on 24 Apr 2008 at 4:56

GoogleCodeExporter commented 9 years ago
For ffmpeg I had to use the flag --disable-shared. Now it works perfectly. Great
tool, thanks a lot.

Original comment by jaeg...@gmail.com on 25 Apr 2008 at 8:52