Compile errors with oss-1.9.10 Linux version

The place to discuss linux version of MakeMKV
Post Reply
sirrab
Posts: 8
Joined: Wed May 14, 2014 10:57 pm

Compile errors with oss-1.9.10 Linux version

Post by sirrab »

make
mkdir -p out
gcc -g -O2 -D_linux_ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -D_REENTRANT -shared -Wl,-z,defs -oout/libmakemkv.so.1.full -Ilibebml/inc -DEBML_NO_READ -DEBML_STRICT_API -DEBML_DEBUG -Ilibmatroska/inc \
-Ilibmakemkv/inc -Isstring/inc -Imakemkvgui/inc -Ilibabi/inc -Ilibffabi/inc -DDCA_LOG -DDCA_FFMALLOC \
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 \
libabi/src/ossl_aes.c libabi/src/ossl_sha.c libabi/src/ossl_ec.c libabi/src/zlib.c libabi/src/xpat.c libabi/src/libm.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 libffabi/src/audio_mix.c libffabi/src/audio_mix_matrix.c libffabi/src/dcadec/bitstream.cpp libffabi/src/dcadec/core_decoder.cpp libffabi/src/dcadec/dca_context.cpp libffabi/src/dcadec/dmix_tables.cpp libffabi/src/dcadec/exss_parser.cpp libffabi/src/dcadec/idct_fixed.cpp libffabi/src/dcadec/interpolator.cpp libffabi/src/dcadec/interpolator_fixed.cpp libffabi/src/dcadec/interpolator_float.cpp libffabi/src/dcadec/ta.cpp libffabi/src/dcadec/xll_decoder.cpp libffabi/src/dcadec/idct_float.cpp \
-DHAVE_BUILDINFO_H -Itmp -I/usr/local/include \
-fPIC -Xlinker -dy -Xlinker --version-script=libmakemkv/src/libmakemkv.vers \
-Xlinker -soname=libmakemkv.so.1 -lc -lstdc++ -lcrypto -lz -lexpat -pthread -L/usr/local/lib -lavcodec -lxcb-xfixes -lxcb-render -lxcb-shape -lxcb -lX11 -lz -lswresample -lavutil -lm -lm -lrt
libffabi/src/ffabi.c: In function ‘ffm_audio_encode_close’:
libffabi/src/ffabi.c:377:5: warning: ‘av_free_packet’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:4040) [-Wdeprecated-declarations]
av_free_packet(&ctx->pck);
^
libffabi/src/ffabi.c: In function ‘ffm_audio_encode_put_frame’:
libffabi/src/ffabi.c:398:5: warning: ‘av_free_packet’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:4040) [-Wdeprecated-declarations]
av_free_packet(&ctx->pck);
^
/usr/bin/ld: /usr/local/lib/libavcodec.a(allcodecs.o): relocation R_X86_64_32 against `ff_a64multi_encoder' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libavcodec.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** [out/libmakemkv.so.1.full] Error 1


I've had no issues in the past. Error on your side, or my system configuration?
sirrab
Posts: 8
Joined: Wed May 14, 2014 10:57 pm

Re: Compile errors with oss-1.9.10 Linux version

Post by sirrab »

This failed on Ubuntu 14.04.04, but not Ubuntu 15.10. Guessing the 14.04 version has issues....
chr.hove
Posts: 2
Joined: Wed May 18, 2016 1:51 pm

Re: Compile errors with oss-1.9.10 Linux version

Post by chr.hove »

I am experiencing the same (Ubuntu 14.04):

/usr/bin/ld: /tmp/ffmpeg/lib/libavcodec.a(mqc.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/tmp/ffmpeg/lib/libavcodec.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** [out/libmakemkv.so.1.full] Error 1
martin.hattedcat.com
Posts: 2
Joined: Sun Apr 17, 2016 5:54 pm

Re: Compile errors with oss-1.9.10 Linux version

Post by martin.hattedcat.com »

Maybe the binary part of 1.9.10 was compiled against newer libraries than what Ubuntu 14.04 has?
chr.hove
Posts: 2
Joined: Wed May 18, 2016 1:51 pm

Re: Compile errors with oss-1.9.10 Linux version

Post by chr.hove »

How do I "recompile with -fPIC"?
Pjotr
Posts: 1
Joined: Sat May 28, 2016 6:12 am

Re: Compile errors with oss-1.9.10 Linux version

Post by Pjotr »

Same issue here on Debian Jessie. 1.9.09 worked like a charme until outdated.

With 1.9.10 I have trouble:


/tmp/cchtdsGf.o: In function `ffm_audio_decode_put_data':
/home/pjotr/Downloads/makemkv/makemkv-oss-1.9.10/libffabi/src/ffabi.c:246: undefined reference to `av_frame_get_channels'
/home/pjotr/Downloads/makemkv/makemkv-oss-1.9.10/libffabi/src/ffabi.c:249: undefined reference to `av_frame_get_sample_rate'
/tmp/cchtdsGf.o: In function `ffm_audio_encode_put_frame':
/home/pjotr/Downloads/makemkv/makemkv-oss-1.9.10/libffabi/src/ffabi.c:410: undefined reference to `av_frame_set_channels'
/home/pjotr/Downloads/makemkv/makemkv-oss-1.9.10/libffabi/src/ffabi.c:413: undefined reference to `av_frame_set_channel_layout'
collect2: error: ld returned 1 exit status
Makefile:59: recipe for target 'out/libmakemkv.so.1.full' failed
make: *** [out/libmakemkv.so.1.full] Error 1
njsummers
Posts: 1
Joined: Sun Jun 19, 2016 8:08 am
Location: Greater Phoenix Area

Re: Compile errors with oss-1.9.10 Linux version

Post by njsummers »

On the following distro: Fedora 21 i686, I have encountered an error with the libavcodec version in the ffmpeg tarball. My source files are all marked as being current or development starting with ffmpeg source is the latest (3.0.2), fdk-aac being ver 0.1.4, openssl is version 1.0.2h, glibc is 2.23, and mesa is also the latest version (repository verified). I am providing the error description below:

Code: Select all

checking LIBAVCODEC_VERSION_MAJOR... failed
configure: error: in `/.../temp/makemkv/makemkv-oss-1.9.10':
configure: error: LIBAVCODEC_VERSION_MAJOR is not known at compile time in libavcodec.h
Any ideas on what I did wrong?
sirrab
Posts: 8
Joined: Wed May 14, 2014 10:57 pm

