As many of you have noticed, version 1.8.6 introduces libavcodec dependency. Because of the bug in MakeMKV OSS code, you can get the following error during compilation:
libffabi/src/ffabi.c:166:15: error: ‘AVCodecContext’ has no member named ‘refcounted_frames’
. Please try the following workaround if you get this error:
- Open the file "libffabi/src/ffabi.c" in editor of your choice
- Delete or comment out the lines 166 and 321. Both should contain the code snippet below
- Save the file, try to compile again.
- If it works, please reply in this thread with a version of libavcodec that you have (find libavcodec.h and issue "cat version.h" from the same dir)
Where is this file located? I tried doing a complete search of my system and it came up empty........I also typed it into terminal to bring up the editor, it was empty.....I'm using OpenSuse 12.3......
Hey, thanks for that quick response.......I was using an automated script to compile the program......guess I'll try the manual way, unless that archive was created by the script.....
After removing the lines as suggested there is now a link time error:
mkdir -p out
gcc -Os -D_GNU_SOURCE -D_linux_ -D_REENTRANT -shared -Wl,-z,defs -oout/libmakemkv.so.1.full -Ilibebml/inc -DEBML_NO_READ -DEBML_STRICT_API -Ilibmatroska/inc \
-Ilibmakemkv/inc -Isstring/inc -Imakemkvgui/inc -Ilibabi/inc -Ilibffabi/inc \
libebml/src/EbmlBinary.cpp libebml/src/EbmlContexts.cpp libebml/src/EbmlCrc32.cpp libebml/src/EbmlDate.cpp libebml/src/EbmlDummy.cpp libebml/src/EbmlElement.cpp libebml/src/EbmlFloat.cpp libebml/src/EbmlHead.cpp libebml/src/EbmlMaster.cpp libebml/src/EbmlSInteger.cpp libebml/src/EbmlString.cpp libebml/src/EbmlSubHead.cpp libebml/src/EbmlUInteger.cpp libebml/src/EbmlUnicodeString.cpp libebml/src/EbmlVersion.cpp libebml/src/EbmlVoid.cpp libebml/src/IOCallback.cpp libebml/src/MemIOCallback.cpp libmatroska/src/FileKax.cpp libmatroska/src/KaxAttached.cpp libmatroska/src/KaxAttachments.cpp libmatroska/src/KaxBlock.cpp libmatroska/src/KaxBlockData.cpp libmatroska/src/KaxChapters.cpp libmatroska/src/KaxCluster.cpp libmatroska/src/KaxClusterData.cpp libmatroska/src/KaxContentEncoding.cpp libmatroska/src/KaxContexts.cpp libmatroska/src/KaxCues.cpp libmatroska/src/KaxCuesData.cpp libmatroska/src/KaxInfo.cpp libmatroska/src/KaxInfoData.cpp libmatroska/src/KaxSeekHead.cpp libmatroska/src/KaxSegment.cpp libmatroska/src/KaxTag.cpp libmatroska/src/KaxTags.cpp libmatroska/src/KaxTrackAudio.cpp libmatroska/src/KaxTrackEntryData.cpp libmatroska/src/KaxTracks.cpp libmatroska/src/KaxTrackVideo.cpp libmatroska/src/KaxVersion.cpp libmakemkv/src/ebmlwrite.cpp libmakemkv/src/libmkv.cpp libmakemkv/src/version.cpp libmakemkv/src/world.cpp sstring/src/sstring.cpp \
libabi/src/ossl_aes.c libabi/src/ossl_sha.c libabi/src/ossl_ec.c libabi/src/zlib.c libabi/src/xpat.c libabi/pssl/ec_key.c libabi/pssl/ec_lib.c libabi/pssl/ec_cvt.c libabi/pssl/ec_mult.c libabi/pssl/ecp_mont.c libabi/pssl/ecp_smpl.c libabi/pssl/ecs_ossl.c libabi/pssl/ecs_sign.c libabi/pssl/ecs_vrf.c libabi/src/httplinux.cpp makemkvgui/src/api_linux.cpp libabi/src/sys_linux.c makemkvgui/src/spawn_posix.cpp libffabi/src/ffabi.c libffabi/src/mlp.c libffabi/src/log.c libffabi/src/audio_convert.c \
-DHAVE_BUILDINFO_H -Itmp \
-fPIC -Xlinker -dy -Xlinker --version-script=libmakemkv/src/libmakemkv.vers \
-Xlinker -soname=libmakemkv.so.1 -lc -lstdc++ -lcrypto -lz -lexpat -lavcodec -lavutil -lm
libffabi/src/ffabi.c: In function 'ffm_audio_decode_init':
libffabi/src/ffabi.c:146:9: warning: assignment makes pointer from integer without a cast [enabled by default]
ctx = av_mallocz(sizeof(FFM_AudioDecodeContext));
^
libffabi/src/ffabi.c: In function 'ffm_audio_encode_init':
libffabi/src/ffabi.c:300:9: warning: assignment makes pointer from integer without a cast [enabled by default]
ctx = av_mallocz(sizeof(FFM_AudioEncodeContext));
^
/tmp/ccBF6Gsl.o: In function `static_log_callback':
ffabi.c:(.text+0x6f): undefined reference to `av_log_format_line'
/tmp/ccBF6Gsl.o: In function `ffm_audio_decode_close':
ffabi.c:(.text+0x139): undefined reference to `av_frame_unref'
/tmp/ccBF6Gsl.o: In function `ffm_audio_decode_put_data':
ffabi.c:(.text+0x2e5): undefined reference to `av_frame_unref'
ffabi.c:(.text+0x313): undefined reference to `av_frame_get_channels'
ffabi.c:(.text+0x32f): undefined reference to `av_frame_get_sample_rate'
/tmp/ccBF6Gsl.o: In function `ffm_audio_encode_close':
ffabi.c:(.text+0x430): undefined reference to `av_frame_unref'
/tmp/ccBF6Gsl.o: In function `ffm_audio_encode_put_frame':
ffabi.c:(.text+0x630): undefined reference to `av_frame_unref'
ffabi.c:(.text+0x65a): undefined reference to `av_frame_set_channels'
ffabi.c:(.text+0x66f): undefined reference to `av_frame_set_channel_layout'
collect2: error: ld returned 1 exit status
make[2]: *** [out/libmakemkv.so.1.full] Error 1
make[2]: Leaving directory `/tmp/buildd/raw-makemkv-1.8.6/build/makemkv-oss-1.8.6'
make[1]: *** [override_dh_auto_build] Error 2
make[1]: Leaving directory `/tmp/buildd/raw-makemkv-1.8.6'
make: *** [build] Error 2
Here is the requested version.h:
/*
*
* This file is part of Libav.
*
* Libav is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* Libav is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with Libav; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* FF_API_* defines may be placed below to indicate public API that will be
* dropped at a future version bump. The defines themselves are not part of
* the public API and may change, break or disappear at any time.
*/
...after removing the two #ifdef stanzas from ffabi.c. It appears to be the same error as patgul above. I tried finding or locating libavcodec.h to no avail, so I can't find version.h to report what I have. The version reported by aptitude is libavcodec-dev amd64 10:1.2.4-dmo3.
PS. The original poster should edit the Subject of the thread so it includes the full original error, for me the last word is "refcoun" and searching for it fails.
Seeing this issue on gentoo. We don't have a single version of ffmpeg/libav libraries - if there is incompatibility with specific versions and a patch is required, we need to update our packages to detect and apply if makemkv source doesn't handle it.