Linux version won't compile on Fedora

The place to discuss linux version of MakeMKV
Post Reply
jvian1
Posts: 16
Joined: Thu May 19, 2016 1:09 am

Linux version won't compile on Fedora

Post by jvian1 » Tue Jul 25, 2023 3:08 pm

I have had very good success with MakeMKV over the past few years using it on Fedora exclusively.

Just recently I upgraded to Fedora 38 then attempted to upgrade MakeMKV to the latest version. To my surprise it fails to compile the makemkv-oss part even after I worked through a few issues with 'configure'. I only did the upgrade because after the upgrade to Fedora 38 the earlier version I had installed also stopped working and would not recompile either.

This is the ending of the 'make' process which shows an undefined function in a header file.

Code: Select all

$ make
mkdir -p out
g++ -g -O2 -g -O2 -D_linux_   -D_GNU_SOURCE -D_REENTRANT -shared -Wl,-z,defs -oout/libmakemkv.so.1.full -I./libebml/inc -DEBML_NO_READ -DEBML_STRICT_API -DEBML_DEBUG \
-I./libmatroska/inc -I./libmakemkv/inc -I./sstring/inc -I./makemkvgui/inc -I./libabi/inc \
-I./libffabi/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/KaxCluster.cpp libmatroska/src/KaxContexts.cpp libmatroska/src/KaxCues.cpp libmatroska/src/KaxCuesData.cpp libmatroska/src/KaxInfoData.cpp libmatroska/src/KaxSeekHead.cpp libmatroska/src/KaxSegment.cpp libmatroska/src/KaxTracks.cpp libmatroska/src/KaxVersion.cpp libmatroska/src/KaxSemantic.cpp libmakemkv/src/ebmlwrite.cpp libmakemkv/src/libmkv.cpp libmakemkv/src/version.cpp libmakemkv/src/world.cpp libmakemkv/src/stdstring.cpp sstring/src/sstring.cpp makemkvgui/src/api_linux.cpp libabi/src/sys_linux.cpp makemkvgui/src/spawn_posix.cpp \
tmp/libabi/src/ossl_aes.c.o tmp/libabi/src/ossl_sha.c.o tmp/libabi/src/ossl_ec.c.o tmp/libabi/src/zlib.c.o tmp/libabi/src/xpat.c.o tmp/libabi/src/libm.c.o tmp/libffabi/src/ffabi.c.o tmp/libffabi/src/mlp.c.o tmp/libffabi/src/log.c.o tmp/libffabi/src/audio_convert.c.o tmp/libffabi/src/audio_mix.c.o tmp/libffabi/src/audio_mix_matrix.c.o \
-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  -lrt -lm -lrt
/usr/bin/ld: tmp/libffabi/src/ffabi.c.o: in function `ffm_audio_encode_init':
/home/USER/Downloads/rpms/makemkv/makemkv-oss-1.17.4/libffabi/src/ffabi.c:481: undefined reference to `av_mallocz_array'
collect2: error: ld returned 1 exit status
make: *** [Makefile:89: out/libmakemkv.so.1.full] Error 1
It would appear that within the ffabi.c code there appears a reference to 'av_mallocz_array()'

Code: Select all

        ctx->frame_extended_data = av_mallocz_array(ctx->avctx->channels,
            sizeof(*ctx->frame_extended_data));
but the following does not show that function as defined.

Code: Select all

$ grep -R mallocz /usr/include/*
ffmpeg/libavutil/mem.h: * @see av_mallocz()
ffmpeg/libavutil/mem.h:void *av_mallocz(size_t size) av_malloc_attrib av_alloc_size(1);
ffmpeg/libavutil/mem.h: * Allocate a memory block for an array with av_mallocz().
ffmpeg/libavutil/mem.h: * @see av_mallocz()
ffmpeg/libavutil/mem.h: * @see av_fast_mallocz()
ffmpeg/libavutil/mem.h:void av_fast_mallocz(void *ptr, unsigned int *size, size_t min_size);
ffmpeg/libavutil/opt.h: *     test_struct *ret = av_mallocz(sizeof(*ret));
ffmpeg/libavutil/tree.h: *                     *next = av_mallocz(av_tree_node_size);
ffmpeg/libavcodec/avcodec.h:     * Private data is allocated with av_mallocz() before
ffmpeg/libavcodec/avcodec.h:void av_fast_padded_mallocz(void *ptr, unsigned int *size, size_t min_size);
I have ffmpeg-devel version 6.0 and libavcodec-freeworld version 6.0 installed.

Can someone provide an acceptable patch to the appropriate header file so this error does not occur?

Note that I can and have installed the flatpac version of MakeMKV v1.17.4 [linux(x64 release)] from flathub and that seems to work but I much prefer to use the version I have personally compiled as has been done for every earlier version I have used.

Bloggins
Posts: 2
Joined: Mon Aug 07, 2023 2:20 pm

Re: Linux version won't compile on Fedora

Post by Bloggins » Mon Aug 07, 2023 2:27 pm

I've got the same issue Fedora 38, makemkv-oss-1.17.4/libffabi/src/ffabi.c:481: undefined reference to `av_mallocz_array'
any thoughts?

Bloggins
Posts: 2
Joined: Mon Aug 07, 2023 2:20 pm

Re: Linux version won't compile on Fedora

Post by Bloggins » Mon Aug 07, 2023 2:40 pm


Post Reply