1.8.9 compile error on Ubuntu 12.04.4

The place to discuss linux version of MakeMKV
Post Reply
ktbzimm
Posts: 1
Joined: Fri Mar 21, 2014 1:18 am

1.8.9 compile error on Ubuntu 12.04.4

Post by ktbzimm »

First off, I'm running Ubuntu 12.04.4, 64-bit. Running kernel is 3.2.0-60-generic.

I followed the optional instructions at http://www.makemkv.com/forum2/viewtopic.php?f=3&t=224 to build with the latest FFMpeg with libfdk-aac support. I had to use different flags to compile FFMpeg, because it complained about some of the provided flags being invalid (looks like some flags changed on the latest FFMpeg):
./configure --prefix=/tmp/ffmpeg --enable-pic --disable-yasm --enable-libfdk-aac

That seems to compile and install fine; no errors displayed at the end of the run.

The configure step in makemkv-oss-1.8.9 seems to go fine:
$ PKG_CONFIG_PATH=/tmp/ffmpeg/lib/pkgconfig ./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... 55
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 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

However, running 'make' eventually gives this error:
/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
/usr/local/lib/libfdk-aac.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [out/libmakemkv.so.1.full] Error 1

I added the flag to ffmpeg to compile with pic, so I'm not sure why it's asking to recompile with -fPIC.

Anyone know what I'm missing? Did I overlook something obvious? Should I be passing different flags to the configure scripts? Previously-installed ffmpeg via package manager conflicting? Perhaps a bug in builds of ffmpeg or makemkv?

Any thoughts are welcome.
Tmayhew
Posts: 1
Joined: Wed Mar 26, 2014 12:44 pm

Re: 1.8.9 compile error on Ubuntu 12.04.4

Post by Tmayhew »

I also get the same output for the ./configure
my make is close
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/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 -ldl -lXv -lXext -lvdpau -lX11 -ljack -lasound -lSDL -lz -lavutil -lm -lm
libffabi/src/ffabi.c: In function ‘ffm_audio_decode_init’:
libffabi/src/ffabi.c:177:5: warning: ‘avcodec_alloc_frame’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:3410) [-Wdeprecated-declarations]
ctx->frame = avcodec_alloc_frame();
^
libffabi/src/ffabi.c: In function ‘ffm_audio_decode_close’:
libffabi/src/ffabi.c:190:9: warning: ‘avcodec_free_frame’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:3435) [-Wdeprecated-declarations]
avcodec_free_frame(&ctx->frame);
^
libffabi/src/ffabi.c: In function ‘ffm_audio_encode_init’:
libffabi/src/ffabi.c:345:5: warning: ‘avcodec_alloc_frame’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:3410) [-Wdeprecated-declarations]
ctx->frame = avcodec_alloc_frame();
^
libffabi/src/ffabi.c: In function ‘ffm_audio_encode_close’:
libffabi/src/ffabi.c:360:9: warning: ‘avcodec_free_frame’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:3435) [-Wdeprecated-declarations]
avcodec_free_frame(&ctx->frame);
^
/usr/bin/ld: /usr/local/lib/libavcodec.a(allcodecs.o): relocation R_X86_64_32 against `ff_h263_vdpau_hwaccel' 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
spanier
Posts: 1
Joined: Tue Dec 03, 2013 9:34 am

Re: 1.8.9 compile error on Ubuntu 12.04.4

Post by spanier »

I have similar issue. Compling makemkv unter ubuntu 12.04 brings the followin error:

checking for ffmpeg... yes
checking whether LIBAVCODEC_VERSION_MAJOR is declared... yes
checking LIBAVCODEC_VERSION_MAJOR... failed
configure: error: in `/home/...../Downloads/makemkv/makemkv-oss-1.8.9':
configure: error: LIBAVCODEC_VERSION_MAJOR is not known at compile time in libavcodec.h
See `config.log' for more details

I have no libavcodec.h on my system. Compiling ffmep as described under 'MakeMKV 1.8.9 for Linux is available' has the same error.

Any help is welcome.

Regards

spanier
nermal
Posts: 1
Joined: Thu Apr 03, 2014 6:01 am

Re: 1.8.9 compile error on Ubuntu 12.04.4

Post by nermal »

I think that I got it on 12.04.4. I basically did the "Optional" instructions as stated in the forum post for Linux. I did have to do some things differently when dealing with libfdk-aac. Everything compiled and seems to be working. I have not actually tried to back up a BluRay yet.

Hopefully, someone can tell me if I did the right thing.

Notes:
  • I had to re-do the 'apt-get install'. Even though I had compiled earlier versions, this latest one still installed a couple of packages. Cannot remember which ones.
  • Tried to compile ffmpeg the first time and it failed. I had to go grab libfdk-aac.
  • Built ffmpeg with '--enable-libfdk-aac' in the configure line
  • When building makemkv-oss, be sure to copy and paste the first full line of 'PKG_CONFIG_PATH=/tmp/ffmpeg/lib/pkgconfig ./configure'. I thought that it was a line wrap error and basically set the PKG_CONFIG_PATH variable first. Then ran './configure'. It failed to find /tmp/ffmpeg.
  • Continue on with the install.
External URLs that helped me do this:

FFmpeg General Documentation Section 1.2.4
http://www.ffmpeg.org/general.html#Frau ... AC-library

Compiling FFmpeg on Ubuntu
https://gist.github.com/faleev/3435377#libfdk-aac
I had not installed checkinstall. I am assuming that it make some sort of package.

Good luck.
Post Reply