# MythTV and ffmpeg error on FreeBSD 10.0



## myso (Mar 6, 2014)

Hi all,

I recently upgraded from FreeBSD 9.2 to 10.0. I was successfully using MythTV 0.26.1, which stopped working after the upgrade. So I decided to reinstall & upgrade multimedia/mythtv to 0.27. But this is the error I'm getting all the time:


```
gmake[4]: Entering directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/external/FFmpeg'
LD      ffmpeg_g
LD      ffprobe_g
LD      ffserver_g
libavcodec/libmythavcodec.so: undefined reference to `ff_deinterlace_line_mmx'
libswscale/libmythswscale.so: undefined reference to `ff_yuv2rgb_init_mmx'
libavcodec/libmythavcodec.so: undefined reference to `ff_MPV_common_init_x86'
libavfilter/libmythavfilter.so: undefined reference to `ff_hqdn3d_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_vc1dsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `v210_x86_init'
libavcodec/libmythavcodec.so: undefined reference to `ff_ac3dsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_vp8dsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_spatial_idwt_init_mmx'
libavcodec/libmythavcodec.so: undefined reference to `ff_cavsdsp_init_x86'
libswscale/libmythswscale.so: undefined reference to `ff_sws_init_swScale_mmx'
libavcodec/libmythavcodec.so: undefined reference to `ff_h264chroma_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_lpc_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_dsputil_init_mmx'
libavcodec/libmythavcodec.so: undefined reference to `ff_sbrdsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_pngdsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_deinterlace_line_inplace_mmx'
libavcodec/libmythavcodec.so: undefined reference to `ff_mpadsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_h264qpel_init_x86'
libavfilter/libmythavfilter.so: undefined reference to `ff_yadif_init_x86'
libavfilter/libmythavfilter.so: undefined reference to `ff_gradfun_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_videodsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_h264dsp_init_x86'
libswscale/libmythswscale.so: undefined reference to `updateMMXDitherTables'
libavcodec/libmythavcodec.so: undefined reference to `ff_proresdsp_x86_init'
libswresample/libmythswresample.so: undefined reference to `swri_rematrix_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_rv34dsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_vorbisdsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_h264_pred_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_dct_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_fmt_convert_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_vp3dsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_dct_encode_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_vp56dsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_rv40dsp_init_x86'
libavutil/libmythavutil.so: undefined reference to `ff_get_cpu_flags_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_dnxhdenc_init_x86'
libavfilter/libmythavfilter.so: undefined reference to `ff_volume_init_x86'
libavutil/libmythavutil.so: undefined reference to `ff_float_dsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_dwt_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_fft_init_x86'
libswresample/libmythswresample.so: undeflibavcodec/libmythavcodec.soi:n eudn dreeffienreedn cree fteor e`nceswri_audio_convert_init_x86 't
o `ff_deinterlace_line_mmx'
libswscale/libmythswscale.so: undefined referlibswscale/libmythswscale.soe:n cuen dteof i`nergb2rgb_init_x86d'
reference to `ff_yuv2rgb_init_mmx'
libavcodec/libmythavcodec.so: undefined reference to `ff_mlpdsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_MPV_common_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_diracdsp_init_mmx'
libavfilter/libmythavfilter.so: undefined reference to `ff_hqdn3d_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_vc1dsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `v210_x86_init'
libavcodec/libmythavcodec.so: undefined reference to `ff_ac3dsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_vp8dsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_spatial_idwt_init_mmx'
libavcodec/libmythavcodec.so: undefined reference to `ff_cavsdsp_init_x86'
libswscale/libmythswscale.so: undefined reference to `ff_sws_init_swScale_mmx'
libavcodec/libmythavcodec.so: undefined reference to `ff_h264chroma_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_lpc_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_dsputil_init_mmx'
libavcodec/libmythavcodec.so: undefined reference to `ff_sbrdsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_pngdsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_deinterlace_line_inplace_mmx'
libavcodec/libmythavcodec.so: undefined reference to `ff_mpadsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_h264qpel_init_x86'
libavfilter/libmythavfilter.so: undefined reference to `ff_yadif_init_x86'
libavfilter/libmythavfilter.so: undefined reference to `ff_gradfun_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_videodsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_h264dsp_init_x86'
libswscale/libmythswscale.so: undefined reference to `updateMMXDitherTables'
libavcodec/libmythavcodec.so: undefined reference to `ff_proresdsp_x86_init'
libswresample/libmythswresample.so: undefined reference to `swri_rematrix_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_rv34dsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_vorbisdsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_h264_pred_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_dct_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_fmt_convert_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_vp3dsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_dct_encode_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_vp56dsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_rv40dsp_init_x86'
libavutil/libmythavutil.so: undefined reference to `ff_get_cpu_flags_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_dnxhdenc_init_x86'
libavfilter/libmythavfilter.so: undefined reference to `ff_volume_init_x86'
libavutil/libmythavutil.so: undefined reference to `ff_float_dsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_dwt_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_fft_init_x86'
libswresample/libmythswresample.so: undefined reference to `swri_audio_convert_init_x86'
libswscale/libmythswscale.so: undefined reference to `rgb2rgb_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_mlpdsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_diracdsp_init_mmx'
libavcodec/libmythavcodec.so: undefined reference to `ff_deinterlace_line_mmx'
libswscale/libmythswscale.so: undefined reference to `ff_yuv2rgb_init_mmx'
libavcodec/libmythavcodec.so: undefined reference to `ff_MPV_common_init_x86'
libavfilter/libmythavfilter.so: undefined reference to `ff_hqdn3d_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_vc1dsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `v210_x86_init'
libavcodec/libmythavcodec.so: undefined reference to `ff_ac3dsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_vp8dsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_spatial_idwt_init_mmx'
libavcodec/libmythavcodec.so: undefined reference to `ff_cavsdsp_init_x86'
libswscale/libmythswscale.so: undefined reference to `ff_sws_init_swScale_mmx'
libavcodec/libmythavcodec.so: undefined reference to `ff_h264chroma_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_lpc_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_dsputil_init_mmx'
libavcodec/libmythavcodec.so: undefined reference to `ff_sbrdsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_pngdsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_deinterlace_line_inplace_mmx'
libavcodec/libmythavcodec.so: undefined reference to `ff_mpadsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_h264qpel_init_x86'
libavfilter/libmythavfilter.so: undefined reference to `ff_yadif_init_x86'
libavfilter/libmythavfilter.so: undefined reference to `ff_gradfun_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_videodsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_h264dsp_init_x86'
libswscale/libmythswscale.so: undefined reference to `updateMMXDitherTables'
libavcodec/libmythavcodec.so: undefined reference to `ff_proresdsp_x86_init'
libswresample/libmythswresample.so: undefined reference to `swri_rematrix_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_rv34dsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_vorbisdsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_h264_pred_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_dct_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_fmt_convert_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_vp3dsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_dct_encode_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_vp56dsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_rv40dsp_init_x86'
libavutil/libmythavutil.so: undefined reference to `ff_get_cpu_flags_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_dnxhdenc_init_x86'
libavfilter/libmythavfilter.so: undefined reference to `ff_volume_init_x86'
libavutil/libmythavutil.so: undefined reference to `ff_float_dsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_dwt_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_fft_init_x86'
libswresample/libmythswresample.so: undefined reference to `swri_audio_convert_init_x86'
libswscale/libmythswscale.so: undefined reference to `rgb2rgb_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_mlpdsp_init_x86'
libavcodec/libmythavcodec.so: undefined reference to `ff_diracdsp_init_mmx'
cccc: : error: cclinker command failed with exit code 1 (use -v to see invocation)error: : error:
linker command failed with exit code 1 (use -v to see invocation)linker command failed with exit code 1 (use -v to see invocation)

gmake[4]: *** [ffmpeg_g] Error 1
gmake[4]: *** Waiting for unfinished jobs....
gmake[4]: *** [ffprobe_g] Error 1
gmake[4]: *** [ffserver_g] Error 1
gmake[4]: Leaving directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/external/FFmpeg'
gmake[3]: *** [FFmpeg-all] Error 2
gmake[3]: Leaving directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/external'
gmake[2]: *** [external] Error 2
gmake[2]: Leaving directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/multimedia/mythtv
*** Error code 1

Stop.
make: stopped in /usr/ports/multimedia/mythtv
```
What I tried was uninstalling mythtv and then installing again as well as I have also uninstalled the multimedia/ffmpeg port. Nothing helped.

