multimedia/mythtv port seems to be broken, it stops on the following error (output omitted): 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: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/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/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 audio/audiooutputdigitalencoder.cpp:95:5: error: unknown type name 'CodecID'; did you mean 'AVCodecID'? CodecID codec_id, int bitrate, int samplerate, int channels)enum AVCodecID { ^ ^~~~~~~ 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/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()); \ ^ 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/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.... 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 How-To-Repeat: cd /usr/ports/multimedia/mythtv/ && make install clean
Responsible Changed From-To: freebsd-ports-bugs->decke Over to maintainer (via the GNATS Auto Assign Tool)
I encountered a similar bug (though obviously versions have changed since the bug was reported) and it was caused by a compile-time conflict between mythtv and libavcodec header files already installed by ffmpeg. The mythtv build is putting /usr/local at the front of the include path. But this means it is picking up the avcodec files installed by ffmpeg in /usr/local/include/libavcodec/avcodec.h rather than files from its own avcodec distribution in FFmpeg/libavcodec/avcodec.h. The two versions of avcodec are different and so cause compile problems. There does not appears to be a conflict between the two packages being installed at the same time, just a compile-time issue. If this is the same problem you have encountered then two workarounds exist. Either use poudriere to do the build since this will use a separate clean isolated build environment (without an ffmpeg conflict). See chapter 4 of the handbook for setting it up: https://www.freebsd.org/doc/handbook/ports-poudriere.html Alternatively, you could try and temporarily remove ffmpeg for the duration of the build. pkg delete ffmpeg make pkg install ffmpeg You might want to use the -f flag on pkg-delete to force uninstall without deleting all packages that depend on ffmpeg. Standard disclaimers. I suggest poudriere as the better approach.
Solved with ports r465529.