rpmbuild problem during g++ linking - undefined references ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, I'm trying to build an rpm for Fedora for DVBCut. I get a fair way through the process, but erroring out with:

g++ -o src/moc_dvbcut.o -c -O3 -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DHAVE_LIB_AO -DQT_NO_DEBUG -I/usr/lib/qt-3.3/include -I/usr/include src/moc_dvbcut.cpp
/usr/lib/qt-3.3/bin/moc -o src/moc_exportdialog.cpp src/exportdialog.h

g++ -o src/moc_exportdialog.o -c -O3 -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DHAVE_LIB_AO -DQT_NO_DEBUG -I/usr/lib/qt-3.3/include -I/usr/include src/moc_exportdialog.cpp /usr/lib/qt-3.3/bin/moc -o src/moc_progressstatusbar.cpp src/progressstatusbar.h

g++ -o src/moc_progressstatusbar.o -c -O3 -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DHAVE_LIB_AO -DQT_NO_DEBUG -I/usr/lib/qt-3.3/include -I/usr/include src/moc_progressstatusbar.cpp
/usr/lib/qt-3.3/bin/moc -o src/moc_progresswindow.cpp src/progresswindow.h

g++ -o src/moc_progresswindow.o -c -O3 -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DHAVE_LIB_AO -DQT_NO_DEBUG -I/usr/lib/qt-3.3/include -I/usr/include src/moc_progresswindow.cpp

g++ -o bin/dvbcut src/avframe.o src/buffer.o src/differenceimageprovider.o src/dvbcut.o src/eventlistitem.o src/exportdialog.o src/imageprovider.o src/index.o src/lavfmuxer.o src/logoutput.o src/main.o src/mpegmuxer.o src/mpgfile.o src/playaudio.o src/progressstatusbar.o src/progresswindow.o src/psfile.o src/pts.o src/settings.o src/streamdata.o src/tsfile.o src/uic_dvbcutbase.o src/moc_dvbcutbase.o src/uic_mplayererrorbase.o src/moc_mplayererrorbase.o src/uic_progresswindowbase.o src/moc_progresswindowbase.o src/uic_exportdialogbase.o src/moc_exportdialogbase.o src/moc_dvbcut.o src/moc_exportdialog.o src/moc_progressstatusbar.o src/moc_progresswindow.o -L/usr/lib/qt-3.3/lib -L/usr/lib -lao -lqt-mt -lavformat -lavcodec -lavutil

{ the two -L paths definitely contain the -l{lib}xyz so's. }

src/avframe.o: In function `avframe::avframe()':
avframe.cpp:(.text+0x2e): undefined reference to `avcodec_alloc_frame()'
src/avframe.o: In function `avframe::avframe()':
avframe.cpp:(.text+0x6e): undefined reference to `avcodec_alloc_frame()'
src/avframe.o: In function `avframe::getqimage(bool, int)':
avframe.cpp:(.text+0x13c): undefined reference to `avpicture_get_size(int, int, int)'
avframe.cpp:(.text+0x16f): undefined reference to `avcodec_alloc_frame()'
avframe.cpp:(.text+0x19d): undefined reference to `avpicture_fill(AVPicture*, unsigned char*, int, int, int)' avframe.cpp:(.text+0x1cb): undefined reference to `img_convert(AVPicture*, int, AVPicture const*, int, int, int)'
avframe.cpp:(.text+0x271): undefined reference to `av_free(void*)'
src/avframe.o: In function `avframe::avframe(AVFrame*, AVCodecContext*)':
avframe.cpp:(.text+0x320): undefined reference to `avcodec_alloc_frame()'

The app {dvbcut} website installer procedure says you need:
    *  Qt, version 3
    * SCons (a modern build utility, replacing automake, autoconf and make)
    * libao (optional, for sound output)
    * libmad and liba52 for MP2 and AC3 decoding, respectively.

On a Debian system, the following packages should do the job: libqt3-mt-dev qt3-dev-tools scons libao-dev libmad0-dev liba52-0.7.4-dev.

I think I have the fedora equivalents installed: qt scons libao, libmad, a52dec and devel etc. Attached is the generated build script {you'll see my comments}. btw: how can I echo $flags ?

DaveT.
#!/bin/sh

  RPM_SOURCE_DIR="/home/work/src/redhat/SOURCES"
  RPM_BUILD_DIR="/home/work/src/redhat/BUILD"
  RPM_OPT_FLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables"
  RPM_ARCH="i386"
  RPM_OS="linux"
  export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS
  RPM_DOC_DIR="/usr/share/doc"
  export RPM_DOC_DIR
  RPM_PACKAGE_NAME="dvbcut"
  RPM_PACKAGE_VERSION="0.5.4"
  RPM_PACKAGE_RELEASE="0.1.fc7"
  export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE
  RPM_BUILD_ROOT="/var/tmp/dvbcut-0.5.4-0.1.fc7-c16971"
  export RPM_BUILD_ROOT
  
  
  set -x
  umask 022
  cd /home/work/src/redhat/BUILD
cd dvbcut-0.5.4
LANG=C
export LANG
unset DISPLAY

unset QTDIR || : ; . /etc/profile.d/qt.sh
echo dt1
#export QTDIR=/usr/lib/qt-3.3
echo $CXXFLAGS
echo $CPPFLAGS

scons EXTRA_CC_FLAGS="$CXXFLAGS" PREFIX=/usr MANPATH=/usr/share/man FFMPEG=/usr/lib
echo dt2

echo dt3

#make 
echo dt4


#%c#onfigure
#make 
#popd



exit 0

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux