GNU bug report logs - #74079
[PATCH 0/2] x265: Link all library variants.

Previous Next

Package: guix-patches;

Reported by: Efraim Flashner <efraim <at> flashner.co.il>

Date: Tue, 29 Oct 2024 07:32:01 UTC

Severity: normal

Tags: patch

Done: Efraim Flashner <efraim <at> flashner.co.il>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 74079 in the body.
You can then email your comments to 74079 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#74079; Package guix-patches. (Tue, 29 Oct 2024 07:32:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Efraim Flashner <efraim <at> flashner.co.il>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 29 Oct 2024 07:32:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: guix-patches <at> gnu.org
Cc: Efraim Flashner <efraim <at> flashner.co.il>
Subject: [PATCH 0/2] x265: Link all library variants.
Date: Tue, 29 Oct 2024 09:31:14 +0200
I've been working on and off on this for several years, and I finally
managed to link together all the library variants from this package.
That's the default 8-bit and the 10- and 12-bit variants.

Efraim Flashner (2):
  gnu: x265: Only build with nasm on x86_64-linux.
  gnu: x265: Link together all library variants.

 gnu/packages/video.scm | 29 ++++++++++++++---------------
 1 file changed, 14 insertions(+), 15 deletions(-)


base-commit: 4491dec50a97dbdebd7dd6d41a5596358b155b79
-- 
Efraim Flashner   <efraim <at> flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted





Information forwarded to guix-patches <at> gnu.org:
bug#74079; Package guix-patches. (Tue, 29 Oct 2024 07:35:02 GMT) Full text and rfc822 format available.

Message #8 received at 74079 <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: 74079 <at> debbugs.gnu.org
Cc: Efraim Flashner <efraim <at> flashner.co.il>
Subject: [PATCH 1/2] gnu: x265: Only build with nasm on x86_64-linux.
Date: Tue, 29 Oct 2024 09:32:38 +0200
* gnu/packages/video.scm (x265)[native-inputs]: Only use nasm when
building for x86_64-linux.

Change-Id: Id47f8bef4df0aef6cf574a39e4509024bb3a9479
---
 gnu/packages/video.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 92c0acef3ca..bb07a21e981 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -1317,9 +1317,9 @@ (define-public x265
     (build-system cmake-build-system)
     (native-inputs
      ;; XXX: ASM optimization fails on i686-linux, see <https://bugs.gnu.org/41768>.
-     (if (string-prefix? "i686" (%current-system))
-         '()
-         `(("nasm" ,nasm))))
+     (if (target-x86-64?)
+         (list nasm)
+         '()))
     (arguments
      `(#:tests? #f ; tests are skipped if ENABLE_ASSEMBLY is TRUE.
        #:configure-flags
-- 
Efraim Flashner   <efraim <at> flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted





Information forwarded to guix-patches <at> gnu.org:
bug#74079; Package guix-patches. (Tue, 29 Oct 2024 07:35:02 GMT) Full text and rfc822 format available.

Message #11 received at 74079 <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: 74079 <at> debbugs.gnu.org
Cc: Efraim Flashner <efraim <at> flashner.co.il>
Subject: [PATCH 2/2] gnu: x265: Link together all library variants.
Date: Tue, 29 Oct 2024 09:32:39 +0200
* gnu/packages/video.scm (x265)[arguments]: Adjust the 'configure-flags
to link the 10bit and 12bit variants of the libraries.  Adjust the
'build-12-bit and 'build-10-bit phases to not build the shared
libraries.  Remove 'install-more-libs phase.

Change-Id: I338e9a3d216e35e6e38fe6ccfd29236d14054306
---
 gnu/packages/video.scm | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index bb07a21e981..d9ac0a22806 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -1323,8 +1323,11 @@ (define-public x265
     (arguments
      `(#:tests? #f ; tests are skipped if ENABLE_ASSEMBLY is TRUE.
        #:configure-flags
-         ;; Ensure position independent code for everyone.
          (list "-DENABLE_PIC=TRUE"
+               "-DLINKED_10BIT=ON"
+               "-DLINKED_12BIT=ON"
+               "-DEXTRA_LIB=x265_main10.a;x265_main12.a"
+               "-DEXTRA_LINK_FLAGS=-L../build-10bit -L../build-12bit"
                (string-append "-DCMAKE_INSTALL_PREFIX="
                               (assoc-ref %outputs "out")))
        #:phases
@@ -1343,7 +1346,7 @@ (define-public x265
            (lambda* (#:key (configure-flags '()) #:allow-other-keys #:rest args)
              (mkdir "../build-12bit")
              (with-directory-excursion "../build-12bit"
-               (apply invoke
+               (invoke
                  "cmake" "../source"
                  ,@(if (target-aarch64?)
                      '("-DENABLE_ASSEMBLY=OFF")
@@ -1355,8 +1358,9 @@ (define-public x265
                  "-DHIGH_BIT_DEPTH=ON"
                  "-DEXPORT_C_API=OFF"
                  "-DENABLE_CLI=OFF"
-                 "-DMAIN12=ON"
-                 configure-flags)
+                 "-DENABLE_SHARED=OFF"
+                 "-DENABLE_PIC=TRUE"
+                 "-DMAIN12=ON")
                (substitute* (cons "cmake_install.cmake"
                                   (append
                                     (find-files "CMakeFiles/x265-shared.dir")
@@ -1367,7 +1371,7 @@ (define-public x265
            (lambda* (#:key (configure-flags '()) #:allow-other-keys #:rest args)
              (mkdir "../build-10bit")
              (with-directory-excursion "../build-10bit"
-               (apply invoke
+               (invoke
                  "cmake" "../source"
                  ,@(if (target-aarch64?)
                      '("-DENABLE_ASSEMBLY=OFF")
@@ -1379,19 +1383,14 @@ (define-public x265
                  "-DHIGH_BIT_DEPTH=ON"
                  "-DEXPORT_C_API=OFF"
                  "-DENABLE_CLI=OFF"
-                 configure-flags)
+                 "-DENABLE_SHARED=OFF"
+                 "-DENABLE_PIC=TRUE")
                (substitute* (cons "cmake_install.cmake"
                                   (append
                                     (find-files "CMakeFiles/x265-shared.dir")
                                     (find-files "CMakeFiles/x265-static.dir")))
                  (("libx265") "libx265_main10"))
                ((assoc-ref %standard-phases 'build)))))
-         (add-after 'install 'install-more-libs
-           (lambda args
-             (with-directory-excursion "../build-12bit"
-               ((assoc-ref %standard-phases 'install)))
-             (with-directory-excursion "../build-10bit"
-               ((assoc-ref %standard-phases 'install)))))
          (add-before 'strip 'move-static-libs
            (lambda* (#:key outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out"))
-- 
Efraim Flashner   <efraim <at> flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted





Reply sent to Efraim Flashner <efraim <at> flashner.co.il>:
You have taken responsibility. (Thu, 19 Dec 2024 12:54:02 GMT) Full text and rfc822 format available.

Notification sent to Efraim Flashner <efraim <at> flashner.co.il>:
bug acknowledged by developer. (Thu, 19 Dec 2024 12:54:02 GMT) Full text and rfc822 format available.

Message #16 received at 74079-done <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: 74079-done <at> debbugs.gnu.org
Subject: Re: bug#74079: Acknowledgement ([PATCH 0/2] x265: Link all library
 variants.)
Date: Thu, 19 Dec 2024 14:52:08 +0200
[Message part 1 (text/plain, inline)]
Patches pushed to the rust-team branch.

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 17 Jan 2025 12:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 214 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.