Any ideas? Thanks


----------



## myso (Mar 20, 2014)

No idea? Well, this is gonna be a hard one for me  :x


----------



## trh411 (Mar 20, 2014)

You should re-install all ports after a major upgrade of FreeBSD. Did you do this after you upgraded to FreeBSD-10.0 from FreeBSD-9.2?


----------



## myso (Mar 20, 2014)

Yep I did. Took me about three days  :beergrin


----------



## trh411 (Mar 20, 2014)

I'll try to install multimedia/mythtv on a FreeBSD-10.0 VM I've got sitting around. It may take a few hours as it is very out-of date with various ports and I will need to bring them all current to have a clean testbed. I'll report back on my results.


----------



## myso (Mar 21, 2014)

Thanks a lot! I really appreciate it. Yesterday I tried to uninstall all unneeded packages with pkg_cutleaves, then I went through all mythtv dependencies step-by-step and reinstalled them. But the error is always the same.


----------



## trh411 (Mar 21, 2014)

myso said:
			
		

> What I tried was uninstalling mythtv and the installing again as well as I have also uninstalled the multimedia/ffmpeg port.


I got sidetracked yesterday and did not make the progress I was hoping for, but I am building multimedia/mythtv now on my FreeBSD-10.0 VM. The host machine is underpowered by today's standards, so it will be a couple of hours (I estimate) before it is completed. I did not realize multimedia/mythtv was such a beast ... 168 dependent ports to install!

In the meantime, having re-reviewed your original post, take a look at the 20131028 entry in /usr/ports UPDATING that deals with multimedia/ffmpeg. Have you done as it instructs? It may be contributing to your installation issues.

I'll report back shortly when the multimedia/mythtv installation completes.


----------



## myso (Mar 21, 2014)

Well I have reinstalled multimedia/ffmpeg several times, last time yesterday, complete uninstall and reinstallation of multimedia/ffmpeg, so I suppose it was done according to UPDATING. 

Also, there seems to be no difference if multimedia/ffmpeg is installed or not.


----------



## trh411 (Mar 21, 2014)

multimedia/mythtv failed to build on my FreeBSD-10.0 VM. I got the same error as you originally reported. There appears to be a problem with the port. I suggest you open a PR and/or drop the port maintainer an email. The port maintainer (i.e., MAINTAINER) is listed in the /usr/ports/multimedia/mythtv/Makefile.


----------



## myso (Mar 21, 2014)

Thank you so much for confirming. I'm already in contact with the maintainer, but no luck in resolution so far. But this is in some way good news for me, that it's not my box that is broken. Thanks again


----------



## trh411 (Mar 21, 2014)

No problem, and good luck getting the issue resolved. Please circle back here and let us know what the resolution was. Thanks.


----------



## myso (Mar 24, 2014)

Hi again, may I kindly ask you to start up your VM once more time and try this patch http://www.freebsd.org/cgi/query-pr.cgi?pr=187836 ?

I'm having some difficulties applying it:

```
[root@pha /usr/ports]# patch -i mythtv_noprecious.diff
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: multimedia/mythtv/Makefile
|===================================================================
|--- multimedia/mythtv/Makefile     (revision 348759)
|+++ multimedia/mythtv/Makefile        (working copy)
--------------------------
Patching file multimedia/mythtv/Makefile using Plan A...
Hunk #1 failed at 28.
1 out of 1 hunks failed--saving rejects to multimedia/mythtv/Makefile.rej
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: multimedia/mythtv/files/patch-external__FFmpeg__configure
|===================================================================
|--- multimedia/mythtv/files/patch-external__FFmpeg__configure       (revision 348759)
|+++ multimedia/mythtv/files/patch-external__FFmpeg__configure (working copy)
--------------------------
Patching file multimedia/mythtv/files/patch-external__FFmpeg__configure using Plan A...
Hunk #1 succeeded at 20.
done
```


