You are not logged in.

#1 2018-02-08 02:20:46

Winneon
Member
Registered: 2018-02-08
Posts: 10

Is it possible to have both ffmpeg and ffmpeg-git installed?

Hello,

I'm in a bit of a predicament. I would like to use the latest ffmpeg features from ffmpeg-git (especially because the latest version of mpv requires them), but some programs depend on older ffmpeg libraries like electron and aegisub. As a result, when I have ffmpeg-git installed, I get linking errors from aegisub and electron, amongst the programs that have this issue. The linking errors say something along the lines of:

error while loading shared libraries: libavformat.so.57: cannot open shared object file: No such file or directory

It says that because the libavformat version that is currently installed is actually 58, not 57, because of ffmpeg-git. Is it possible to have my cake and eat it too, here?

Offline

#2 2018-02-08 03:47:46

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Is it possible to have both ffmpeg and ffmpeg-git installed?

rebuild the packages that depend on libavformat.so.57


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2018-02-08 03:49:47

Winneon
Member
Registered: 2018-02-08
Posts: 10

Re: Is it possible to have both ffmpeg and ffmpeg-git installed?

It's not a simple as that, as aegisub and electron both depend on specific versions of the ffmpeg libraries. Other programs will have the same issues. Symlinking would not work properly and would cause issues because they are different versions from what the program expects.

Offline

#4 2018-02-08 03:51:42

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Is it possible to have both ffmpeg and ffmpeg-git installed?

I didn't suggest symlinking libraries; that is always a bad idea.  Rebuild the packages that depend on the libs.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2018-02-08 04:07:00

Winneon
Member
Registered: 2018-02-08
Posts: 10

Re: Is it possible to have both ffmpeg and ffmpeg-git installed?

I'm not quite sure what you mean but I'll try. I rebuilt the aegisub package as an example in both the Arch Build System, and the git version using the aegisub-git AUR package. Both returned the same result:

