SynoCommunity / spksrc

Cross compilation framework to create native packages for the Synology's NAS
https://synocommunity.com
Other
3.03k stars 1.23k forks source link

ffmpeg 4.4.2-44 cannot find libx265.so.199 #5314

Closed jesus2099 closed 2 years ago

jesus2099 commented 2 years ago

Is this a new Bug?

Package Name

ffmpeg

Package Version

4.4.2-44

Device Model

DS213+

Device Architecture

PPC

Firmware Version

DSM 6.2.4-25556 Update 6 (Release notes)

What happened?

After #5287 has been fixed (missing libatomic.so), I now have another missing or wrong? libx265.so.199 library:

/usr/local/ffmpeg/bin/ffmpeg: error while loading shared libraries: /var/packages/ffmpeg/target/lib/libx265.so.199: R_PPC_REL24 relocation at 0x0be46cfc for symbol `pthread_mutex_init' out of range

Reproduction steps

  1. Install https://github.com/yt-dlp/yt-dlp
  2. Pick a YouTube URL or any other supported video
  3. yt-dlp --ffmpeg-location /usr/local/ffmpeg/bin/ --format bestvideo[ext=mp4]+bestaudio[ext=m4a] <video-URL>

Install Log

cat /var/log/packages/ffmpeg.log

2022/05/31 16:54:29 upgrade ffmpeg 4.4.2-44 Begin preinst
2022/05/31 16:54:29 Begin reload_inst_variables
2022/05/31 16:54:29 End reload_inst_variables
2022/05/31 16:54:29 Begin initialize_variables
2022/05/31 16:54:29 End initialize_variables
2022/05/31 16:54:29 ===> Step preinst. USER= GROUP= SHARE_PATH=
2022/05/31 16:54:29 upgrade ffmpeg 4.4.2-44 End preinst ret=[0]
2022/05/31 16:54:29 upgrade ffmpeg 4.4.2-44 Begin /bin/rm -rf /volume1/@appstore/ffmpeg
2022/05/31 16:54:29 upgrade ffmpeg 4.4.2-44 End /bin/rm -rf /volume1/@appstore/ffmpeg ret=[0]
2022/05/31 16:54:29 upgrade ffmpeg 4.4.2-44 Begin /bin/mv -f /volume1/@tmp/pkginstall/package /volume1/@appstore/ffmpeg
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 End /bin/mv -f /volume1/@tmp/pkginstall/package /volume1/@appstore/ffmpeg ret=[0]
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 Begin /bin/mkdir -p /var/packages/ffmpeg
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 End /bin/mkdir -p /var/packages/ffmpeg ret=[0]
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 Begin /bin/mv -f /volume1/@tmp/pkginstall/INFO /var/packages/ffmpeg/INFO
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 End /bin/mv -f /volume1/@tmp/pkginstall/INFO /var/packages/ffmpeg/INFO ret=[0]
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 Begin /bin/rm -rf /var/packages/ffmpeg/scripts
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 End /bin/rm -rf /var/packages/ffmpeg/scripts ret=[0]
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 Begin /bin/mv -f /volume1/@tmp/pkginstall/scripts /var/packages/ffmpeg/scripts
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 End /bin/mv -f /volume1/@tmp/pkginstall/scripts /var/packages/ffmpeg/scripts ret=[0]
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 Begin /bin/rm -rf /var/packages/ffmpeg/conf
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 End /bin/rm -rf /var/packages/ffmpeg/conf ret=[0]
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 Begin /bin/mv -f /volume1/@tmp/pkginstall/conf /var/packages/ffmpeg/conf
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 End /bin/mv -f /volume1/@tmp/pkginstall/conf /var/packages/ffmpeg/conf ret=[0]
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 Begin postinst
2022/05/31 16:54:30 Begin reload_inst_variables
2022/05/31 16:54:30 End reload_inst_variables
2022/05/31 16:54:30 Begin initialize_variables
2022/05/31 16:54:30 End initialize_variables
2022/05/31 16:54:30 ===> Step postinst. USER= GROUP= SHARE_PATH=
2022/05/31 16:54:30 Begin save_wizard_variables
2022/05/31 16:54:30 End save_wizard_variables
2022/05/31 16:54:30 Begin service_postinst
2022/05/31 16:54:30 chmod: cannot access '/var/packages/ffmpeg/target/bin/vainfo': No such file or directory
2022/05/31 16:54:30 End service_postinst
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 End postinst ret=[0]
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 Begin postupgrade
2022/05/31 16:54:30 Begin reload_inst_variables
2022/05/31 16:54:30 End reload_inst_variables
2022/05/31 16:54:30 Begin initialize_variables
2022/05/31 16:54:30 End initialize_variables
2022/05/31 16:54:31 ===> Step postupgrade. USER= GROUP= SHARE_PATH=
2022/05/31 16:54:31 Begin service_postupgrade
2022/05/31 16:54:31 chmod: cannot access '/var/packages/ffmpeg/target/bin/vainfo': No such file or directory
2022/05/31 16:54:31 End service_postupgrade
2022/05/31 16:54:31 upgrade ffmpeg 4.4.2-44 End postupgrade ret=[0]
2022/05/31 16:54:34 upgrade ffmpeg 4.4.2-44 Begin start-stop-status start
2022/05/31 16:54:34 upgrade ffmpeg 4.4.2-44 End start-stop-status start ret=[0]
2022/05/31 16:54:34 upgrade ffmpeg 4.4.2-44 Begin /bin/rm -rf /volume1/@tmp/pkginstall
2022/05/31 16:54:34 upgrade ffmpeg 4.4.2-44 End /bin/rm -rf /volume1/@tmp/pkginstall ret=[0]
2022/06/01 04:02:17 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status stop
2022/06/01 04:02:17 (system) trigger ffmpeg 4.4.2-44 End start-stop-status stop ret=[0]

Other Logs

sudo cat /var/log/messages|grep ffmpeg

2021-11-09T09:17:30+01:00 relm synoscgi_SYNO.Core.Package.Installation_1_install[18999]: resource_api.cpp:289 Release service-cfg for ffmpeg when 0x0002 (done)
2021-11-09T09:17:30+01:00 relm synoscgi_SYNO.Core.Package.Installation_1_install[19039]: resource_api.cpp:190 Acquire service-cfg for ffmpeg when 0x0002 (done)
2022-04-28T01:50:04+02:00 relm synoscgi_SYNO.Core.Package.Installation_1_install[14843]: resource_api.cpp:289 Release service-cfg for ffmpeg when 0x0002 (done)
2022-04-28T01:50:04+02:00 relm synoscgi_SYNO.Core.Package_2_list[14677]: servicecfg_enum.c:29 Failed to move file [/usr/syno/etc/synoservice.d/pkgctl-ffmpeg.cfg] to [/usr/syno/etc/synoservice.d/error/pkgctl-ffmpeg.cfg] errno=2/No such file or directory
2022-04-28T01:50:05+02:00 relm synoscgi_SYNO.Core.Package.Installation_1_install[14919]: resource_api.cpp:190 Acquire service-cfg for ffmpeg when 0x0002 (done)
2022-05-05T19:03:48+02:00 relm synopkghelper: pkgcurltool.cpp:597 Failed to download https://packages.synocommunity.com/ffmpeg/43/icon_256.png, code=28, err=Error
2022-05-05T19:05:21+02:00 relm synopkghelper: pkgcurltool.cpp:597 Failed to download https://packages.synocommunity.com/ffmpeg/43/icon_72.png, code=28, err=Error
2022-05-25T16:23:46+02:00 relm synoscgi_SYNO.Core.Package.Installation_1_install[27416]: resource_api.cpp:289 Release service-cfg for ffmpeg when 0x0002 (done)
2022-05-25T16:23:48+02:00 relm synoscgi_SYNO.Core.Package.Installation_1_install[27526]: resource_api.cpp:190 Acquire service-cfg for ffmpeg when 0x0002 (done)
2022-05-31T16:54:29+02:00 relm synoscgi_SYNO.Core.Package.Installation_1_install[24834]: resource_api.cpp:289 Release service-cfg for ffmpeg when 0x0002 (done)
2022-05-31T16:54:30+02:00 relm synoscgi_SYNO.Core.Package.Installation_1_install[24941]: resource_api.cpp:190 Acquire service-cfg for ffmpeg when 0x0002 (done)

cat /var/log/synopkg.log |grep 'ffmpeg 4.4.2-44'

2022/05/31 16:54:29 upgrade ffmpeg 4.4.2-44 Begin preinst
2022/05/31 16:54:29 upgrade ffmpeg 4.4.2-44 End preinst ret=[0]
2022/05/31 16:54:29 upgrade ffmpeg 4.4.2-44 Begin /bin/rm -rf /volume1/@appstore/ffmpeg
2022/05/31 16:54:29 upgrade ffmpeg 4.4.2-44 End /bin/rm -rf /volume1/@appstore/ffmpeg ret=[0]
2022/05/31 16:54:29 upgrade ffmpeg 4.4.2-44 Begin /bin/mv -f /volume1/@tmp/pkginstall/package /volume1/@appstore/ffmpeg
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 End /bin/mv -f /volume1/@tmp/pkginstall/package /volume1/@appstore/ffmpeg ret=[0]
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 Begin /bin/mkdir -p /var/packages/ffmpeg
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 End /bin/mkdir -p /var/packages/ffmpeg ret=[0]
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 Begin /bin/mv -f /volume1/@tmp/pkginstall/INFO /var/packages/ffmpeg/INFO
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 End /bin/mv -f /volume1/@tmp/pkginstall/INFO /var/packages/ffmpeg/INFO ret=[0]
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 Begin /bin/rm -rf /var/packages/ffmpeg/scripts
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 End /bin/rm -rf /var/packages/ffmpeg/scripts ret=[0]
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 Begin /bin/mv -f /volume1/@tmp/pkginstall/scripts /var/packages/ffmpeg/scripts
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 End /bin/mv -f /volume1/@tmp/pkginstall/scripts /var/packages/ffmpeg/scripts ret=[0]
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 Begin /bin/rm -rf /var/packages/ffmpeg/conf
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 End /bin/rm -rf /var/packages/ffmpeg/conf ret=[0]
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 Begin /bin/mv -f /volume1/@tmp/pkginstall/conf /var/packages/ffmpeg/conf
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 End /bin/mv -f /volume1/@tmp/pkginstall/conf /var/packages/ffmpeg/conf ret=[0]
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 Begin postinst
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 End postinst ret=[0]
2022/05/31 16:54:30 upgrade ffmpeg 4.4.2-44 Begin postupgrade
2022/05/31 16:54:31 upgrade ffmpeg 4.4.2-44 End postupgrade ret=[0]
2022/05/31 16:54:34 upgrade ffmpeg 4.4.2-44 Begin start-stop-status start
2022/05/31 16:54:34 upgrade ffmpeg 4.4.2-44 End start-stop-status start ret=[0]
2022/05/31 16:54:34 upgrade ffmpeg 4.4.2-44 Begin /bin/rm -rf /volume1/@tmp/pkginstall
2022/05/31 16:54:34 upgrade ffmpeg 4.4.2-44 End /bin/rm -rf /volume1/@tmp/pkginstall ret=[0]
2022/06/01 04:02:17 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status stop
2022/06/01 04:02:17 (system) trigger ffmpeg 4.4.2-44 End start-stop-status stop ret=[0]
2022/06/01 09:46:44 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status start
2022/06/01 09:46:44 (system) trigger ffmpeg 4.4.2-44 End start-stop-status start ret=[0]
2022/06/02 02:08:13 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status stop
2022/06/02 02:08:13 (system) trigger ffmpeg 4.4.2-44 End start-stop-status stop ret=[0]
2022/06/02 14:04:15 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status start
2022/06/02 14:04:15 (system) trigger ffmpeg 4.4.2-44 End start-stop-status start ret=[0]
2022/06/03 02:34:48 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status stop
2022/06/03 02:34:48 (system) trigger ffmpeg 4.4.2-44 End start-stop-status stop ret=[0]
2022/06/03 09:45:29 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status start
2022/06/03 09:45:29 (system) trigger ffmpeg 4.4.2-44 End start-stop-status start ret=[0]
2022/06/04 00:55:47 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status stop
2022/06/04 00:55:47 (system) trigger ffmpeg 4.4.2-44 End start-stop-status stop ret=[0]
2022/06/04 19:46:15 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status start
2022/06/04 19:46:15 (system) trigger ffmpeg 4.4.2-44 End start-stop-status start ret=[0]
2022/06/05 02:32:03 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status stop
2022/06/05 02:32:03 (system) trigger ffmpeg 4.4.2-44 End start-stop-status stop ret=[0]
2022/06/05 12:18:21 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status start
2022/06/05 12:18:21 (system) trigger ffmpeg 4.4.2-44 End start-stop-status start ret=[0]
2022/06/06 04:27:54 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status stop
2022/06/06 04:27:55 (system) trigger ffmpeg 4.4.2-44 End start-stop-status stop ret=[0]
2022/06/06 10:58:22 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status start
2022/06/06 10:58:22 (system) trigger ffmpeg 4.4.2-44 End start-stop-status start ret=[0]
2022/06/07 01:24:39 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status stop
2022/06/07 01:24:39 (system) trigger ffmpeg 4.4.2-44 End start-stop-status stop ret=[0]
2022/06/07 08:33:33 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status start
2022/06/07 08:33:33 (system) trigger ffmpeg 4.4.2-44 End start-stop-status start ret=[0]
2022/06/07 16:03:01 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status stop
2022/06/07 16:03:01 (system) trigger ffmpeg 4.4.2-44 End start-stop-status stop ret=[0]
2022/06/08 00:13:51 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status start
2022/06/08 00:13:51 (system) trigger ffmpeg 4.4.2-44 End start-stop-status start ret=[0]
2022/06/08 02:14:17 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status stop
2022/06/08 02:14:17 (system) trigger ffmpeg 4.4.2-44 End start-stop-status stop ret=[0]
2022/06/09 00:49:53 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status start
2022/06/09 00:49:53 (system) trigger ffmpeg 4.4.2-44 End start-stop-status start ret=[0]
2022/06/09 01:43:15 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status stop
2022/06/09 01:43:15 (system) trigger ffmpeg 4.4.2-44 End start-stop-status stop ret=[0]
2022/06/10 09:07:33 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status start
2022/06/10 09:07:33 (system) trigger ffmpeg 4.4.2-44 End start-stop-status start ret=[0]
2022/06/10 19:44:21 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status stop
2022/06/10 19:44:21 (system) trigger ffmpeg 4.4.2-44 End start-stop-status stop ret=[0]
2022/06/11 00:19:37 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status start
2022/06/11 00:19:37 (system) trigger ffmpeg 4.4.2-44 End start-stop-status start ret=[0]
2022/06/11 01:57:47 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status stop
2022/06/11 01:57:47 (system) trigger ffmpeg 4.4.2-44 End start-stop-status stop ret=[0]
2022/06/11 10:43:23 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status start
2022/06/11 10:43:23 (system) trigger ffmpeg 4.4.2-44 End start-stop-status start ret=[0]
2022/06/11 10:54:43 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status stop
2022/06/11 10:54:44 (system) trigger ffmpeg 4.4.2-44 End start-stop-status stop ret=[0]
2022/06/12 15:10:39 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status start
2022/06/12 15:10:39 (system) trigger ffmpeg 4.4.2-44 End start-stop-status start ret=[0]
2022/06/13 00:08:56 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status stop
2022/06/13 00:08:56 (system) trigger ffmpeg 4.4.2-44 End start-stop-status stop ret=[0]
2022/06/14 09:22:32 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status start
2022/06/14 09:22:32 (system) trigger ffmpeg 4.4.2-44 End start-stop-status start ret=[0]
2022/06/15 02:19:52 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status stop
2022/06/15 02:19:52 (system) trigger ffmpeg 4.4.2-44 End start-stop-status stop ret=[0]
2022/06/15 07:54:41 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status start
2022/06/15 07:54:41 (system) trigger ffmpeg 4.4.2-44 End start-stop-status start ret=[0]
2022/06/15 09:03:02 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status stop
2022/06/15 09:03:02 (system) trigger ffmpeg 4.4.2-44 End start-stop-status stop ret=[0]
2022/06/15 09:05:26 (system) trigger ffmpeg 4.4.2-44 Begin start-stop-status start
2022/06/15 09:05:27 (system) trigger ffmpeg 4.4.2-44 End start-stop-status start ret=[0]
th0ma7 commented 2 years ago

Quick investigation points towards missing -fPIC compile time option. I'll investigate further and come back to you.

https://stackoverflow.com/questions/12862830/r-ppc-rel24-relocation-out-of-range

th0ma7 commented 2 years ago

@jesus2099 if it builds succesfully there should be artifacts available in the check summary in here https://github.com/SynoCommunity/spksrc/pull/5323/checks

Try out the qoriq (e.g. ppc) package and let me know if this solves the issue.

jesus2099 commented 2 years ago

It now says All checks have passed but I'm not sure how to do that.

th0ma7 commented 2 years ago

From the check page above you clink on Build on the left side and you'll get to the result page (URL changes at every run) https://github.com/SynoCommunity/spksrc/actions/runs/2556795186

You'll find packages for each architectures. Download the one for qoriq, uncompress the zip and in there you'll find the ffmpeg package.

th0ma7 commented 2 years ago

@jesus2099 have you ever tested this out? All you needed was to download the Packages for qoriq-6.1 then manually install it on your NAS from the package center.

I don't posess this NAS model so I can't test it on my end.

jesus2099 commented 2 years ago

Thank you @th0ma7 for the direct link. Sorry for that. I don't remember. I think I tried but I guess I was quite puzzled, not knowing how to do.

I see .spk files in that zip:

chromaprint_qoriq-6.1_1.5.1-18.spk
comskip_qoriq-6.1_0.82.010-8.spk
ffmpeg_qoriq-6.1_4.4.2-45.spk
imagemagick_qoriq-6.1_7.1.0-8.spk
tvheadend_qoriq-6.1_4.3.20220414-32.spk

I found some info about how to install them online:

I will try the command line, but, is sudo synopkg install ffmpeg_qoriq-6.1_4.4.2-45.spk enough? or do I have to install for each .spk file and in what order?

th0ma7 commented 2 years ago

You are overcomplexifying yourself a bit. follow this:

  1. Simply unzip the file on your desktop.
  2. then from the Synology DSM web interface, open-up the package center
  3. use the manual install on top then select ffmpeg_qoriq-6.1_4.4.2-45.spk package.
  4. only the ffmpeg package needs to be installed, don't bother with the other ones.
  5. there's a few click to say ok I accept type-thing
  6. then your're all set!

Afterwards you'll be able to retry your yt-dlp --ffmpeg-location .... command and see if the error is now gone.

jesus2099 commented 2 years ago

Great! I will try tonight or tomorrow!

jesus2099 commented 2 years ago

Should I uninstall the SynoCommunity ffmpeg package first? I'm afraid of corrupting its install/uninstall system, maybe if I manually install this other version. OK I do that.

th0ma7 commented 2 years ago

nope, this will replace the package you already have installed with an updated version. That's it. And worst case you can always uninstall and reinstall our official package from the package center as you'd normally do.

jesus2099 commented 2 years ago

OK so I didn't need to uninstall first. Thanks I will know for next time. I didn't understand it was the newer version of the same package.

But, you know... IT WORKS NOW! This version 4.4.2-45 works!

In fact I just had to run /usr/local/ffmpeg/bin/ffmpeg -version or even /usr/local/ffmpeg/bin/ffmpeg to trigger the error, as it would not run at all. Now with 4.4.2-45 it works. I also tested the complete yt-dlp command to make sure!

I can keep this version installed? And it will still detect when there is a newer version?

My package center shows:

Installed version 4.4.2-45

Newest online version 4.4.2-44

th0ma7 commented 2 years ago

That's great! No worries you can keep this version installed. I've bumped the next package version to -46 so eventually you'll be notified by your Package center for an update to a newer version that will now contain this fix by default.

Thnx for taking time for testing this, cheers!