Mailing List Archive

Re: Building From mythtv-0.25-286.src.rpm Compile Fails - Solved
On Wed, May 30, 2012 at 10:25 PM, Mark Goldberg <marklgoldberg@gmail.com>wrote:

> I am trying to build rpms from mythtv-0.25-286.src.rpm under fedora 16. I
> need some
> extra fixes that are not in the version you have built and not committed
> to fixes.
>
> I get the following error:
>
> g++ -Wl,-O1 -o mytharchivehelper main.o archiveutil.o pxsup2dast.o
> -L/usr/X11R6/lib -L/usr/lib64
> -L/home/mythtv/rpm/BUILD/mythtv-0.25/temp/usr/lib64 -lXext -lXinerama
> -lXxf86vm -lXv -lXrandr -lX11 -lxml2 -ldns_sd -lcrypto -lass
> -lfftw3_threads -lfftw3f -lfftw3 -lcrystalhd -lpulse -ljack -lasound
> -lxvidcore -lx264 -lvpx -lopencore-amrwb -lopencore-amrnb -lfaac -lva -lm
> -pthread -ludev -lbz2 -lrt -L/usr/lib64/nvidia-graphics -ldl -lfreetype
> -lmp3lame -lraw1394 -liec61883 -lavc1394 -lrom1394 -L/usr/X11R6/lib
> -lmythbase-0.25 -lmyth-0.25 -lmythui-0.25 -lmythupnp-0.25
> -lmythservicecontracts-0.25 -lmythswscale -lmythavformat -lmythavcodec
> -lmythavutil -lz -lGL -lpthread -lQtSql -lQtXml -lQtOpenGL -lQtGui
> -lQtNetwork -lQtCore
> main.o: In function `getFileInfo':
> /home/mythtv/rpm/BUILD/mythtv-0.25/mythplugins-0.25/mytharchive/mytharchivehelper/main.cpp:2222:
> undefined reference to `av_dump_format'
> /home/mythtv/rpm/BUILD/mythtv-0.25/temp/usr/lib64/libmyth-0.25.so:
> undefined reference to `avcodec_get_context_defaults3@LIBAVCODEC_52'
> /home/mythtv/rpm/BUILD/mythtv-0.25/temp/usr/lib64/libmyth-0.25.so:
> undefined reference to `av_set_int@LIBAVUTIL_50'
>


The error was due to there being an older version of mythtv installed on
the computer I was building on. In the mythtv.spec file there is a line

LIBS *= -L$temp%{_libdir}

which puts the libraries already on the computer ahead in the search order
of the ones just built, resulting in trying to link with the old versions.
I changed it to

LIBS = -L$temp%{_libdir} $LIBS

and the new libraries are found first.

I also had a problem with junk left over from a previous perl installation
so mythweather would not build, but that was fixed
by deleting the offending directory.

The third issue was a file that was built but not packaged. I had to
uncomment

%{_bindir}/mythffplay

under

%files common

section. I think this will need to be done to build from the latest git and
the library reorder is probably a good idea also.

After that it builds successfully with the latest from git. I will see how
it works tomorrow.

Mark