```
[root@pha /usr/ports]# cat multimedia/mythtv/Makefile.rej
@@ -28,6 +28,7 @@
 WRKSRC=                ${WRKDIR}/${GH_ACCOUNT}-${GH_PROJECT}-${GH_COMMIT}/${GH_PROJECT}

 ONLY_FOR_ARCHS=     i386 amd64
+NOPRECIOUSMAKEVARS= # don't override $(ARCH) in ffmpeg makefiles
 USES=         gmake pkgconfig perl5
 USE_QT4= gui sql network script linguist_build l10n sql-mysql_run \
             moc_build qmake_build rcc_build uic_build imageformats
```
Thanks

Michael


----------



## trh411 (Mar 24, 2014)

I've been working on this for a couple hours. The multimedia/mythtv patch installed fine, but I ran into several problems installing Perl module dependencies. I got past all of them except one: converters/p5-Text-Iconv  errors out with "*use of undeclared identifier*" errors in Iconv.xs. Not sure what's going on, but I'm looking into it.


----------



## trh411 (Mar 24, 2014)

Looks like I'm not the only one having a problem with installing converters/p5-Text-Iconv. Found the following post on the freebsd-perl@freebsd.org mailing list: http://lists.freebsd.org/pipermail/freebsd-perl/2014-February/009230.html. I did not found a PR for this issue, so I will open one.


----------



## myso (Mar 24, 2014)

Thanks again for your time spent on this issue. I managed to patch the Makefile (I had some mistake in the diff file), multimedia/mythtv got around the ffmpeg phase, but is stuck on another error  :q 