Re: Compile errors with oss-1.9.10 Linux version

Post by sirrab »

So i upgrade my Linux computer to Ubuntu 16.04 LTS, and I have, I think are the same errors!

make
mkdir -p out
gcc -g -O2 -D_linux_ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -D_REENTRANT -shared -Wl,-z,defs -oout/libdriveio.so.0.full -Ilibdriveio/inc libdriveio/src/infolist.cpp libdriveio/src/scsihlp.cpp libdriveio/src/srlist.cpp libdriveio/src/stdquery.cpp libdriveio/src/tipclient.cpp libdriveio/src/tipcommon.cpp libdriveio/src/tipserver.cpp libdriveio/src/drives/pioneer.cpp libdriveio/src/drives/xboxhddvd.cpp \
-fPIC -Xlinker -dy -Xlinker --version-script=libdriveio/src/libdriveio.vers \
-Xlinker -soname=libdriveio.so.0 -lc -lstdc++
objcopy --strip-all --strip-debug --strip-unneeded --discard-all out/libdriveio.so.0.full out/libdriveio.so.0
mkdir -p tmp
echo "#define BUILDINFO_ARCH_NAME \"x86_64-linux-gnu\"" >> tmp/gen_buildinfo.h
echo "#define BUILDINFO_BUILD_DATE \"Tue Jul 5 14:12:59 CDT 2016\"" >> tmp/gen_buildinfo.h
mkdir -p out
gcc -g -O2 -D_linux_ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -D_REENTRANT -shared -Wl,-z,defs -oout/libmakemkv.so.1.full -Ilibebml/inc -DEBML_NO_READ -DEBML_STRICT_API -DEBML_DEBUG -Ilibmatroska/inc \
-Ilibmakemkv/inc -Isstring/inc -Imakemkvgui/inc -Ilibabi/inc -Ilibffabi/inc -DDCA_LOG -DDCA_FFMALLOC \
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 \
libabi/src/ossl_aes.c libabi/src/ossl_sha.c libabi/src/ossl_ec.c libabi/src/zlib.c libabi/src/xpat.c libabi/src/libm.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 libffabi/src/audio_mix.c libffabi/src/audio_mix_matrix.c libffabi/src/dcadec/bitstream.cpp libffabi/src/dcadec/core_decoder.cpp libffabi/src/dcadec/dca_context.cpp libffabi/src/dcadec/dmix_tables.cpp libffabi/src/dcadec/exss_parser.cpp libffabi/src/dcadec/idct_fixed.cpp libffabi/src/dcadec/interpolator.cpp libffabi/src/dcadec/interpolator_fixed.cpp libffabi/src/dcadec/interpolator_float.cpp libffabi/src/dcadec/ta.cpp libffabi/src/dcadec/xll_decoder.cpp libffabi/src/dcadec/idct_float.cpp \
-DHAVE_BUILDINFO_H -Itmp -I/usr/local/include \
-fPIC -Xlinker -dy -Xlinker --version-script=libmakemkv/src/libmakemkv.vers \
-Xlinker -soname=libmakemkv.so.1 -lc -lstdc++ -lcrypto -lz -lexpat -L/usr/local/lib -lavcodec -lxcb -lxcb-xfixes -lxcb-render -lxcb-shape -lxcb -lxcb-shape -lxcb -lX11 -lm -lz -pthread -lswresample -lm -lavutil -lm -lm -lrt
libffabi/src/ffabi.c: In function ‘ffm_audio_encode_close’:
libffabi/src/ffabi.c:377:5: warning: ‘av_free_packet’ is deprecated [-Wdeprecated-declarations]
av_free_packet(&ctx->pck);
^
In file included from libffabi/src/ffabi.c:22:0:
/usr/local/include/libavcodec/avcodec.h:4040:6: note: declared here
void av_free_packet(AVPacket *pkt);
^
libffabi/src/ffabi.c: In function ‘ffm_audio_encode_put_frame’:
libffabi/src/ffabi.c:398:5: warning: ‘av_free_packet’ is deprecated [-Wdeprecated-declarations]
av_free_packet(&ctx->pck);
^
In file included from libffabi/src/ffabi.c:22:0:
/usr/local/include/libavcodec/avcodec.h:4040:6: note: declared here
void av_free_packet(AVPacket *pkt);
^
/usr/bin/ld: /usr/local/lib/libavcodec.a(allcodecs.o): relocation R_X86_64_32 against `ff_a64multi_encoder' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libavcodec.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:59: recipe for target 'out/libmakemkv.so.1.full' failed

I'm looking for suggestions on how to fix this. Reload a few libraries? Or a package? Delete a package and reload? Thanks!
botazefa
Posts: 6
Joined: Wed Apr 13, 2016 11:38 pm

Re: Compile errors with oss-1.9.10 Linux version

Post by botazefa »

I've seen this. Don't recall exactly, but two things stand out:

Move your existing /usr/local to /usr/local.orig. This will keep that ffmpeg ignored. make sure you remove any other ffmpeg, eg rpm -qa | grep ffmpeg...

Download ffmpeg snapshot to /tmp. Follow the linux compile instructions specific to ffmpeg and PKG_CONFIG.

Basically, makemkv is looking for newer ffmpeg (libavcodec) but finding whatever is in usr/local first
DWLaurie
Posts: 1
Joined: Sat Sep 17, 2016 10:27 pm

Re: Compile errors with oss-1.9.10 Linux version

Post by DWLaurie »

Here is what it was for me:

I had installed with the optional latest libavcodec, downloading the tarball from ffmpeg.org
I admittedly uninstalled it badly!
When I went back to the original directory that I installed it from and issued the command:

sudo make uninstall

it went in and completed the uninstall completely and correctly.
I was then able to install MakeMVK without getting the errors that you folks are experiencing.

FYI this was with the latest version of MakeMKV (1.10.2) and Ubuntu 16.04LTS
Post Reply