[bug#56884] Make x265 build on ppc64le
Commit Message
* gnu/packages/video.scm: disable ALTIVEC for target-ppc64le
---
gnu/packages/video.scm | 6 ++++++
1 file changed, 6 insertions(+)
base-commit: a1f7d98a9c7380be5815fd13b519bbab145757c2
Comments
Anything else needed here?
The patch seems consistent with other packagers I think. Others
are also confused on what is needed for the altivec code between
different POWER processors.
Hello Marcel,
Marcel van der Boom <marcel@van-der-boom.nl> writes:
> Anything else needed here?
>
> The patch seems consistent with other packagers I think.
Thank you for the patch! It looks good to me. I only have one
suggestion: IMHO it would be a good idea to have a short comment above
the “(if (target-ppc64le?) …)” line explaining why it's needed, such as
“Enabling AltiVec support causes compilation errors.” or something
similar.
Ideally upstream should be notified about this problem so that they are
aware of it, but looking at the x265 website I can't find any bug
tracker.
> Others are also confused on what is needed for the altivec code
> between different POWER processors.
Sorry, I'm not sure what you mean.
PS: Just for the sake of documenting in the issue tracker why x265 isn't
building on ppc64le — the build fails because of many errors such as:
/tmp/guix-build-x265-3.5.drv-0/x265_3.5/source/common/ppc/pixel_altivec.cpp:4199:42: error: no matches converting function ‘sad16_altivec’ to type ‘x265_12bit::pixelcmp_t’ {aka ‘int (*)(const short unsigned int*, long int, const short unsigned int*, long int)’}
4199 | p.pu[LUMA_ ## W ## x ## H].sad = sad16_altivec<W, H>; \
| ^~~~~~~~~~~~~~~~~~~
@@ -1252,6 +1252,9 @@ (define-public x265
,@(if (target-aarch64?)
'("-DENABLE_ASSEMBLY=OFF")
'())
+ ,@(if (target-ppc64le?)
+ '("-DENABLE_ALTIVEC=OFF")
+ '())
"-DHIGH_BIT_DEPTH=ON"
"-DEXPORT_C_API=OFF"
"-DENABLE_CLI=OFF"
@@ -1272,6 +1275,9 @@ (define-public x265
,@(if (target-aarch64?)
'("-DENABLE_ASSEMBLY=OFF")
'())
+ ,@(if (target-ppc64le?)
+ '("-DENABLE_ALTIVEC=OFF")
+ '())
"-DHIGH_BIT_DEPTH=ON"
"-DEXPORT_C_API=OFF"
"-DENABLE_CLI=OFF"