```
rm -f libmythbase-0.27.so.0.27.0 libmythbase-0.27.so libmythbase-0.27.so.0 libmythbase-0.27.so.0.27
c++ -pthread -Wl,-rpath,/usr/local/lib/qt4 -shared -Wl,-soname,libmythbase-0.27.so.0 -o libmythbase-0.27.so.0.27.0 mthread.o mthreadpool.o mythsocket.o mythdbcon.o mythdb.o mythdbparams.o oldsettings.o mythobservable.o mythevent.o mythtimer.o mythsignalingtimer.o mythdirs.o lcddevice.o mythstorage.o remotefile.o mythcorecontext.o mythsystem.o mythlocale.o storagegroup.o mythcoreutil.o mythdownloadmanager.o mythtranslation.o unzip.o iso639.o iso3166.o mythmedia.o mythmiscutil.o mythhdd.o mythcdrom.o dbutil.o logging.o loggingserver.o referencecounter.o mythcommandlineparser.o filesysteminfo.o hardwareprofile.o serverpool.o plist.o signalhandling.o mythtimezone.o mythdate.o mythplugin.o housekeeper.o mythsystemlegacy.o mythtypes.o threadedfilewriter.o mythsingledownload.o mcodecs.o mythsystemunix.o mythcdrom-freebsd.o moc_mythsocket.o moc_mythsignalingtimer.o moc_lcddevice.o moc_logging.o moc_loggingserver.o moc_mythcorecontext.o moc_mythsystemprivate.o moc_mythdownloadmanager.o moc_mythmedia.o moc_mythcdrom.o moc_filesysteminfo.o moc_hardwareprofile.o moc_serverpool.o moc_signalhandling.o moc_housekeeper.o moc_mythsystemlegacy.o moc_mythsingledownload.o moc_mythsystemunix.o   -L/usr/local/lib/qt4 -lthr -lc -ludf -lXext -lXinerama -lXxf86vm -lXv -lXrandr -lX11 -lxml2 -lcrypto -lmp3lame -liconv -L/usr/local/lib -lm -pthread -lfreetype -lz -lbz2 -lGL -L/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/external/zeromq/src/.libs -lmythzmq -L/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/external/nzmqt/src -lmythnzmqt -L/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/external/qjson/lib -lmythqjson -L/usr/local/lib/qt4 -lQtSql -lQtXml -lQtGui -lQtNetwork -lQtCore
/usr/bin/ld: cannot find -ludf
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[4]: *** [libmythbase-0.27.so.0.27.0] Error 1
gmake[4]: Leaving directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/libs/libmythbase'
gmake[3]: *** [sub-libmythbase-make_default] Error 2
c++ -c -pipe -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -DNDEBUG -fomit-frame-pointer -fPIC -pthread -g -Wall -Wpointer-arith -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -Wno-self-assign -Wno-constant-logical-operand -Wno-unused-value -Qunused-arguments -pthread -D_THREAD_SAFE -fPIC -DMMX -D_GNU_SOURCE -DSERVICE_API -DQT_SCRIPT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/share/qt4/mkspecs/freebsd-g++ -I. -I/usr/local/include/qt4/QtCore -I/usr/local/include/qt4/QtGui -I/usr/local/include/qt4/QtScript -I/usr/local/include/qt4 -I/usr/include -I/usr/local -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include -I../../external/qjson/include -I../../external/zeromq/include -I../../external/nzmqt/include/nzmqt -Idatacontracts -Iservices -I../libmyth -I. -I/usr/local/include/qt4 -I/usr/local/include -o moc_titleInfoList.o moc_titleInfoList.cpp
gmake[3]: *** Waiting for unfinished jobs....
c++ -c -pipe -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -DNDEBUG -fomit-frame-pointer -fPIC -pthread -g -Wall -Wpointer-arith -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -Wno-self-assign -Wno-constant-logical-operand -Wno-unused-value -Qunused-arguments -pthread -D_THREAD_SAFE -fPIC -DMMX -D_GNU_SOURCE -DSERVICE_API -DQT_SCRIPT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/share/qt4/mkspecs/freebsd-g++ -I. -I/usr/local/include/qt4/QtCore -I/usr/local/include/qt4/QtGui -I/usr/local/include/qt4/QtScript -I/usr/local/include/qt4 -I/usr/include -I/usr/local -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include -I../../external/qjson/include -I../../external/zeromq/include -I../../external/nzmqt/include/nzmqt -Idatacontracts -Iservices -I../libmyth -I. -I/usr/local/include/qt4 -I/usr/local/include -o moc_labelValue.o moc_labelValue.cpp
c++ -c -pipe -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -DNDEBUG -fomit-frame-pointer -fPIC -pthread -g -Wall -Wpointer-arith -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -Wno-self-assign -Wno-constant-logical-operand -Wno-unused-value -Qunused-arguments -pthread -D_THREAD_SAFE -fPIC -DMMX -D_GNU_SOURCE -DSERVICE_API -DQT_SCRIPT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/share/qt4/mkspecs/freebsd-g++ -I. -I/usr/local/include/qt4/QtCore -I/usr/local/include/qt4/QtGui -I/usr/local/include/qt4/QtScript -I/usr/local/include/qt4 -I/usr/include -I/usr/local -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include -I../../external/qjson/include -I../../external/zeromq/include -I../../external/nzmqt/include/nzmqt -Idatacontracts -Iservices -I../libmyth -I. -I/usr/local/include/qt4 -I/usr/local/include -o moc_logMessage.o moc_logMessage.cpp
c++ -c -pipe -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -DNDEBUG -fomit-frame-pointer -fPIC -pthread -g -Wall -Wpointer-arith -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -Wno-self-assign -Wno-constant-logical-operand -Wno-unused-value -Qunused-arguments -pthread -D_THREAD_SAFE -fPIC -DMMX -D_GNU_SOURCE -DSERVICE_API -DQT_SCRIPT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/share/qt4/mkspecs/freebsd-g++ -I. -I/usr/local/include/qt4/QtCore -I/usr/local/include/qt4/QtGui -I/usr/local/include/qt4/QtScript -I/usr/local/include/qt4 -I/usr/include -I/usr/local -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include -I../../external/qjson/include -I../../external/zeromq/include -I../../external/nzmqt/include/nzmqt -Idatacontracts -Iservices -I../libmyth -I. -I/usr/local/include/qt4 -I/usr/local/include -o moc_logMessageList.o moc_logMessageList.cpp
rm -f libmythservicecontracts-0.27.so.0.27.0 libmythservicecontracts-0.27.so libmythservicecontracts-0.27.so.0 libmythservicecontracts-0.27.so.0.27
c++ -pthread -Wl,-rpath,/usr/local/lib/qt4 -shared -Wl,-soname,libmythservicecontracts-0.27.so.0 -o libmythservicecontracts-0.27.so.0.27.0 service.o moc_service.o moc_mythServices.o moc_guideServices.o moc_contentServices.o moc_dvrServices.o moc_channelServices.o moc_videoServices.o moc_captureServices.o moc_frontendServices.o moc_connectionInfo.o moc_databaseInfo.o moc_programAndChannel.o moc_programGuide.o moc_recording.o moc_settingList.o moc_wolInfo.o moc_programList.o moc_encoder.o moc_encoderList.o moc_storageGroupDir.o moc_storageGroupDirList.o moc_channelInfoList.o moc_videoSource.o moc_videoSourceList.o moc_videoMultiplex.o moc_videoMultiplexList.o moc_videoMetadataInfo.o moc_videoMetadataInfoList.o moc_blurayInfo.o moc_timeZoneInfo.o moc_videoLookupInfo.o moc_videoLookupInfoList.o moc_versionInfo.o moc_lineup.o moc_captureCard.o moc_captureCardList.o moc_recRule.o moc_recRuleList.o moc_artworkInfo.o moc_artworkInfoList.o moc_frontendStatus.o moc_frontendActionList.o moc_liveStreamInfo.o moc_liveStreamInfoList.o moc_titleInfo.o moc_titleInfoList.o moc_labelValue.o moc_logMessage.o moc_logMessageList.o   -L/usr/local/lib/qt4 -lXext -lXinerama -lXxf86vm -lXv -lXrandr -lX11 -lxml2 -lcrypto -lmp3lame -liconv -L/usr/local/lib -lm -pthread -lfreetype -lz -lbz2 -lGL -L/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/external/zeromq/src/.libs -lmythzmq -L/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/external/nzmqt/src -lmythnzmqt -L/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/external/qjson/lib -lmythqjson -L/usr/local/lib/qt4 -lQtScript -lQtGui -lQtCore
ln -s libmythservicecontracts-0.27.so.0.27.0 libmythservicecontracts-0.27.so
ln -s libmythservicecontracts-0.27.so.0.27.0 libmythservicecontracts-0.27.so.0
ln -s libmythservicecontracts-0.27.so.0.27.0 libmythservicecontracts-0.27.so.0.27
{ test -z "" || cd ""; } && test $(gdb --version | sed -e 's,[^0-9][^0-9]*\([0-9]\)\.\([0-9]\).*,\1\2,;q') -gt 72 && gdb --nx --batch --quiet -ex 'set confirm off' -ex "save gdb-index ." -ex quit 'libmythservicecontracts-0.27.so.0.27.0' && test -f libmythservicecontracts-0.27.so.0.27.0.gdb-index && objcopy --add-section '.gdb_index=libmythservicecontracts-0.27.so.0.27.0.gdb-index' --set-section-flags '.gdb_index=readonly' 'libmythservicecontracts-0.27.so.0.27.0' 'libmythservicecontracts-0.27.so.0.27.0' && rm -f libmythservicecontracts-0.27.so.0.27.0.gdb-index || true
gmake[4]: Leaving directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/libs/libmythservicecontracts'
gmake[3]: Leaving directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/libs'
gmake[2]: *** [libs] Error 2
gmake[2]: Leaving directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/multimedia/mythtv
*** Error code 1

Stop.
make: stopped in /usr/ports/multimedia/mythtv
```


----------



## trh411 (Mar 24, 2014)

myso said:
			
		

> Thanks again for your time spent on this issue. I managed to patch the Makefile (I had some mistake in the diff file), multimedia/mythtv got around the ffmpeg phase, but is stuck on another error


Can you put that error in context for me? Exactly what is being installed: multimedia/mythtv or one of its build dependencies?


