Telecommunication-Telemedia-Assessment / bitstream_mode3_videoparser

Open source video parser for the ITU-T P.1204.3 model.
GNU Lesser General Public License v2.1
18 stars 6 forks source link

"libavcodec/x86/mathops.h" has "Error: operand type mismatch for 'shr'" with binutil >= 2.41 #11

Open Morikko opened 6 months ago

Morikko commented 6 months ago

Just tried to build the project on Ubuntu 22.04, it worked but I had to do a few changes:

  1. Apply a patch to libavcodec/x86/mathops.h against Error: operand type mismatch for 'shr'

    Patch: https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/effadce6c756247ea8bae32dc13bb3e6f464f0eb found from https://bbs.archlinux.org/viewtopic.php?id=289424

  2. Also scons needed the extra libraries: libavcodec-dev and libavformat-dev (False positive, see comment)

slhck commented 6 months ago

Thanks for the info! I think we should provide a Dockerfile for this repository to make the build more reproducible. Unfortunately, due to the older ffmpeg version and the various modifications made to it, it's not that portable.

slhck commented 6 months ago

So I checked — libavcodec-dev and libavformat-dev are definitely not needed as dependencies, as the libraries are already part of the modified ffmpeg source code and should be found by scons relative to the local directory.

I still have to do some tests with the Docker image…

Morikko commented 6 months ago

Ah, maybe I saw the missing libraries first when I tried to skip to compile the local ffmepg and rather use the system one. So maybe, it is a false positive. Also, I ended up compiling this project because of itu-t p.1204.3. So, the unsuccessful initial compiling was triggered by it.

I am not home now, I will check Monday for a reason for the 1st error.

Le mer. 8 mai 2024 à 13:46, Werner Robitza @.***> a écrit :

So I checked — libavcodec-dev and libavformat-dev are definitely not needed as dependencies, as the libraries are already part of the modified ffmpeg source code and should be found by scons relative to the local directory.

The patch does not seem to be necessary per my testing with Ubuntu 22.04 in a Dockerfile with the linux/amd64 image. What is your system like?

— Reply to this email directly, view it on GitHub https://github.com/Telecommunication-Telemedia-Assessment/bitstream_mode3_videoparser/issues/11#issuecomment-2100394910, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3YAFDTR7X2TPXSY75FL6DZBIGA5AVCNFSM6AAAAABHLQDIV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBQGM4TIOJRGA . You are receiving this because you authored the thread.Message ID: <Telecommunication-Telemedia-Assessment/bitstream_mode3_videoparser/issues/11/2100394910 @github.com>

Morikko commented 6 months ago

So the reason of the patch is for:

Fixes assembling with binutil as >= 2.41

https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/effadce6c756247ea8bae32dc13bb3e6f464f0eb

Now, I checked and the system has such version of binutil. However, I am not on Ubuntu 22.04 but 23.10. Sorry, I mixed with another computer. I guess the problem may occur with Ubuntu 24.04 as well (not verified).