diff mbox series

[bug#56884] Make x265 build on ppc64le

Message ID f7be730ee74999da0f20b44c94c805681a194730.1659442047.git.marcel@van-der-boom.nl
State Accepted
Headers show
Series [bug#56884] Make x265 build on ppc64le | expand

Commit Message

Marcel van der Boom Aug. 2, 2022, 12:10 p.m. UTC
* gnu/packages/video.scm: disable ALTIVEC for target-ppc64le
---
 gnu/packages/video.scm | 6 ++++++
 1 file changed, 6 insertions(+)


base-commit: a1f7d98a9c7380be5815fd13b519bbab145757c2

Comments

Marcel van der Boom Aug. 9, 2022, 8:02 a.m. UTC | #1
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.
Thiago Jung Bauermann Aug. 10, 2022, 2:16 a.m. UTC | #2
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>; \
      |                                          ^~~~~~~~~~~~~~~~~~~
diff mbox series

Patch

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 04049fd9c8..09f8b7fd23 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -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"