----------



## myso (Mar 24, 2014)

Well, as I have installed all dependencies manually beforehand I suppose it's from multimedia/mythtv

maybe this will bring more light into the situation?


```
gmake[4]: Entering directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/external/FFmpeg'
CP      ffmpeg
CP      ffprobe
CP      ffserver
STRIP   ffprobe
skipping strip ffprobe
STRIP   ffmpeg
skipping strip ffmpeg
STRIP   ffserver
skipping strip ffserver
gmake[4]: Leaving directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/external/FFmpeg'
gmake[3]: Leaving directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/external'
gmake -C libs
gmake[3]: Entering directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/libs'
cd libmythsoundtouch/ && gmake -f Makefile
cd libmythdvdnav/ && gmake -f Makefile
cd libmythfreesurround/ && gmake -f Makefile
cd libmythbase/ && gmake -f Makefile
gmake[4]: Entering directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/libs/libmythsoundtouch'
gmake[4]: Nothing to be done for `first'.
gmake[4]: Leaving directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/libs/libmythsoundtouch'
cd libmythservicecontracts/ && gmake -f Makefile
gmake[4]: Entering directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/libs/libmythdvdnav'
gmake[4]: Nothing to be done for `first'.
gmake[4]: Leaving directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/libs/libmythdvdnav'
cd libmythfreemheg/ && gmake -f Makefile
gmake[4]: Entering directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/libs/libmythfreesurround'
gmake[4]: Nothing to be done for `first'.
gmake[4]: Leaving directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/libs/libmythfreesurround'
cd libmythnvctrl/ && gmake -f Makefile
gmake[4]: Entering directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/libs/libmythbase'
rm -f libmythbase-0.27.so.0.27.0 libmythbase-0.27.so libmythbase-0.27.so.0 libmythbase-0.27.so.0.27
c++ -pthread -Wl,-rpath,/usr/local/lib/qt4 -shared -Wl,-soname,libmythbase-0.27.so.0 -o libmythbase-0.27.so.0.27.0 mthread.o mthreadpool.o mythsocket.o mythdbcon.o mythdb.o mythdbparams.o oldsettings.o mythobservable.o mythevent.o mythtimer.o mythsignalingtimer.o mythdirs.o lcddevice.o mythstorage.o remotefile.o mythcorecontext.o mythsystem.o mythlocale.o storagegroup.o mythcoreutil.o mythdownloadmanager.o mythtranslation.o unzip.o iso639.o iso3166.o mythmedia.o mythmiscutil.o mythhdd.o mythcdrom.o dbutil.o logging.o loggingserver.o referencecounter.o mythcommandlineparser.o filesysteminfo.o hardwareprofile.o serverpool.o plist.o signalhandling.o mythtimezone.o mythdate.o mythplugin.o housekeeper.o mythsystemlegacy.o mythtypes.o threadedfilewriter.o mythsingledownload.o mcodecs.o mythsystemunix.o mythcdrom-freebsd.o moc_mythsocket.o moc_mythsignalingtimer.o moc_lcddevice.o moc_logging.o moc_loggingserver.o moc_mythcorecontext.o moc_mythsystemprivate.o moc_mythdownloadmanager.o moc_mythmedia.o moc_mythcdrom.o moc_filesysteminfo.o moc_hardwareprofile.o moc_serverpool.o moc_signalhandling.o moc_housekeeper.o moc_mythsystemlegacy.o moc_mythsingledownload.o moc_mythsystemunix.o   -L/usr/local/lib/qt4 -lthr -lc -ludf -lXext -lXinerama -lXxf86vm -lXv -lXrandr -lX11 -lxml2 -lcrypto -lmp3lame -liconv -L/usr/local/lib -lm -pthread -lfreetype -lz -lbz2 -lGL -L/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/external/zeromq/src/.libs -lmythzmq -L/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/external/nzmqt/src -lmythnzmqt -L/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/external/qjson/lib -lmythqjson -L/usr/local/lib/qt4 -lQtSql -lQtXml -lQtGui -lQtNetwork -lQtCore
gmake[4]: Entering directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/libs/libmythservicecontracts'
gmake[4]: Entering directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/libs/libmythfreemheg'
gmake[4]: Nothing to be done for `first'.
gmake[4]: Nothing to be done for `first'.
gmake[4]: Leaving directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/libs/libmythfreemheg'
gmake[4]: Leaving directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/libs/libmythservicecontracts'
cd libmythmpeg2/ && gmake -f Makefile
gmake[4]: Entering directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/libs/libmythnvctrl'
gmake[4]: Nothing to be done for `first'.
gmake[4]: Leaving directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/libs/libmythnvctrl'
gmake[4]: Entering directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/libs/libmythmpeg2'
gmake[4]: Nothing to be done for `first'.
gmake[4]: Leaving directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/libs/libmythmpeg2'
/usr/bin/ld: cannot find -ludf
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[4]: *** [libmythbase-0.27.so.0.27.0] Error 1
gmake[4]: Leaving directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/libs/libmythbase'
gmake[3]: *** [sub-libmythbase-make_default] Error 2
gmake[3]: Leaving directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/libs'
gmake[2]: *** [libs] Error 2
gmake[2]: Leaving directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/multimedia/mythtv
*** Error code 1

Stop.
make: stopped in /usr/ports/multimedia/mythtv
```


----------



## trh411 (Mar 25, 2014)

An update was committed early this morning for converters/p5-Text-Iconv that resolved my installation problem with that port. After that I was able to successfully complete the installation of multimedia/mythtv.


----------



## trh411 (Mar 25, 2014)

myso said:
			
		

> Well, as I have installed all dependencies manually beforehand I suppose it's from multimedia/mythtv
> Maybe this will bring more light into the situation?
> 
> ```
> ...


Do you have devel/binutils installed? What does PATH look like for @root?


----------



## myso (Mar 25, 2014)

```
[root@pha /]# pkg info | grep binutils
binutils-2.24                  GNU binary tools
```


```
[root@pha ~]# echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin
```


----------



