unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 74419@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludovic.courtes@inria.fr>,
	"Leo Famulari" <leo@famulari.name>, "Wilko Meyer" <w@wmeyer.eu>
Subject: [bug#74419] [PATCH 4/5] gnu: libfabric: Enable libcxi support.
Date: Mon, 18 Nov 2024 15:59:19 +0100	[thread overview]
Message-ID: <3b94d179f5fa0fb4a0c443f4cb41225888eb280f.1731940961.git.ludo@gnu.org> (raw)
In-Reply-To: <cover.1731940961.git.ludo@gnu.org>

From: Ludovic Courtès <ludovic.courtes@inria.fr>

* gnu/packages/linux.scm (libfabric)[inputs]: Add libcxi, curl, and
json-c if libcxi supports the target system.
[arguments]: Add #:phases.

Change-Id: I3345cac68603c776ec4953cf0e97a12389c30635
---
 gnu/packages/linux.scm | 24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 6b2a0c201e..2bd1e14c0c 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -9116,21 +9116,37 @@ (define-public libfabric
     (build-system gnu-build-system)
     (inputs
      (let ((if-supported                          ;XXX: copied from openmpi
-            (lambda (package)
+            (lambda (package . extra)
               (if (and (not (%current-target-system))
                        (member (%current-system)
                                (package-supported-systems package)))
-                  (list package)
+                  (cons package extra)
                   '()))))
        (append (list rdma-core libnl)
                (if-supported psm)
-               (if-supported psm2))))
+               (if-supported psm2)
+               (if-supported libcxi curl json-c))))
     (arguments
      (list #:configure-flags
            #~(append (if #$(target-64bit?)
                            (list "--enable-efa")
                            '())
-                     (list "--enable-verbs"))))
+                     (list #$@(if (this-package-input "libcxi")
+                                  #~("--enable-cxi")
+                                  #~())
+                           "--enable-verbs"))
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'install 'remove-libtool-archive
+                 (lambda _
+                   ;; 'libfabric.la' has '-ljson-c' without a corresponding
+                   ;; '-L' in 'dependency_libs', which in turn causes users
+                   ;; such as Open MPI to fail at link time due to '-ljson-c'
+                   ;; not being found, even when building a shared library.
+                   ;; So, remove the .la file.
+                   (delete-file
+                    (string-append #$output
+                                   "/lib/libfabric.la")))))))
     (home-page "https://ofiwg.github.io/libfabric/")
     (synopsis "Open Fabric Interfaces")
     (description
-- 
2.46.0





  parent reply	other threads:[~2024-11-18 15:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-18 14:56 [bug#74419] [PATCH 0/5] MPI support for Slingshot via libcxi Ludovic Courtès
2024-11-18 14:59 ` [bug#74419] [PATCH 1/5] gnu: Add cassini-headers Ludovic Courtès
2024-11-18 14:59 ` [bug#74419] [PATCH 2/5] gnu: Add cxi-driver Ludovic Courtès
2024-11-18 14:59 ` [bug#74419] [PATCH 3/5] gnu: Add libcxi Ludovic Courtès
2024-11-18 14:59 ` Ludovic Courtès [this message]
2024-11-18 14:59 ` [bug#74419] [PATCH 5/5] gnu: openmpi: Disable static libraries Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3b94d179f5fa0fb4a0c443f4cb41225888eb280f.1731940961.git.ludo@gnu.org \
    --to=ludo@gnu.org \
    --cc=74419@debbugs.gnu.org \
    --cc=leo@famulari.name \
    --cc=ludovic.courtes@inria.fr \
    --cc=w@wmeyer.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).