/usr/bin/ld: warning: libavformat.so.57, needed by /usr/lib64/libffms2.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libavcodec.so.57, needed by /usr/lib64/libffms2.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libswscale.so.4, needed by /usr/lib64/libffms2.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libavutil.so.55, needed by /usr/lib64/libffms2.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libavresample.so.3, needed by /usr/lib64/libffms2.so, not found (try using -rpath or -rpath-link)
/usr/lib64/libffms2.so: undefined reference to `avio_open2@LIBAVFORMAT_57'
/usr/lib64/libffms2.so: undefined reference to `avcodec_flush_buffers@LIBAVCODEC_57'
/usr/lib64/libffms2.so: undefined reference to `av_reduce@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `avcodec_is_open@LIBAVCODEC_57'
/usr/lib64/libffms2.so: undefined reference to `av_parser_close@LIBAVCODEC_57'
/usr/lib64/libffms2.so: undefined reference to `avcodec_parameters_to_context@LIBAVCODEC_57'
/usr/lib64/libffms2.so: undefined reference to `av_rescale@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `avcodec_decode_video2@LIBAVCODEC_57'
/usr/lib64/libffms2.so: undefined reference to `av_log_set_level@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `avresample_open@LIBAVRESAMPLE_3'
/usr/lib64/libffms2.so: undefined reference to `avio_flush@LIBAVFORMAT_57'
/usr/lib64/libffms2.so: undefined reference to `avformat_version@LIBAVFORMAT_57'
/usr/lib64/libffms2.so: undefined reference to `avresample_convert@LIBAVRESAMPLE_3'
/usr/lib64/libffms2.so: undefined reference to `av_parser_init@LIBAVCODEC_57'
/usr/lib64/libffms2.so: undefined reference to `swscale_version@LIBSWSCALE_4'
/usr/lib64/libffms2.so: undefined reference to `avformat_network_init@LIBAVFORMAT_57'
/usr/lib64/libffms2.so: undefined reference to `avcodec_decode_audio4@LIBAVCODEC_57'
/usr/lib64/libffms2.so: undefined reference to `sws_setColorspaceDetails@LIBSWSCALE_4'
/usr/lib64/libffms2.so: undefined reference to `avcodec_close@LIBAVCODEC_57'
/usr/lib64/libffms2.so: undefined reference to `avformat_find_stream_info@LIBAVFORMAT_57'
/usr/lib64/libffms2.so: undefined reference to `sws_getCoefficients@LIBSWSCALE_4'
/usr/lib64/libffms2.so: undefined reference to `avio_read@LIBAVFORMAT_57'
/usr/lib64/libffms2.so: undefined reference to `avformat_open_input@LIBAVFORMAT_57'
/usr/lib64/libffms2.so: undefined reference to `avcodec_version@LIBAVCODEC_57'
/usr/lib64/libffms2.so: undefined reference to `avutil_version@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `av_register_all@LIBAVFORMAT_57'
/usr/lib64/libffms2.so: undefined reference to `av_packet_unref@LIBAVCODEC_57'
/usr/lib64/libffms2.so: undefined reference to `avio_seek@LIBAVFORMAT_57'
/usr/lib64/libffms2.so: undefined reference to `av_get_default_channel_layout@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `av_frame_free@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `av_frame_unref@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `sws_init_context@LIBSWSCALE_4'
/usr/lib64/libffms2.so: undefined reference to `av_read_frame@LIBAVFORMAT_57'
/usr/lib64/libffms2.so: undefined reference to `av_get_picture_type_char@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `av_sha_init@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `av_frame_alloc@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `av_get_pix_fmt@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `av_get_bytes_per_sample@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `av_opt_set_int@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `av_get_pix_fmt_name@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `av_seek_frame@LIBAVFORMAT_57'
/usr/lib64/libffms2.so: undefined reference to `av_get_packed_sample_fmt@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `avcodec_open2@LIBAVCODEC_57'
/usr/lib64/libffms2.so: undefined reference to `av_malloc@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `avio_close@LIBAVFORMAT_57'
/usr/lib64/libffms2.so: undefined reference to `av_register_codec_parser@LIBAVCODEC_57'
/usr/lib64/libffms2.so: undefined reference to `av_parser_parse2@LIBAVCODEC_57'
/usr/lib64/libffms2.so: undefined reference to `av_init_packet@LIBAVCODEC_57'
/usr/lib64/libffms2.so: undefined reference to `av_log_get_level@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `av_opt_get_int@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `av_opt_set_double@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `avformat_close_input@LIBAVFORMAT_57'
/usr/lib64/libffms2.so: undefined reference to `av_opt_get_double@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `av_image_alloc@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `avio_write@LIBAVFORMAT_57'
/usr/lib64/libffms2.so: undefined reference to `av_sha_final@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `av_sha_alloc@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `avio_size@LIBAVFORMAT_57'
/usr/lib64/libffms2.so: undefined reference to `avresample_alloc_context@LIBAVRESAMPLE_3'
/usr/lib64/libffms2.so: undefined reference to `av_sha_update@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `avresample_free@LIBAVRESAMPLE_3'
/usr/lib64/libffms2.so: undefined reference to `av_get_channel_layout_nb_channels@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `av_freep@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `sws_alloc_context@LIBSWSCALE_4'
/usr/lib64/libffms2.so: undefined reference to `avcodec_find_decoder@LIBAVCODEC_57'
/usr/lib64/libffms2.so: undefined reference to `av_sample_fmt_is_planar@LIBAVUTIL_55'
/usr/lib64/libffms2.so: undefined reference to `avcodec_alloc_context3@LIBAVCODEC_57'
/usr/lib64/libffms2.so: undefined reference to `sws_scale@LIBSWSCALE_4'
/usr/lib64/libffms2.so: undefined reference to `sws_freeContext@LIBSWSCALE_4'
/usr/lib64/libffms2.so: undefined reference to `avcodec_free_context@LIBAVCODEC_57'
/usr/lib64/libffms2.so: undefined reference to `av_pix_fmt_desc_get@LIBAVUTIL_55'
collect2: error: ld returned 1 exit status

This happens because aegisub expects older versions of the ffmpeg libraries, and the newer versions that I currently have installed are radically different from the previous ones. That's why I was asking if there was a way to have both ffmpeg and ffmpeg-git installed at the same time, considering ffmpeg-git conflicts with ffmpeg.

Offline

#6 2018-02-08 04:13:14

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Is it possible to have both ffmpeg and ffmpeg-git installed?

Those error messages are completely out of context, so it's hard to say much.  But what is clear from those out-of-contex messages is that the problem is not with aegisub, but rather with ffms2: that is what needs to be rebuilt as that is what depends on the ffmpeg libraries.

EDIT: aegisub doesn't even list ffmpeg as a dependency.  So why do you think rebuilding aegisub would help?  My advice has been, and continues to be rebuild the packages that depend on libavformat.so.57.

Last edited by Trilby (2018-02-08 04:15:26)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2018-02-08 04:30:13

Winneon
Member
Registered: 2018-02-08
Posts: 10

Re: Is it possible to have both ffmpeg and ffmpeg-git installed?

I apologize if I was acting offensive in any way, that was not my intention. I didn't fully understand what you were trying to say. I also didn't think to rebuild the dependencies of aegisub instead of aegisub itself because I assumed that it was aegisub that was depending on libavformat.so.57. After rebuilding ffms2 using the Arch Build System, aegisub builds properly as you suggested.

Offline

#8 2018-02-08 09:29:52

seth
Member
Registered: 2012-09-03
Posts: 51,046

Re: Is it possible to have both ffmpeg and ffmpeg-git installed?

You can install as many versions as you want, but that doesn't control their resolution.
Let's say you generally want to use ffmpeg-git and need fmpeg only for (jesus christ who uses that electron bloat deliberately, anyway ...) specific applications. You'll have to ensure that the library symlinks resolve the main (git) version (because that's what applications will usually link to) and LD_PRELOAD the specific libavformat.so.x.y library for the (i still don't get past the idea of using electron, but oh well)

Another approach would be to install the spcific versions into a 3rd location and use LD_LIBRARY_PATH to tell the linker to prefer them over the ones in /usr/lib

That said: I could imagine that if ffmpeg-git is binary incompatible w/ ffmpeg, you'll have to locally build each and every client that depends on ffmpeg (since the stock package was built against the stock ffmpeg version while you're now using the git one)? Is that actually true?
Why would (electron is like, really crap - did I mention that?) require a specific ffmpeg version?

Offline

#9 2018-02-08 11:48:05

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Is it possible to have both ffmpeg and ffmpeg-git installed?

Winneon wrote:

I apologize if I was acting offensive in any way, that was not my intention.

There was certainly nothing offensive.  Confusing and not so productive maybe, but hey it's your thread, if you want it to take a while to get to a solution, that's up to you tongue

It's ok to not understand a proposed solution.  If you find yourself in that situation in the future, just ask (after making a reasonable effort to figure it out on your own).  Rebuilding the wrong package is a reasonable mistake - though you can use pacman to get information about packages that would help avoid such a mistake.  What really baffled me is when I suggested rebuilding a package, and your first response wasn't about rebuilding the wrong package, but rather a (proper) rejection of the idea of symlinkin libraries (where did that come from).


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#10 2018-02-08 22:05:04

Winneon
Member
Registered: 2018-02-08
Posts: 10

Re: Is it possible to have both ffmpeg and ffmpeg-git installed?

I'm going to ask a different question then that will solve this problem. I've decided to go down a slightly altered route: install ffmpeg from the official repos to /usr so everything that depends on it (and its older 3.4.1 version, which is everything right now on the official repos) will not throw linking errors. Instead, I'd like to install ffmpeg-git (either the AUR package or from scratch) into a separate folder, perhaps /opt or something similar, so anything that depends on ffmpeg's newer library versions (libavformat, libavcodec, etc), I can point them to the newer alternate ffmpeg install. How would I go about doing that?

Last edited by Winneon (2018-02-08 22:05:47)

Offline

#11 2018-02-08 22:24:54

seth
Member
Registered: 2012-09-03
Posts: 51,046

Re: Is it possible to have both ffmpeg and ffmpeg-git installed?

No idea, but maybe try editing the prefix switch in the PKGBUILD?

Offline

#12 2018-02-08 23:01:58

loqs
Member
Registered: 2014-03-06
Posts: 17,323

Re: Is it possible to have both ffmpeg and ffmpeg-git installed?

https://git.archlinux.org/svntogit/pack … bef896#n38 ffmpeg2.8 moves the includes and libs and renames the binaries
https://git.archlinux.org/svntogit/pack … 65f0de#n82 vlc using pkg-config pointing to ffmpeg2.8

Offline

#13 2018-02-09 05:56:46

Winneon
Member
Registered: 2018-02-08
Posts: 10

Re: Is it possible to have both ffmpeg and ffmpeg-git installed?

That was actually incredibly helpful, Ioqs! I was able to create a ffmpeg-full3.4 AUR package that provides full ffmpeg version 3.4.1 binaries and version 57 of the libav* libraries. Aegisub properly compiles now, as it did with the official ffmpeg package on the arch repos. However, there seems to be some packages that I'm trying to compile now that aren't going through: electron, and makemkv. Both compile properly if I use the ffmpeg package in the official repositories or the ffmpeg-full AUR package, which both provide ffmpeg version 3.4.1 and its subsequent libraries. However with my ffmpeg-full3.4 AUR package, they don't recognize the older library versions and try to compile with the newer ones, and as a result, they fail. Is there something I'm doing wrong here?

Here are some logs if that will help.

electron:

FAILED: obj/media/media/ffmpeg_video_decoder.o 
../../../../../../../../../../../../usr/bin/clang++ -MMD -MF obj/media/media/ffmpeg_video_decoder.o.d -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DDISABLE_NACL -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DCR_CLANG_REVISION=\"296320-1\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DUSE_PULSEAUDIO -DMEDIA_IMPLEMENTATION -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DSK_IGNORE_DW_GRAY_FIX -DSK_IGNORE_DIRECTWRITE_GASP_FIX -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_SUPPORT_GPU=1 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -I../../media -I../.. -Igen -I../../third_party/libwebm/source -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -Igen/shim_headers/libevent_shim -Igen/shim_headers/zlib_shim -I../../third_party/khronos -I../../gpu -Igen/shim_headers/re2_shim -Igen/shim_headers/libpng_shim -Igen/shim_headers/libjpeg_shim -Igen/shim_headers/harfbuzz_shim -Igen/shim_headers/ffmpeg_shim -I../../skia/config -I../../skia/ext -I../../third_party/skia/include/c -I../../third_party/skia/include/config -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/images -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pdf -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/include/gpu -I../../third_party/skia/src/gpu -I../../third_party/skia/src/sksl -I../../third_party/ced/src -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/boringssl/src/include -I/usr/include/nss -I/usr/include/nspr -I../../third_party/libyuv/include -I../../third_party/mesa/src/include -I../../third_party/opus/src/include -I../../third_party/libvpx/source/libvpx -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -fcolor-diagnostics -m64 -march=x86-64 -pthread -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-block-capture-autoreleasing -Wno-unused-lambda-capture -Wno-user-defined-warnings -O2 -fno-ident -fdata-sections -ffunction-sections -g0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wno-header-guard -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -c ../../media/filters/ffmpeg_video_decoder.cc -o obj/media/media/ffmpeg_video_decoder.o
../../media/filters/ffmpeg_video_decoder.cc:355:16: warning: 'avcodec_decode_video2' is deprecated [-Wdeprecated-declarations]
  int result = avcodec_decode_video2(codec_context_.get(),
               ^
/usr/include/libavcodec/avcodec.h:4684:1: note: 'avcodec_decode_video2' has been explicitly marked deprecated here
attribute_deprecated
^
/usr/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
../../media/filters/ffmpeg_video_decoder.cc:420:28: error: use of undeclared identifier 'CODEC_FLAG_EMU_EDGE'
  codec_context_->flags |= CODEC_FLAG_EMU_EDGE;
                           ^
../../media/filters/ffmpeg_video_decoder.cc:422:19: warning: 'refcounted_frames' is deprecated [-Wdeprecated-declarations]
  codec_context_->refcounted_frames = 1;
                  ^
/usr/include/libavcodec/avcodec.h:2327:5: note: 'refcounted_frames' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
../../media/filters/ffmpeg_video_decoder.cc:425:31: error: use of undeclared identifier 'CODEC_FLAG2_CHUNKS'
    codec_context_->flags2 |= CODEC_FLAG2_CHUNKS;
                              ^
2 warnings and 2 errors generated.
[10310/19177] CXX obj/media/media/ffmpeg_demuxer.o
../../media/filters/ffmpeg_demuxer.cc:387:3: warning: 'av_packet_split_side_data' is deprecated [-Wdeprecated-declarations]
  av_packet_split_side_data(packet.get());
  ^
/usr/include/libavcodec/avcodec.h:4412:1: note: 'av_packet_split_side_data' has been explicitly marked deprecated here
attribute_deprecated
^
/usr/include/libavutil/attributes.h:94:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
1 warning generated.
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "/home/winneon/electron/repos/community-x86_64/src/electron/vendor/libchromiumcontent/script/build", line 61, in <module>
    sys.exit(main())
  File "/home/winneon/electron/repos/community-x86_64/src/electron/vendor/libchromiumcontent/script/build", line 45, in main
    subprocess.check_call([NINJA, '-C', os.path.relpath(out_dir), target], env=env)
  File "/usr/lib/python2.7/subprocess.py", line 186, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja', '-C', 'src/out-x64/static_library', 'chromiumcontent:chromiumcontent']' returned non-zero exit status 1
None
Traceback (most recent call last):
  File "/home/winneon/electron/repos/community-x86_64/src/electron/script/build-libchromiumcontent.py", line 51, in <module>
    sys.exit(main())
  File "/home/winneon/electron/repos/community-x86_64/src/electron/script/build-libchromiumcontent.py", line 34, in main
    execute_stdout([sys.executable, build, '-R', '-t', args.target_arch])
  File "/home/winneon/electron/repos/community-x86_64/src/electron/script/lib/util.py", line 184, in execute_stdout
    raise e
subprocess.CalledProcessError: Command '['/home/winneon/electron/repos/community-x86_64/src/python2-path/python', '/home/winneon/electron/repos/community-x86_64/src/electron/vendor/libchromiumcontent/script/build', '-R', '-t', 'x64']' returned non-zero exit status 1
None
Traceback (most recent call last):
  File "script/bootstrap.py", line 246, in <module>
    sys.exit(main())
  File "script/bootstrap.py", line 42, in main
    build_libchromiumcontent(args.verbose, args.target_arch, defines)
  File "script/bootstrap.py", line 169, in build_libchromiumcontent
    execute_stdout(args + ['--target_arch', target_arch])
  File "/home/winneon/electron/repos/community-x86_64/src/electron/script/lib/util.py", line 184, in execute_stdout
    raise e
subprocess.CalledProcessError: Command '['/home/winneon/electron/repos/community-x86_64/src/python2-path/python', '/home/winneon/electron/repos/community-x86_64/src/electron/script/build-libchromiumcontent.py', '-v', '--defines', ' make_clang_dir=/usr clang_use_chrome_plugins=0', '--target_arch', 'x64']' returned non-zero exit status 1

makemkv:

gcc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_linux_ -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now  -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 -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  \
-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
libabi/src/sys_linux.c: In function ‘SYS_readdir’:
libabi/src/sys_linux.c:80:5: warning: ‘readdir64_r’ is deprecated [-Wdeprecated-declarations]
     err = readdir64_r(dirp,&data.ent,&pent);
     ^~~
In file included from libabi/src/sys_linux.c:25:0:
/usr/include/dirent.h:201:12: note: declared here
 extern int readdir64_r (DIR *__restrict __dirp,
            ^~~~~~~~~~~
libffabi/src/ffabi.c: In function ‘ffm_init’:
libffabi/src/ffabi.c:87:5: warning: ‘avcodec_register_all’ is deprecated [-Wdeprecated-declarations]
     avcodec_register_all();
     ^~~~~~~~~~~~~~~~~~~~
In file included from libffabi/src/ffabi.c:22:0:
/usr/include/libavcodec/avcodec.h:4043:6: note: declared here
 void avcodec_register_all(void);
      ^~~~~~~~~~~~~~~~~~~~
libffabi/src/ffabi.c: In function ‘ffm_audio_decode_init’:
libffabi/src/ffabi.c:175:5: warning: ‘refcounted_frames’ is deprecated [-Wdeprecated-declarations]
     ctx->avctx->refcounted_frames = 1;
     ^~~
In file included from libffabi/src/ffabi.c:22:0:
/usr/include/libavcodec/avcodec.h:2328:9: note: declared here
     int refcounted_frames;
         ^~~~~~~~~~~~~~~~~
libffabi/src/ffabi.c: In function ‘ffm_audio_decode_put_data’:
libffabi/src/ffabi.c:242:5: warning: ‘avcodec_decode_audio4’ is deprecated [-Wdeprecated-declarations]
     r = avcodec_decode_audio4(ctx->avctx,ctx->frame,&ctx->have_frame,&avpkt);
     ^
In file included from libffabi/src/ffabi.c:22:0:
/usr/include/libavcodec/avcodec.h:4636:5: note: declared here
 int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
     ^~~~~~~~~~~~~~~~~~~~~
libffabi/src/ffabi.c:246:9: warning: ‘av_frame_get_channels’ is deprecated [-Wdeprecated-declarations]
         if (av_frame_get_channels(ctx->frame) != ctx->avctx->channels) { cold(); return -1; }
         ^~
In file included from /usr/include/libavcodec/avcodec.h:38:0,
                 from libffabi/src/ffabi.c:22:
/usr/include/libavutil/frame.h:603:9: note: declared here
 int     av_frame_get_channels             (const AVFrame *frame);
         ^~~~~~~~~~~~~~~~~~~~~
libffabi/src/ffabi.c:249:9: warning: ‘av_frame_get_sample_rate’ is deprecated [-Wdeprecated-declarations]
         if (av_frame_get_sample_rate(ctx->frame) != ctx->avctx->sample_rate) { cold(); return -1; }
         ^~
In file included from /usr/include/libavcodec/avcodec.h:38:0,
                 from libffabi/src/ffabi.c:22:
/usr/include/libavutil/frame.h:607:9: note: declared here
 int     av_frame_get_sample_rate          (const AVFrame *frame);
         ^~~~~~~~~~~~~~~~~~~~~~~~
libffabi/src/ffabi.c: In function ‘ffm_audio_encode_init’:
libffabi/src/ffabi.c:333:5: warning: ‘refcounted_frames’ is deprecated [-Wdeprecated-declarations]
     ctx->avctx->refcounted_frames = 1;
     ^~~
In file included from libffabi/src/ffabi.c:22:0:
/usr/include/libavcodec/avcodec.h:2328:9: note: declared here
     int refcounted_frames;
         ^~~~~~~~~~~~~~~~~
libffabi/src/ffabi.c:348:30: error: ‘CODEC_FLAG_GLOBAL_HEADER’ undeclared (first use in this function); did you mean ‘AV_CODEC_FLAG_GLOBAL_HEADER’?
         ctx->avctx->flags |= CODEC_FLAG_GLOBAL_HEADER;
                              ^~~~~~~~~~~~~~~~~~~~~~~~
                              AV_CODEC_FLAG_GLOBAL_HEADER
libffabi/src/ffabi.c:348:30: note: each undeclared identifier is reported only once for each function it appears in
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/include/libavcodec/avcodec.h:4357: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/include/libavcodec/avcodec.h:4357:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^~~~~~~~~~~~~~
libffabi/src/ffabi.c:410:9: warning: ‘av_frame_set_channels’ is deprecated [-Wdeprecated-declarations]
         av_frame_set_channels(frame,ctx->avctx->channels);
         ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/libavcodec/avcodec.h:38:0,
                 from libffabi/src/ffabi.c:22:
/usr/include/libavutil/frame.h:605:9: note: declared here
 void    av_frame_set_channels             (AVFrame *frame, int     val);
         ^~~~~~~~~~~~~~~~~~~~~
libffabi/src/ffabi.c:413:9: warning: ‘av_frame_set_channel_layout’ is deprecated [-Wdeprecated-declarations]
         av_frame_set_channel_layout(frame,ctx->avctx->channel_layout);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/libavcodec/avcodec.h:38:0,
                 from libffabi/src/ffabi.c:22:
/usr/include/libavutil/frame.h:601:9: note: declared here
 void    av_frame_set_channel_layout       (AVFrame *frame, int64_t val);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
libffabi/src/ffabi.c:429:46: error: ‘CODEC_CAP_DELAY’ undeclared (first use in this function); did you mean ‘AV_CODEC_CAP_DELAY’?
         if ((ctx->avctx->codec->capabilities&CODEC_CAP_DELAY)==0) {
                                              ^~~~~~~~~~~~~~~
                                              AV_CODEC_CAP_DELAY
libffabi/src/ffabi.c:434:5: warning: ‘avcodec_encode_audio2’ is deprecated [-Wdeprecated-declarations]
     return avcodec_encode_audio2(ctx->avctx,&ctx->pck,frame,&ctx->have_packet);
     ^~~~~~
In file included from libffabi/src/ffabi.c:22:0:
/usr/include/libavcodec/avcodec.h:5277:5: note: declared here
 int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt,
     ^~~~~~~~~~~~~~~~~~~~~
libffabi/src/ffabi.c: In function ‘ffm_audio_encode_get_info’:
libffabi/src/ffabi.c:454:28: error: ‘CODEC_FLAG_GLOBAL_HEADER’ undeclared (first use in this function); did you mean ‘AV_CODEC_FLAG_GLOBAL_HEADER’?
     if ((ctx->avctx->flags&CODEC_FLAG_GLOBAL_HEADER)!=0)
                            ^~~~~~~~~~~~~~~~~~~~~~~~
                            AV_CODEC_FLAG_GLOBAL_HEADER
make: *** [Makefile:75: out/libmakemkv.so.1.full] Error 1

ffmpeg-full3.4: https://aur.archlinux.org/packages/ffmpeg-full3.4/
ffmpeg-full: https://aur.archlinux.org/packages/ffmpeg-full/

Last edited by Winneon (2018-02-09 06:04:33)

Offline

#14 2018-02-09 06:48:47

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,393

Re: Is it possible to have both ffmpeg and ffmpeg-git installed?

Why dont:
1) make ffmpeg-git package via makepkg and install it ignoring dependancies problems.
2) compile and install mpv-git
3) install back ffmpeg from repo (fix deps broken in #1)
4) manually copy ffmpeg-git libs from #1 to, say, ~/ffmpeg-git-libs
5) start mpv-git with $LD_LIBRARY_PATH pointing to #4
6) wait for new ffmpeg to hit the repos
7) delete files created in #4

Last edited by kokoko3k (2018-02-09 06:51:08)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#15 2018-02-09 06:52:10

Winneon
Member
Registered: 2018-02-08
Posts: 10

Re: Is it possible to have both ffmpeg and ffmpeg-git installed?

I've already solved the problem of each version of the ffmpeg libraries co-existing, I just need to know how to point certain programs to the old library versions as installed by my ffmpeg-full3.4 package. I've tried LD_LIBRARY_PATH before the make commands shown in the two logs in my previous post, but it doesn't make any difference.

I do appreciate your idea though, it just seems more of a workaround instead of a proper solution to the problem.

Offline

#16 2018-02-09 07:06:46

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,393

Re: Is it possible to have both ffmpeg and ffmpeg-git installed?

it just seems more of a workaround instead of a proper solution to the problem.

Since it is a temporary problem (if i understand correctly you just need mpv-git), i thought a temporary workaround was just more appropriate smile

Last edited by kokoko3k (2018-02-09 07:08:59)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#17 2018-02-09 07:10:26

Winneon
Member
Registered: 2018-02-08
Posts: 10

Re: Is it possible to have both ffmpeg and ffmpeg-git installed?

At the moment I only need mpv-git, but I am also starting to work with recent ffmpeg features, especially when it comes to handling HDR content. That's why I'm trying to solve this issue properly. I also don't know when ffmpeg will release 3.5 or 4.0. It could be in a year from now, nobody knows.

Offline

#18 2018-02-09 07:10:28

seth
Member
Registered: 2012-09-03
Posts: 51,046

Re: Is it possible to have both ffmpeg and ffmpeg-git installed?

I've tried LD_LIBRARY_PATH before the make commands

That's a runtime path. To define include and library paths at build, you'll have to pass them to the linker using "-I" and "-L" (for gcc) - the build scripts usually provide different switches for this, but you could also just edit a generated makefile before running "make". Usually exporting "CFLAGS=-I/path/to/gettext/include LDFLAGS=-L/path/to/gettext/lib" should do.

Offline

#19 2018-02-09 08:22:29

Winneon
Member
Registered: 2018-02-08
Posts: 10

Re: Is it possible to have both ffmpeg and ffmpeg-git installed?

That seemed to do the trick. Appending the CFLAGS and LDFLAGS to the make command allowed makemkv to compile (there was another unrelated issue with the CFLAGS that a little searching fixed). Is there any way to do this without modifying PKGBUILDs in the future, say, applying CFLAGS/LDFLAGS to makepkg or pacman itself? If not, are there any other ways?

Offline

#20 2018-02-09 08:24:51

seth
Member
Registered: 2012-09-03
Posts: 51,046

Re: Is it possible to have both ffmpeg and ffmpeg-git installed?

exporting them in the shell might work, but I've never tried that.

Offline

Board footer

Powered by FluxBB