## trh411 (Mar 25, 2014)

Not sure why the `ld` command is failing. I guess it's possible something went wrong with applying the patch. An update was committed for multimedia/mythtv today. Suggest you update your ports tree and re-try the installation. Be sure to do a "clean" install.


----------



## trh411 (Mar 26, 2014)

Have you made any progress on this?


----------



## myso (Mar 26, 2014)

Hi there. Yesterday I updated my portstree and tried installing again. Surprisingly I'm stuck on another error, but this time I'm almost certain it's a sw-bug in the multimedia/mythtv. So what I did was opening a new PR PR 187952. Well, now I'm waiting what happens next. 

The first time I was installing multimedia/mythtv it took me more than a year to get it working, as this is just an update I expect to have it working in a few months  P


----------



## trh411 (Mar 26, 2014)

myso said:
			
		

> Hi there. Yesterday I updated my portstree and tried installing again. Surprisingly I'm stuck on another error, but this time I'm almost certain it's a sw-bug in the multimedia/mythtv. So what I did was opening a new PR PR 187952. Well, now I'm waiting what happens next.
> 
> The first time I was installing multimedia/mythtv it took me more than a year to get it working, as this is just an update I expect to have it working in a few months  P


After I got all the dependency issues resolved (most all of them lang/perl module related), multimedia/mythtv installed like a champ. If you likewise have all the dependencies installed, then why does multimedia/mythtv not install for you? Very strange.

I remember a topic in the Forums a while back whereby devel/cmake would not build because of an issue in security/openssl, which was not a dependency of devel/cmake. If you had security/openssl installed devel/cmake would not build. Otherwise it would build just fine. Your issue may be similar.

Good you are a patient person.


----------



## myso (Apr 18, 2014)

Well, one more month had passed, no reaction to the PRPR 187952, no reply from maintainer, no TV in my home  :x 

There's a new minor version of multimedia/mythtv but the error is getting old:


