Unsuccessful compiling makemkv-oss-1.9.1

The place to discuss linux version of MakeMKV
Post Reply
Message
Author
Blu-Roc
Posts: 2
Joined: Sun Feb 08, 2015 10:44 pm

Unsuccessful compiling makemkv-oss-1.9.1

#1 Post by Blu-Roc » Sun Feb 08, 2015 10:53 pm

Hello all,

I keep getting some kind of "sharing" error when attempting to compile the oss part:

Code: Select all

~/Desktop/makemkv-oss-1.9.1 > ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for -objcopy... no
checking for objcopy... objcopy
checking for -ld... no
checking for ld... ld
checking for a BSD-compatible install... /usr/bin/install -c
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for compress2 in -lz... yes
checking openssl/opensslconf.h usability... yes
checking openssl/opensslconf.h presence... yes
checking for openssl/opensslconf.h... yes
checking for AES_encrypt in -lcrypto... yes
checking expat.h usability... yes
checking expat.h presence... yes
checking for expat.h... yes
checking for XML_ParserCreate in -lexpat... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for ffmpeg... yes
checking whether LIBAVCODEC_VERSION_MAJOR is declared... yes
checking LIBAVCODEC_VERSION_MAJOR... 56
checking for AVFrame.nb_samples... yes
checking whether AV_SAMPLE_FMT_U8P is declared... yes
checking for avcodec_encode_audio2... yes
checking for AVCodecContext.refcounted_frames... yes
checking whether avcodec_free_frame is declared... yes
checking whether av_frame_free is declared... yes
checking for av_log_format_line... yes
checking for enum AVCodecID... yes
checking whether AV_CODEC_ID_NONE is declared... yes
checking whether av_frame_get_channels is declared... yes
checking whether av_frame_get_sample_rate is declared... yes
checking whether av_frame_set_channel_layout is declared... yes
checking for AVCodecParserContext.duration... yes
checking whether AV_CH_TOP_BACK_CENTER is declared... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libffabi/src/ffabicfg.h
config.status: libffabi/src/ffabicfg.h is unchanged

~/Desktop/makemkv-oss-1.9.1 > make
mkdir -p out
gcc -g -O2 -D_GNU_SOURCE -D_linux_ -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 \
        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 \
        -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
/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
When I attempt to use a command like "./configure --enable-shared" I get something from the terminal saying it does not recognize the "shared" command. Same thing when I try "static". Any advise is much appreciated.

Woodstock
Posts: 10332
Joined: Sun Jul 24, 2011 11:21 pm

Re: Unsuccessful compiling makemkv-oss-1.9.1

#2 Post by Woodstock » Mon Feb 09, 2015 12:27 am

If you're referring to this line:

Code: Select all

/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
It's not "sharing", it's a "shared object", meaning something that can be used by more than one program at a time.

I'm not an expert in compiling things in modern Linux, but it would seem that the ffmpeg library on your machine was not compiled with the -fPIC flag, so it can't be linked into MakeMKV as-is. I do remember Mike posting a messages earlier about the release version of ffmpeg was missing something MakeMKV needs, so that you needed to build from the latest source code.

Blu-Roc
Posts: 2
Joined: Sun Feb 08, 2015 10:44 pm

Re: Unsuccessful compiling makemkv-oss-1.9.1

#3 Post by Blu-Roc » Thu Feb 12, 2015 2:57 am

Well, after reading your post, Woodstock, I decided I may as well look back at the instructions I followed here to install ffmpeg; and when I did I realized I had missed a step in the ffmpeg install that I assumed was the same whether or not I did that optional install. The step I missed was this one:

When in makemkv-oss:

Code: Select all

PKG_CONFIG_PATH=/tmp/ffmpeg/lib/pkgconfig ./configure
Before, I was just doing the "./configure". Now that I have actually read the code instead of just copying and pasting I can see how I can run into some issues not following the instructions to the tooth. Lesson learned (the hard way; apparently that is my preferred method of learning). I have now finished successfully compiling and installing MakeMKV. Thanks for your help, Woodstock!

dodgy_pete
Posts: 3
Joined: Tue Mar 25, 2014 9:10 pm

Re: Unsuccessful compiling makemkv-oss-1.9.1

#4 Post by dodgy_pete » Fri Feb 13, 2015 7:44 pm

Just to add my "me too"

I have successfully build the last few versions on MakeMKV for linux on my Ubuntu Server.
With both Ubuntu 12 LTS (x64) and 14 LTS (x64)

I just tried to build 1.9.1 oss and got the same -fPIC error.

I also tried by downloading and building against the latest ffmpeg (v2.5.4) following the instructions on the forum
ffmpeg's configure

Code: Select all

./configure --prefix=/tmp/ffmpeg --enable-static --disable-shared --enable-pic --disable-yasm --enable-libfdk-aac
and then the oss code

Code: Select all

PKG_CONFIG_PATH=/tmp/ffmpeg/lib/pkgconfig ./configure
make
with the following result

Code: Select all

/usr/bin/ld: /usr/local/lib/libfdk-aac.a(aacdecoder_lib.o): relocation R_X86_64_32S against `channelMappingTableWAV' can not be used when making a shared object; recompile with -fPIC

libfdk-aac.a: error adding symbols: Bad value
With my only change being to permanently install ffmpeg to /usr/local instead of /tmp

dodgy_pete
Posts: 3
Joined: Tue Mar 25, 2014 9:10 pm

Re: Unsuccessful compiling makemkv-oss-1.9.1

#5 Post by dodgy_pete » Fri Feb 13, 2015 8:31 pm

I Wrote...

Code: Select all

/usr/bin/ld: /usr/local/lib/libfdk-aac.a(aacdecoder_lib.o): relocation R_X86_64_32S against `channelMappingTableWAV' can not be used when making a shared object; recompile with -fPIC

libfdk-aac.a: error adding symbols: Bad value
That was my error! I found an older fdk-aac library causing the error
When I compiled/config'd the new ffmpeg w/o the --enable-libfdk-aac flag, it built fine.

Post Reply