```
cd libmyth/ && gmake -f Makefile
gmake[4]: Entering directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/libs/libmyth'
c++ -c -pipe -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -DNDEBUG -fomit-frame-pointer -fPIC -pthread -g -Wall -Wpointer-arith -D__STDC_CONSTANT_MACROS -D__STDC_LI                                                                     MIT_MACROS -Wno-self-assign -Wno-constant-logical-operand -Wno-unused-value -Qunused-arguments -pthread -D_THREAD_SAFE -fPIC -DMMX -D_GNU_SOURCE -DMYTH_API -DUSING_OSS                                                                      -DQT_SCRIPT_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/share/qt4/mkspecs/freebsd-g++ -I. -I/usr/local/include/qt                                                                     4/QtCore -I/usr/local/include/qt4/QtNetwork -I/usr/local/include/qt4/QtGui -I/usr/local/include/qt4/QtXml -I/usr/local/include/qt4/QtSql -I/usr/local/include/qt4/QtScri                                                                     pt -I/usr/local/include/qt4 -I/usr/local -I/usr/local/include/libxml2 -I/usr/local/include -I../../external/qjson/include -I../../external/zeromq/include -I../../extern                                                                     al/nzmqt/include/nzmqt -I../../external/libsamplerate -I../libmythsoundtouch -I../libmythfreesurround -I../libmythbase -I../.. -I.. -I. -I../libmythupnp -I../libmythui                                                                      -I../../external/FFmpeg -I. -I/usr/local/include/qt4 -I/usr/local/include -o audiooutput.o audio/audiooutput.cpp
c++ -c -pipe -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -DNDEBUG -fomit-frame-pointer -fPIC -pthread -g -Wall -Wpointer-arith -D__STDC_CONSTANT_MACROS -D__STDC_LI                                                                     MIT_MACROS -Wno-self-assign -Wno-constant-logical-operand -Wno-unused-value -Qunused-arguments -pthread -D_THREAD_SAFE -fPIC -DMMX -D_GNU_SOURCE -DMYTH_API -DUSING_OSS                                                                      -DQT_SCRIPT_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/share/qt4/mkspecs/freebsd-g++ -I. -I/usr/local/include/qt                                                                     4/QtCore -I/usr/local/include/qt4/QtNetwork -I/usr/local/include/qt4/QtGui -I/usr/local/include/qt4/QtXml -I/usr/local/include/qt4/QtSql -I/usr/local/include/qt4/QtScri                                                                     pt -I/usr/local/include/qt4 -I/usr/local -I/usr/local/include/libxml2 -I/usr/local/include -I../../external/qjson/include -I../../external/zeromq/include -I../../extern                                                                     al/nzmqt/include/nzmqt -I../../external/libsamplerate -I../libmythsoundtouch -I../libmythfreesurround -I../libmythbase -I../.. -I.. -I. -I../libmythupnp -I../libmythui                                                                      -I../../external/FFmpeg -I. -I/usr/local/include/qt4 -I/usr/local/include -o audiooutputbase.o audio/audiooutputbase.cpp
c++ -c -pipe -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -DNDEBUG -fomit-frame-pointer -fPIC -pthread -g -Wall -Wpointer-arith -D__STDC_CONSTANT_MACROS -D__STDC_LI                                                                     MIT_MACROS -Wno-self-assign -Wno-constant-logical-operand -Wno-unused-value -Qunused-arguments -pthread -D_THREAD_SAFE -fPIC -DMMX -D_GNU_SOURCE -DMYTH_API -DUSING_OSS                                                                      -DQT_SCRIPT_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/share/qt4/mkspecs/freebsd-g++ -I. -I/usr/local/include/qt                                                                     4/QtCore -I/usr/local/include/qt4/QtNetwork -I/usr/local/include/qt4/QtGui -I/usr/local/include/qt4/QtXml -I/usr/local/include/qt4/QtSql -I/usr/local/include/qt4/QtScri                                                                     pt -I/usr/local/include/qt4 -I/usr/local -I/usr/local/include/libxml2 -I/usr/local/include -I../../external/qjson/include -I../../external/zeromq/include -I../../extern                                                                     al/nzmqt/include/nzmqt -I../../external/libsamplerate -I../libmythsoundtouch -I../libmythfreesurround -I../libmythbase -I../.. -I.. -I. -I../libmythupnp -I../libmythui                                                                      -I../../external/FFmpeg -I. -I/usr/local/include/qt4 -I/usr/local/include -o spdifencoder.o audio/spdifencoder.cpp
c++ -c -pipe -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -DNDEBUG -fomit-frame-pointer -fPIC -pthread -g -Wall -Wpointer-arith -D__STDC_CONSTANT_MACROS -D__STDC_LI                                                                     MIT_MACROS -Wno-self-assign -Wno-constant-logical-operand -Wno-unused-value -Qunused-arguments -pthread -D_THREAD_SAFE -fPIC -DMMX -D_GNU_SOURCE -DMYTH_API -DUSING_OSS                                                                      -DQT_SCRIPT_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/share/qt4/mkspecs/freebsd-g++ -I. -I/usr/local/include/qt                                                                     4/QtCore -I/usr/local/include/qt4/QtNetwork -I/usr/local/include/qt4/QtGui -I/usr/local/include/qt4/QtXml -I/usr/local/include/qt4/QtSql -I/usr/local/include/qt4/QtScri                                                                     pt -I/usr/local/include/qt4 -I/usr/local -I/usr/local/include/libxml2 -I/usr/local/include -I../../external/qjson/include -I../../external/zeromq/include -I../../extern                                                                     al/nzmqt/include/nzmqt -I../../external/libsamplerate -I../libmythsoundtouch -I../libmythfreesurround -I../libmythbase -I../.. -I.. -I. -I../libmythupnp -I../libmythui                                                                      -I../../external/FFmpeg -I. -I/usr/local/include/qt4 -I/usr/local/include -o audiooutputdigitalencoder.o audio/audiooutputdigitalencoder.cpp
In file included from audio/spdifencoder.cpp:6:
audio/spdifencoder.h:35:34: error: use of undeclared identifier 'AVCODEC_MAX_AUDIO_FRAME_SIZE'
    unsigned char       m_buffer[AVCODEC_MAX_AUDIO_FRAME_SIZE];
                                 ^
audio/spdifencoder.cpp:75:30: error: unknown type name 'CodecID'; did you mean 'AVCodecID'?
    codec->codec_id       = (CodecID)codec_id;
                             ^~~~~~~
                             AVCodecID
/usr/local/include/libavcodec/avcodec.h:102:6: note: 'AVCodecID' declared here
enum AVCodecID {
     ^
audio/spdifencoder.cpp:79:49: error: unknown type name 'CodecID'; did you mean 'AVCodecID'?
            .arg(muxer).arg(ff_codec_id_string((CodecID)codec_id)));
                                                ^~~~~~~
                                                AVCodecID
../libmythbase/mythlogging.h:37:34: note: expanded from macro 'LOG'
                         QString(_STRING_).toLocal8Bit().constData());  \
                                 ^
/usr/local/include/libavcodec/avcodec.h:102:6: note: 'AVCodecID' declared here
enum AVCodecID {
     ^
audio/spdifencoder.cpp:79:29: error: use of undeclared identifier 'ff_codec_id_string'
            .arg(muxer).arg(ff_codec_id_string((CodecID)codec_id)));
                            ^
../libmythbase/mythlogging.h:37:34: note: expanded from macro 'LOG'
                         QString(_STRING_).toLocal8Bit().constData());  \
                                 ^
In file included from audio/audiooutputdigitalencoder.cpp:16:
In file included from audio/audiooutputdigitalencoder.h:8:
audio/spdifencoder.h:35:34: error: use of undeclared identifier 'AVCODEC_MAX_AUDIO_FRAME_SIZE'
    unsigned char       m_buffer[AVCODEC_MAX_AUDIO_FRAME_SIZE];
                                 ^
In file included from audio/spdifencoder.cpp:6:
audio/spdifencoder.h:35:25: warning: private field 'm_buffer' is not used [-Wunused-private-field]
    unsigned char       m_buffer[AVCODEC_MAX_AUDIO_FRAME_SIZE];
                        ^
1 warning and 4 errors generated.
gmake[4]: *** [spdifencoder.o] Error 1
gmake[4]: *** Waiting for unfinished jobs....
In file included from audio/audiooutputdigitalencoder.cpp:16:
audio/audiooutputdigitalencoder.h:23:17: error: unknown type name 'CodecID'; did you mean 'AVCodecID'?
    bool   Init(CodecID codec_id, int bitrate, int samplerate, int channels);
                ^~~~~~~
                AVCodecID
/usr/local/include/libavcodec/avcodec.h:102:6: note: 'AVCodecID' declared here
enum AVCodecID {
     ^
audio/audiooutputdigitalencoder.cpp:95:5: error: unknown type name 'CodecID'; did you mean 'AVCodecID'?
    CodecID codec_id, int bitrate, int samplerate, int channels)
    ^~~~~~~
    AVCodecID
/usr/local/include/libavcodec/avcodec.h:102:6: note: 'AVCodecID' declared here
enum AVCodecID {
     ^
audio/audiooutputdigitalencoder.cpp:102:18: error: use of undeclared identifier 'ff_codec_id_string'
            .arg(ff_codec_id_string(codec_id)) .arg(bitrate)
                 ^
../libmythbase/mythlogging.h:37:34: note: expanded from macro 'LOG'
                         QString(_STRING_).toLocal8Bit().constData());  \
                                 ^
4 errors generated.
gmake[4]: *** [audiooutputdigitalencoder.o] Error 1
In file included from audio/audiooutputbase.cpp:15:
In file included from audio/audiooutputdigitalencoder.h:8:
audio/spdifencoder.h:35:34: error: use of undeclared identifier 'AVCODEC_MAX_AUDIO_FRAME_SIZE'
    unsigned char       m_buffer[AVCODEC_MAX_AUDIO_FRAME_SIZE];
                                 ^
In file included from audio/audiooutputbase.cpp:15:
audio/audiooutputdigitalencoder.h:23:17: error: unknown type name 'CodecID'; did you mean 'AVCodecID'?
    bool   Init(CodecID codec_id, int bitrate, int samplerate, int channels);
                ^~~~~~~
                AVCodecID
/usr/local/include/libavcodec/avcodec.h:102:6: note: 'AVCodecID' declared here
enum AVCodecID {
     ^
audio/audiooutputbase.cpp:646:38: error: unknown type name 'CodecID'; did you mean 'AVCodecID'?
            .arg(ff_codec_id_string((CodecID)codec))
                                     ^
audio/audiooutputbase.h:24:54: note: expanded from macro 'VBAUDIO'
#define VBAUDIO(str)   LOG(VB_AUDIO, LOG_INFO, LOC + str)
                                                     ^
../libmythbase/mythlogging.h:37:34: note: expanded from macro 'LOG'
                         QString(_STRING_).toLocal8Bit().constData());  \
                                 ^
/usr/local/include/libavcodec/avcodec.h:102:6: note: 'AVCodecID' declared here
enum AVCodecID {
     ^
audio/audiooutputbase.cpp:646:18: error: use of undeclared identifier 'ff_codec_id_string'
            .arg(ff_codec_id_string((CodecID)codec))
                 ^
audio/audiooutputbase.h:24:54: note: expanded from macro 'VBAUDIO'
#define VBAUDIO(str)   LOG(VB_AUDIO, LOG_INFO, LOC + str)
                                                     ^
../libmythbase/mythlogging.h:37:34: note: expanded from macro 'LOG'
                         QString(_STRING_).toLocal8Bit().constData());  \
                                 ^
In file included from audio/audiooutputbase.cpp:14:
audio/audiooutputbase.h:278:10: warning: private field 'memory_corruption_test0' is not used [-Wunused-private-field]
    uint memory_corruption_test0;
         ^
audio/audiooutputbase.h:280:10: warning: private field 'memory_corruption_test1' is not used [-Wunused-private-field]
    uint memory_corruption_test1;
         ^
audio/audiooutputbase.h:283:10: warning: private field 'memory_corruption_test2' is not used [-Wunused-private-field]
    uint memory_corruption_test2;
         ^
audio/audiooutputbase.h:288:10: warning: private field 'memory_corruption_test3' is not used [-Wunused-private-field]
    uint memory_corruption_test3;
         ^
4 warnings and 4 errors generated.
gmake[4]: *** [audiooutputbase.o] Error 1
gmake[4]: Leaving directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/libs/libmyth'
gmake[3]: *** [sub-libmyth-make_default] Error 2
gmake[3]: Leaving directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/libs'
gmake[2]: *** [libs] Error 2
gmake[2]: Leaving directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/multimedia/mythtv
*** Error code 1

Stop.
make: stopped in /usr/ports/multimedia/mythtv
```


----------



## trh411 (Apr 19, 2014)

I almost posted here the other day to inquire on the status of your efforts with multimedia/mythtv hoping for good news. Then I saw your post.

From previous posts you will recall that I was able to successfully install multimedia/mythtv (0.27.0.20140121) on my FreeBSD-10.0-RELEASE VM. However, attempts to install the multimedia/mythtv (0.27.0.20140121_2) upgrade result in the following error:

```
c++ -c -pipe -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -DNDEBUG -fomit-frame-pointer -fPIC -pthread -g -Wall -Wpointer-arith -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -Wno-self-assign -Wno-constant-logical-operand -Wno-unused-value -Qunused-arguments -pthread -D_THREAD_SAFE -fPIC -DMMX -D_GNU_SOURCE -DMETA_API -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/share/qt4/mkspecs/freebsd-g++ -I. -I/usr/local/include/qt4/QtCore -I/usr/local/include/qt4/QtNetwork -I/usr/local/include/qt4/QtGui -I/usr/local/include/qt4/QtXml -I/usr/local/include/qt4/QtSql -I/usr/local/include/qt4 -I/usr/include -I/usr/local -I/usr/local/include -I/usr/local/include/libxml2 -I../../external/qjson/include -I../../external/zeromq/include -I../../external/nzmqt/include/nzmqt -I../libmythbase -I../libmythtv -I../.. -I.. -I. -I../libmythupnp -I../libmythui -I../../external/FFmpeg -I../libmyth -I../../external/libmythbluray -I/usr/local/include/taglib -I. -I/usr/local/include/qt4 -I/usr/local/include -o metaiomp4.o metaiomp4.cpp
metaiomp4.cpp:213:5: error: use of undeclared identifier 'av_estimate_timings'
    av_estimate_timings(pContext, 0);
    ^
1 error generated.
gmake[4]: *** [metaiomp4.o] Error 1
gmake[4]: Leaving directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/libs/libmythmetadata'
gmake[3]: *** [sub-libmythmetadata-make_default] Error 2
gmake[3]: Leaving directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv/libs'
gmake[2]: *** [libs] Error 2
gmake[2]: Leaving directory `/usr/ports/multimedia/mythtv/work/MythTV-mythtv-5a5e1cd/mythtv'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
```
This error is very different from yours and I'm dead in the water here too.


----------



## myso (Apr 23, 2014)

Hi, big news on this issue! 

The port maintainer seems to have found the reason of my issue. According to him 





> it's an ancient compatibility symlink that is not needed anymore and
> confused mythtv's fragile build system


To be specific it's the file /usr/X11R6 which is linked to /usr/local. So after removing this link (make sure it's not a directory) `rm /usr/X11R6` the compilation went past the previos errors and ended on the same error as pasted by @trh411 in the previous post.

This is probably a general error in the last version of multimedia/mythtv. I'll investigate again  :OOO


----------



## trh411 (Apr 23, 2014)

I saw this Mythtv-frontend does not build if /usr/X11R6 symlink exists topic, but did not make the connection that it could be related to your issue as well. Good to hear you are making some (albeit slow) progress on this.


----------



## myso (May 15, 2014)

Uninstalling multimedia/ffmpeg helped me to get past the error. Now after a couple of months I have mythtv installed again, now I'm battling with the configuration because there's some problem with the receivers. but I think we can flag all the issues mentioned in this thread as SOLVED.


----------

