GNU bug report logs - #47972
Add irods.

Previous Next

Package: guix-patches;

Reported by: Ricardo Wurmus <rekado <at> elephly.net>

Date: Fri, 23 Apr 2021 14:21:01 UTC

Severity: normal

Done: Ricardo Wurmus <rekado <at> elephly.net>

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 47972 in the body.
You can then email your comments to 47972 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#47972; Package guix-patches. (Fri, 23 Apr 2021 14:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ricardo Wurmus <rekado <at> elephly.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 23 Apr 2021 14:21:02 GMT) Full text and rfc822 format available.

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

From: Ricardo Wurmus <rekado <at> elephly.net>
To: guix-patches <at> gnu.org
Subject: Add irods.
Date: Fri, 23 Apr 2021 16:20:04 +0200
Hi Guix,

this set of patches adds irods and irods-client-icommands.  What 
makes this patch set a little annoying is the fact that irods 
insists on being built with clang 6; this means that we need 
variants of existing GCC-built packages just so that they can be 
linked with the irods libraries.

For the most part this is not too bad because we need specific 
versions of certain libraries anyway.  But for snappy-with-clang6 
and avro-cpp it’s pretty bad.  You’ll see that I’m using an inline 
package definition for a variant of avro-cpp that is built with 
clang; that package variant needs snappy, so I had to introduce 
snappy-with-clang6.

Before we can actually merge this we would have to move this 
avro-cpp variant to its own top-level package definition, because 
it turns out that irods-client-icommands also needs it.

If you have an idea how to build irods with GCC, I’d be very 
happy.  (It takes quite some time to build irods, so be prepared 
for long iteration cycles…)

-- 
Ricardo




Information forwarded to guix-patches <at> gnu.org:
bug#47972; Package guix-patches. (Fri, 23 Apr 2021 14:33:02 GMT) Full text and rfc822 format available.

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

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 47972 <at> debbugs.gnu.org
Cc: Ricardo Wurmus <rekado <at> elephly.net>
Subject: [PATCH 1/6] gnu: Add boost-for-irods.
Date: Fri, 23 Apr 2021 16:31:56 +0200
* gnu/packages/boost.scm (boost-for-irods): New variable.
---
 gnu/packages/boost.scm | 94 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 93 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm
index a59bb01f3d..0ab62a4d90 100644
--- a/gnu/packages/boost.scm
+++ b/gnu/packages/boost.scm
@@ -7,7 +7,7 @@
 ;;; Copyright © 2017 Thomas Danckaert <post <at> thomasdanckaert.be>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me <at> tobias.gr>
 ;;; Copyright © 2018 Arun Isaac <arunisaac <at> systemreboot.net>
-;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado <at> elephly.net>
+;;; Copyright © 2018, 2019, 2021 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2018, 2020 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe <at> gmail.com>
@@ -43,6 +43,7 @@
   #:use-module (gnu packages compression)
   #:use-module (gnu packages hurd)
   #:use-module (gnu packages icu4c)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
   #:use-module (gnu packages shells)
@@ -201,6 +202,97 @@ across a broad spectrum of applications.")
     (license (license:x11-style "https://www.boost.org/LICENSE_1_0.txt"
                                 "Some components have other similar licences."))))
 
+;; Sadly, this is needed for irods.  It won't link with 1.69 or later.
+(define-public boost-for-irods
+  (package
+    (name "boost-for-irods")
+    (version "1.68.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://sourceforge/boost/boost/" version "/boost_"
+                    (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
+                    ".tar.bz2"))
+              (sha256
+               (base32
+                "1dyqsr9yb01y0nnjdq9b8q5s2kvhxbayk34832k5cpzn7jy30qbz"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("icu4c" ,icu4c)
+       ("zlib" ,zlib)))
+    (native-inputs
+     `(("clang" ,clang-6)
+       ("libcxx" ,libcxx+libcxxabi-6)
+       ("libcxxabi" ,libcxxabi-6)
+       ("perl" ,perl)
+       ("tcsh" ,tcsh)))
+    (arguments
+     `(#:tests? #f
+       #:make-flags
+       (list "threading=multi" "link=shared"
+             "cxxflags=-stdlib=libc++"
+             "--without-python"
+
+             ;; Set the RUNPATH to $libdir so that the libs find each other.
+             (string-append "linkflags=-stdlib=libc++ -Wl,-rpath="
+                            (assoc-ref %outputs "out") "/lib"))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'bootstrap)
+         (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((gcc (assoc-ref inputs  "gcc")))
+               (setenv "CPLUS_INCLUDE_PATH"
+                       (string-join
+                        (cons (string-append (assoc-ref inputs "libcxx")
+                                             "/include/c++/v1")
+                              ;; Hide GCC's C++ headers so that they do not interfere with
+                              ;; the Clang headers.
+                              (delete (string-append gcc "/include/c++")
+                                      (string-split (getenv "CPLUS_INCLUDE_PATH")
+                                                    #\:)))
+                        ":"))
+               (format #true
+                       "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
+                       (getenv "CPLUS_INCLUDE_PATH")))))
+         (replace 'configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((icu (assoc-ref inputs "icu4c"))
+                   (zlib (assoc-ref inputs "zlib"))
+                   (out (assoc-ref outputs "out")))
+               (substitute* '("libs/config/configure"
+                              "libs/spirit/classic/phoenix/test/runtest.sh"
+                              "tools/build/src/engine/execunix.c"
+                              "tools/build/src/engine/Jambase"
+                              "tools/build/src/engine/jambase.c")
+                 (("/bin/sh") (which "sh")))
+
+               (setenv "SHELL" (which "sh"))
+               (setenv "CONFIG_SHELL" (which "sh"))
+
+               (invoke "./bootstrap.sh"
+                       (string-append "--prefix=" out)
+                       ;; Auto-detection looks for ICU only in traditional
+                       ;; install locations.
+                       (string-append "--with-icu=" icu)
+                       "--with-toolset=clang"))))
+         (replace 'build
+           (lambda* (#:key inputs make-flags #:allow-other-keys)
+             (let ((zlib (assoc-ref inputs "zlib")))
+               (apply invoke "./b2"
+                      (format #f "-j~a" (parallel-job-count))
+                      make-flags))))
+         (replace 'install
+           (lambda* (#:key make-flags #:allow-other-keys)
+             (apply invoke "./b2" "install" make-flags))))))
+    (home-page "https://www.boost.org")
+    (synopsis "Peer-reviewed portable C++ source libraries")
+    (description
+     "A collection of libraries intended to be widely useful, and usable
+across a broad spectrum of applications.")
+    (license (license:x11-style "https://www.boost.org/LICENSE_1_0.txt"
+                                "Some components have other similar licences."))))
+
 (define-public boost-with-python2
   (package/inherit boost
     (name "boost-python2")
-- 
2.31.1





Information forwarded to guix-patches <at> gnu.org:
bug#47972; Package guix-patches. (Fri, 23 Apr 2021 14:33:02 GMT) Full text and rfc822 format available.

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

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 47972 <at> debbugs.gnu.org
Cc: Ricardo Wurmus <rekado <at> elephly.net>
Subject: [PATCH 2/6] gnu: Add snappy-with-clang6.
Date: Fri, 23 Apr 2021 16:31:57 +0200
* gnu/packages/compression.scm (snappy-with-clang6): New variable.
---
 gnu/packages/compression.scm | 37 +++++++++++++++++++++++++++++++++++-
 1 file changed, 36 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 37a7d230fe..2b1dfcfab1 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -4,7 +4,7 @@
 ;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw <at> netris.org>
 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli <at> gmail.com>
 ;;; Copyright © 2015, 2016 Eric Bavier <bavier <at> member.fsf.org>
-;;; Copyright © 2015, 2016, 2017, 2018, 2020 Ricardo Wurmus <rekado <at> elephly.net>
+;;; Copyright © 2015, 2016, 2017, 2018, 2020, 2021 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2015, 2017, 2018 Leo Famulari <leo <at> famulari.name>
 ;;; Copyright © 2015 Jeff Mickey <j <at> codemac.net>
 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim <at> flashner.co.il>
@@ -76,6 +76,7 @@
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages man)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages perl)
@@ -1132,6 +1133,40 @@ for most inputs, but the resulting compressed files are anywhere from 20% to
 100% bigger.")
     (license license:asl2.0)))
 
+;; We need this for irods.
+(define-public snappy-with-clang6
+  (package
+    (inherit snappy)
+    (name "snappy-with-clang")
+    (arguments
+     `(#:configure-flags
+       '("-DBUILD_SHARED_LIBS=ON"
+         "-DCMAKE_CXX_COMPILER=clang++"
+         "-DCMAKE_CXX_FLAGS=-stdlib=libc++"
+         "-DCMAKE_EXE_LINKER_FLAGS=-lc++abi")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((gcc (assoc-ref inputs "gcc")))
+               (setenv "CPLUS_INCLUDE_PATH"
+                       (string-join
+                        (cons* (string-append (assoc-ref inputs "libcxx+libcxxabi")
+                                              "/include/c++/v1")
+                               ;; Hide GCC's C++ headers so that they do not interfere with
+                               ;; the Clang headers.
+                               (delete (string-append gcc "/include/c++")
+                                       (string-split (getenv "CPLUS_INCLUDE_PATH")
+                                                     #\:)))
+                        ":"))
+               (format #true
+                       "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
+                       (getenv "CPLUS_INCLUDE_PATH"))))))))
+    (native-inputs
+     `(("clang" ,clang-toolchain-6)
+       ("libcxx+libcxxabi" ,libcxx+libcxxabi-6)
+       ("libcxxabi" ,libcxxabi-6)))))
+
 (define-public p7zip
   (package
     (name "p7zip")
-- 
2.31.1





Information forwarded to guix-patches <at> gnu.org:
bug#47972; Package guix-patches. (Fri, 23 Apr 2021 14:33:03 GMT) Full text and rfc822 format available.

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

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 47972 <at> debbugs.gnu.org
Cc: Ricardo Wurmus <rekado <at> elephly.net>
Subject: [PATCH 3/6] gnu: Add nanodbc-for-irods.
Date: Fri, 23 Apr 2021 16:31:58 +0200
* gnu/packages/databases.scm (nanodbc-for-irods): New variable.
---
 gnu/packages/databases.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index b956833557..d159c47af8 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -98,6 +98,7 @@
   #:use-module (gnu packages linux)
   #:use-module (gnu packages lisp)
   #:use-module (gnu packages lisp-xyz)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages logging)
   #:use-module (gnu packages man)
   #:use-module (gnu packages maths)
@@ -2103,6 +2104,42 @@ a simpler and less verbose API for working with ODBC.  Common tasks should be
 easy, requiring concise and simple code.")
     (license license:expat)))
 
+(define-public nanodbc-for-irods
+  (package
+    (inherit nanodbc)
+    (arguments
+     `(#:tests? #false
+       #:configure-flags
+       '("-DBUILD_SHARED_LIBS=ON"
+         ;; The tests require ODBC backends to be installed.
+         "-DNANODBC_DISABLE_TESTS=ON"
+         "-DCMAKE_CXX_COMPILER=clang++"
+         "-DCMAKE_CXX_FLAGS=-stdlib=libc++"
+         "-DCMAKE_EXE_LINKER_FLAGS=-lc++abi")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((gcc (assoc-ref inputs "gcc")))
+               (setenv "CPLUS_INCLUDE_PATH"
+                       (string-join
+                        (cons (string-append (assoc-ref inputs "libcxx")
+                                             "/include/c++/v1")
+                              ;; Hide GCC's C++ headers so that they do not interfere with
+                              ;; the Clang headers.
+                              (delete (string-append gcc "/include/c++")
+                                      (string-split (getenv "CPLUS_INCLUDE_PATH")
+                                                    #\:)))
+                        ":"))
+               (format #true
+                       "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
+                       (getenv "CPLUS_INCLUDE_PATH"))))))))
+    (inputs
+     `(("unixodbc" ,unixodbc)
+       ("libcxx" ,libcxx+libcxxabi-6)
+       ("libcxxabi" ,libcxxabi-6)
+       ("clang" ,clang-6)))))
+
 (define-public unqlite
   (package
     (name "unqlite")
-- 
2.31.1





Information forwarded to guix-patches <at> gnu.org:
bug#47972; Package guix-patches. (Fri, 23 Apr 2021 14:33:04 GMT) Full text and rfc822 format available.

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

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 47972 <at> debbugs.gnu.org
Cc: Ricardo Wurmus <rekado <at> elephly.net>
Subject: [PATCH 4/6] gnu: Add fmt-for-irods.
Date: Fri, 23 Apr 2021 16:31:59 +0200
* gnu/packages/pretty-print.scm (fmt-for-irods): New variable.
---
 gnu/packages/pretty-print.scm | 55 ++++++++++++++++++++++++++++++++++-
 1 file changed, 54 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm
index 4662a1e717..7e7da53599 100644
--- a/gnu/packages/pretty-print.scm
+++ b/gnu/packages/pretty-print.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016, 2019, 2020 Efraim Flashner <efraim <at> flashner.co.il>
-;;; Copyright © 2016 Ricardo Wurmus <rekado <at> elephly.net>
+;;; Copyright © 2016, 2021 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2017 Marius Bakke <mbakke <at> fastmail.com>
 ;;; Copyright © 2017, 2020 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me <at> tobias.gr>
@@ -41,6 +41,7 @@
   #:use-module (gnu packages gperf)
   #:use-module (gnu packages groff)
   #:use-module (gnu packages gv)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
@@ -189,6 +190,58 @@ to @code{IOStreams}.")
     ;; The library is bsd-2, but documentation and tests include other licenses.
     (license (list bsd-2 bsd-3 psfl))))
 
+(define-public fmt-for-irods
+  (package
+    (name "fmt-for-irods")
+    (version "6.1.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/fmtlib/fmt/releases/download/"
+                           version "/fmt-" version ".zip"))
+       (sha256
+        (base32 "1s1hxaby5byb07rgmrk4a0q11fxhz7b42khch7sp2qx974y0yrb3"))))
+    (build-system cmake-build-system)
+    (arguments
+     '(#:tests? #f ; TODO: posix-mock-test segfaults
+       #:configure-flags
+       '("-DBUILD_SHARED_LIBS=ON"
+         "-DCMAKE_CXX_COMPILER=clang++"
+         "-DCMAKE_CXX_FLAGS=-stdlib=libc++"
+         "-DCMAKE_EXE_LINKER_FLAGS=-lc++abi")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((gcc (assoc-ref inputs "gcc")))
+               (setenv "CPLUS_INCLUDE_PATH"
+                       (string-join
+                        (cons (string-append (assoc-ref inputs "libcxx")
+                                             "/include/c++/v1")
+                              ;; Hide GCC's C++ headers so that they do not interfere with
+                              ;; the Clang headers.
+                              (delete (string-append gcc "/include/c++")
+                                      (string-split (getenv "CPLUS_INCLUDE_PATH")
+                                                    #\:)))
+                        ":"))
+               (format #true
+                       "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
+                       (getenv "CPLUS_INCLUDE_PATH"))))))))
+    (native-inputs
+     `(("unzip" ,unzip)))
+    (inputs
+     `(("libcxx" ,libcxx+libcxxabi-6)
+       ("libcxxabi" ,libcxxabi-6)
+       ("clang" ,clang-6)))
+    (home-page "https://fmt.dev")
+    (synopsis "Small and fast C++ formatting library")
+    (description
+     "@code{fmt} (formerly @code{cppformat}) is a formatting library for C++.
+It can be used as a safe alternative to @code{printf} or as a fast alternative
+to @code{IOStreams}.")
+    ;; The library is bsd-2, but documentation and tests include other licenses.
+    (license (list bsd-2 bsd-3 psfl))))
+
 (define-public source-highlight
   (package
     (name "source-highlight")
-- 
2.31.1





Information forwarded to guix-patches <at> gnu.org:
bug#47972; Package guix-patches. (Fri, 23 Apr 2021 14:33:04 GMT) Full text and rfc822 format available.

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

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 47972 <at> debbugs.gnu.org
Cc: Ricardo Wurmus <rekado <at> elephly.net>
Subject: [PATCH 5/6] gnu: Add irods.
Date: Fri, 23 Apr 2021 16:32:00 +0200
* gnu/packages/irods.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk           |   1 +
 gnu/packages/irods.scm | 200 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 201 insertions(+)
 create mode 100644 gnu/packages/irods.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 50b11a8ca2..f18fed6fbc 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -296,6 +296,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/installers.scm			\
   %D%/packages/ipfs.scm			\
   %D%/packages/irc.scm  			\
+  %D%/packages/irods.scm  			\
   %D%/packages/iso-codes.scm			\
   %D%/packages/jami.scm				\
   %D%/packages/java.scm				\
diff --git a/gnu/packages/irods.scm b/gnu/packages/irods.scm
new file mode 100644
index 0000000000..75a58d97cb
--- /dev/null
+++ b/gnu/packages/irods.scm
@@ -0,0 +1,200 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Ricardo Wurmus <rekado <at> elephly.net>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages irods)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system cmake)
+  #:use-module (guix utils)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages backup)
+  #:use-module (gnu packages boost)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages cpp)
+  #:use-module (gnu packages databases)
+  #:use-module (gnu packages gcc)
+  #:use-module (gnu packages kerberos)
+  #:use-module (gnu packages linux)
+  #:use-module (gnu packages llvm)
+  #:use-module (gnu packages logging)
+  #:use-module (gnu packages networking)
+  #:use-module (gnu packages pretty-print)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages serialization)
+  #:use-module (gnu packages tls)
+  #:use-module (srfi srfi-1))
+
+(define-public irods
+  (package
+    (name "irods")
+    (version "4.2.8")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/irods/irods/releases/download/"
+                                  version "/irods-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0ny54c3r0j692rvbr4iibg7xgd2i7g9x8yyrw04j889bywix14rc"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        "-DCMAKE_BUILD_TYPE=Release"
+        (string-append "-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath="
+                       (assoc-ref %outputs "out") "/lib")
+        (string-append "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath="
+                       (assoc-ref %outputs "out") "/lib")
+        (string-append "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath="
+                       (assoc-ref %outputs "out") "/lib")
+
+        ;; Configuration aborts if no generator format is set
+        "-DCPACK_GENERATOR=TGZ"
+
+        ;; Configuration attempts to guess the distribution with Python.
+        "-DIRODS_LINUX_DISTRIBUTION_NAME=guix"
+        "-DIRODS_LINUX_DISTRIBUTION_VERSION_MAJOR=1"
+
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_CLANG="
+                       (assoc-ref %build-inputs "clang"))
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_CLANG_RUNTIME="
+                       (assoc-ref %build-inputs "clang-runtime"))
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_CPPZMQ="
+                       (assoc-ref %build-inputs "cppzmq"))
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_ARCHIVE="
+                       (assoc-ref %build-inputs "libarchive"))
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_AVRO="
+                       (assoc-ref %build-inputs "avro-cpp"))
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_BOOST="
+                       (assoc-ref %build-inputs "boost"))
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_ZMQ="
+                       (assoc-ref %build-inputs "zeromq"))
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_JSON="
+                       (assoc-ref %build-inputs "json"))
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_CATCH2="
+                       (assoc-ref %build-inputs "catch2"))
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_NANODBC="
+                       (assoc-ref %build-inputs "nanodbc"))
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_FMT="
+                       (assoc-ref %build-inputs "fmt")))
+
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'unset-Werror
+           (lambda _
+             ;; -Werror kills the build due to a comparison REQUIRE(errs.size() == err->len);
+             ;; in unit_tests/src/test_irods_lifetime_manager.cpp
+             (substitute* "CMakeLists.txt"
+               (("-Werror") ""))))
+         (add-after 'unpack 'remove-FHS-and-prefix-assumptions
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* '("CMakeLists.txt"
+                            "cmake/server.cmake"
+                            "cmake/development_library.cmake"
+                            "cmake/runtime_library.cmake")
+               (("usr/") ""))
+             (substitute* "lib/core/src/irods_default_paths.cpp"
+               (("path.append\\(\"usr\"\\)") "path")
+               (("path.remove_filename\\(\\).remove_filename\\(\\).remove_filename\\(\\)")
+                "path.remove_filename().remove_filename()"))
+             (substitute* "scripts/irods/paths.py"
+               (("'usr', 'lib', 'irods'") "'lib', 'irods'"))
+             (substitute* "scripts/irods/pypyodbc.py"
+               (("\"/usr/lib/libodbc.so\"")
+                (string-append (assoc-ref inputs "unixodbc") "/lib/libodbc.so")))))
+         (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((gcc (assoc-ref inputs  "gcc")))
+               (setenv "CPLUS_INCLUDE_PATH"
+                       (string-join
+                        (cons* (string-append (assoc-ref inputs "libcxx+libcxxabi")
+                                              "/include/c++/v1")
+                               (string-append (assoc-ref inputs "catch2")
+                                              "/include/catch2")
+                               (string-append (assoc-ref inputs "json")
+                                              "/include/nlohmann")
+                               ;; Hide GCC's C++ headers so that they do not interfere with
+                               ;; the Clang headers.
+                               (delete (string-append gcc "/include/c++")
+                                       (string-split (getenv "CPLUS_INCLUDE_PATH")
+                                                     #\:)))
+                        ":"))
+               (format #true
+                       "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
+                       (getenv "CPLUS_INCLUDE_PATH"))))))))
+    (inputs
+     `(("avro-cpp" ,(package
+                      (inherit avro-cpp-1.9)
+                      (arguments
+                       `(#:configure-flags
+                         '("-DCMAKE_CXX_COMPILER=clang++"
+                           "-DCMAKE_CXX_FLAGS=-stdlib=libc++"
+                           "-DCMAKE_EXE_LINKER_FLAGS=-lc++abi -lz")
+                         #:phases
+                         (modify-phases %standard-phases
+                           (add-after 'unpack 'chdir
+                             (lambda _ (chdir "lang/c++")))
+                           (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH
+                             (lambda* (#:key inputs #:allow-other-keys)
+                               (let ((gcc (assoc-ref inputs  "gcc")))
+                                 (setenv "CPLUS_INCLUDE_PATH"
+                                         (string-join
+                                          (cons* (string-append (assoc-ref inputs "libcxx+libcxxabi")
+                                                                "/include/c++/v1")
+                                                 ;; Hide GCC's C++ headers so that they do not interfere with
+                                                 ;; the Clang headers.
+                                                 (delete (string-append gcc "/include/c++")
+                                                         (string-split (getenv "CPLUS_INCLUDE_PATH")
+                                                                       #\:)))
+                                          ":"))
+                                 (format #true
+                                         "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
+                                         (getenv "CPLUS_INCLUDE_PATH"))))))))
+                      (inputs
+                       `(("boost" ,boost-for-irods)
+                         ("clang" ,clang-toolchain-6)
+                         ("libcxx+libcxxabi" ,libcxx+libcxxabi-6)
+                         ("libcxxabi" ,libcxxabi-6)
+                         ("snappy" ,snappy-with-clang6)
+                         ("zlib" ,zlib)))))
+       ("boost" ,boost-for-irods)
+       ("cppzmq" ,cppzmq)
+       ("fmt" ,fmt-for-irods)
+       ("json" ,json-modern-cxx)
+       ("libarchive" ,libarchive)
+       ("libcxxabi" ,libcxxabi-6) ; we need this for linking with -lc++abi
+       ("linux-pam" ,linux-pam)
+       ("mit-krb5" ,mit-krb5)
+       ("nanodbc" ,nanodbc-for-irods)
+       ("openssl" ,openssl)
+       ("python" ,python-wrapper)
+       ("unixodbc" ,unixodbc)
+       ("zeromq" ,zeromq)))
+    (native-inputs
+     `(("catch2" ,catch-framework2)
+       ("clang" ,clang-toolchain-6)
+       ("clang-runtime" ,clang-runtime-6)
+       ("libcxx+libcxxabi" ,libcxx+libcxxabi-6)))
+    (home-page "https://irods.org")
+    (synopsis "Data management software")
+    (description "The Integrated Rule-Oriented Data System (iRODS) is data
+management software.  iRODS virtualizes data storage resources, so users can
+take control of their data, regardless of where and on what device the data is
+stored.")
+    (license license:bsd-3)))
-- 
2.31.1





Information forwarded to guix-patches <at> gnu.org:
bug#47972; Package guix-patches. (Fri, 23 Apr 2021 14:33:05 GMT) Full text and rfc822 format available.

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

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 47972 <at> debbugs.gnu.org
Cc: Ricardo Wurmus <rekado <at> elephly.net>
Subject: [PATCH 6/6] gnu: Add irods-client-icommands.
Date: Fri, 23 Apr 2021 16:32:01 +0200
* gnu/packages/irods.scm (irods-client-icommands): New variable.
---
 gnu/packages/irods.scm | 137 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 137 insertions(+)

diff --git a/gnu/packages/irods.scm b/gnu/packages/irods.scm
index 75a58d97cb..e757c1d80a 100644
--- a/gnu/packages/irods.scm
+++ b/gnu/packages/irods.scm
@@ -20,10 +20,12 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages backup)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
@@ -34,6 +36,7 @@
   #:use-module (gnu packages linux)
   #:use-module (gnu packages llvm)
   #:use-module (gnu packages logging)
+  #:use-module (gnu packages man)
   #:use-module (gnu packages networking)
   #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages python)
@@ -198,3 +201,137 @@ management software.  iRODS virtualizes data storage resources, so users can
 take control of their data, regardless of where and on what device the data is
 stored.")
     (license license:bsd-3)))
+
+(define-public irods-client-icommands
+  (package
+    (name "irods-client-icommands")
+    (version "4.2.8")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/irods/irods_client_icommands")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "069n647p5ypf44gim8z26mwayg5lzgk7r9qyyqd8f9n7h0p4jxpn"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #false ; not clear how to run tests
+       #:configure-flags
+       (list
+        "-DCMAKE_BUILD_TYPE=Release"
+
+        ;; Configuration attempts to guess the distribution with Python.
+        "-DIRODS_LINUX_DISTRIBUTION_NAME=guix"
+        "-DIRODS_LINUX_DISTRIBUTION_VERSION_MAJOR=1"
+
+        (string-append "-DIRODS_DIR="
+                       (assoc-ref %build-inputs "irods")
+                       "/lib/irods/cmake")
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_CLANG="
+                       (assoc-ref %build-inputs "clang"))
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_CLANG_RUNTIME="
+                       (assoc-ref %build-inputs "clang-runtime"))
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_CPPZMQ="
+                       (assoc-ref %build-inputs "cppzmq"))
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_ARCHIVE="
+                       (assoc-ref %build-inputs "libarchive"))
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_AVRO="
+                       (assoc-ref %build-inputs "avro-cpp"))
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_BOOST="
+                       (assoc-ref %build-inputs "boost"))
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_ZMQ="
+                       (assoc-ref %build-inputs "zeromq"))
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_JSON="
+                       (assoc-ref %build-inputs "json"))
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_FMT="
+                       (assoc-ref %build-inputs "fmt")))
+
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'unset-Werror ;
+           (lambda _                           ;
+             ;; -Werror kills the build due to a deprecation warning
+             (substitute* "CMakeLists.txt" ;
+               (("-Werror") ""))))
+         (add-after 'unpack 'remove-/usr-prefix
+           (lambda _
+             (substitute* "CMakeLists.txt"
+               (("usr/") ""))))
+         (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((gcc (assoc-ref inputs  "gcc")))
+               (setenv "CPLUS_INCLUDE_PATH"
+                       (string-join
+                        (cons* (string-append (assoc-ref inputs "libcxx+libcxxabi")
+                                              "/include/c++/v1")
+                               (string-append (assoc-ref inputs "json")
+                                              "/include/nlohmann")
+                               ;; Hide GCC's C++ headers so that they do not interfere with
+                               ;; the Clang headers.
+                               (delete (string-append gcc "/include/c++")
+                                       (string-split (getenv "CPLUS_INCLUDE_PATH")
+                                                     #\:)))
+                        ":"))
+               (format #true
+                       "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
+                       (getenv "CPLUS_INCLUDE_PATH"))))))))
+    (inputs
+     `(("avro-cpp" ,(package
+                      (inherit avro-cpp-1.9)
+                      (arguments
+                       `(#:configure-flags
+                         '("-DCMAKE_CXX_COMPILER=clang++"
+                           "-DCMAKE_CXX_FLAGS=-stdlib=libc++"
+                           "-DCMAKE_EXE_LINKER_FLAGS=-lc++abi -lz")
+                         #:phases
+                         (modify-phases %standard-phases
+                           (add-after 'unpack 'chdir
+                             (lambda _ (chdir "lang/c++")))
+                           (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH
+                             (lambda* (#:key inputs #:allow-other-keys)
+                               (let ((gcc (assoc-ref inputs  "gcc")))
+                                 (setenv "CPLUS_INCLUDE_PATH"
+                                         (string-join
+                                          (cons* (string-append (assoc-ref inputs "libcxx+libcxxabi")
+                                                                "/include/c++/v1")
+                                                 ;; Hide GCC's C++ headers so that they do not interfere with
+                                                 ;; the Clang headers.
+                                                 (delete (string-append gcc "/include/c++")
+                                                         (string-split (getenv "CPLUS_INCLUDE_PATH")
+                                                                       #\:)))
+                                          ":"))
+                                 (format #true
+                                         "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
+                                         (getenv "CPLUS_INCLUDE_PATH"))))))))
+                      (inputs
+                       `(("boost" ,boost-for-irods)
+                         ("clang" ,clang-toolchain-6)
+                         ("libcxx+libcxxabi" ,libcxx+libcxxabi-6)
+                         ("libcxxabi" ,libcxxabi-6)
+                         ("snappy" ,snappy-with-clang6)
+                         ("zlib" ,zlib)))))
+       ("boost" ,boost-for-irods)
+       ("cppzmq" ,cppzmq)
+       ("fmt" ,fmt-for-irods)
+       ("irods" ,irods)
+       ("json" ,json-modern-cxx)
+       ("libarchive" ,libarchive)
+       ("libcxxabi" ,libcxxabi-6)     ; we need this for linking with -lc++abi
+       ("mit-krb5" ,mit-krb5)
+       ("openssl" ,openssl)
+       ("zeromq" ,zeromq)))
+    (native-inputs
+     `(("clang" ,clang-toolchain-6)
+       ("clang-runtime" ,clang-runtime-6)
+       ("libcxx+libcxxabi" ,libcxx+libcxxabi-6)
+       ("help2man" ,help2man)
+       ("which" ,which)))
+    (home-page "https://irods.org")
+    (synopsis "Data management software")
+    (description "The Integrated Rule-Oriented Data System (iRODS) is data
+management software.  iRODS virtualizes data storage resources, so users can
+take control of their data, regardless of where and on what device the data is
+stored.")
+    (license license:bsd-3)))
-- 
2.31.1





Information forwarded to guix-patches <at> gnu.org:
bug#47972; Package guix-patches. (Sat, 24 Apr 2021 11:03:01 GMT) Full text and rfc822 format available.

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

From: Maxime Devos <maximedevos <at> telenet.be>
To: Ricardo Wurmus <rekado <at> elephly.net>, 47972 <at> debbugs.gnu.org
Subject: Re: [bug#47972] [PATCH 1/6] gnu: Add boost-for-irods.
Date: Sat, 24 Apr 2021 13:02:11 +0200
[Message part 1 (text/plain, inline)]
Ricardo Wurmus schreef op vr 23-04-2021 om 16:31 [+0200]:
> *+;; Sadly, this is needed for irods.  It won't link with 1.69 or later.
> +(define-public boost-for-irods
> +    [...]
> +    (native-inputs
> +     `(("clang" ,clang-6)

> +       ("libcxx" ,libcxx+libcxxabi-6)
> +       ("libcxxabi" ,libcxxabi-6)
"libcxx" and "libcxxabi" look lik they should be in "inputs", but perhaps something
special is going on here.

> +       ("perl" ,perl)
> +       ("tcsh" ,tcsh)))
> +    (arguments
> +     `(#:tests? #f
> +       #:make-flags
> +       (list "threading=multi" "link=shared"
> +             "cxxflags=-stdlib=libc++"
> +             "--without-python"
> +
> +             ;; Set the RUNPATH to $libdir so that the libs find each other.
> +             (string-append "linkflags=-stdlib=libc++ -Wl,-rpath="
> +                            (assoc-ref %outputs "out") "/lib"))
> +       #:phases
> +       (modify-phases %standard-phases
> +         (delete 'bootstrap)
> +         (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (let ((gcc (assoc-ref inputs  "gcc")))

For cross-compilation, this should be (assoc-ref (or native-inputs inputs) "gcc").

> +               (setenv "CPLUS_INCLUDE_PATH"

Maybe you need to set "CROSS_CPLUS_INCLUDE_PATH" here instead, not sure though.

> +                       (string-join
> +                        (cons (string-append (assoc-ref inputs "libcxx")
> +                                             "/include/c++/v1")
> +                              ;; Hide GCC's C++ headers so that they do not interfere with
> +                              ;; the Clang headers.
> +                              (delete (string-append gcc "/include/c++")
> +                                      (string-split (getenv "CPLUS_INCLUDE_PATH")
> +                                                    #\:)))
> +                        ":"))
> +               (format #true
> +                       "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
> +                       (getenv "CPLUS_INCLUDE_PATH")))))
> +         (replace 'configure
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             (let ((icu (assoc-ref inputs "icu4c"))
> +                   (zlib (assoc-ref inputs "zlib"))
> +                   (out (assoc-ref outputs "out")))
> +               (substitute* '("libs/config/configure"
> +                              "libs/spirit/classic/phoenix/test/runtest.sh"
> +                              "tools/build/src/engine/execunix.c"
> +                              "tools/build/src/engine/Jambase"
> +                              "tools/build/src/engine/jambase.c")
> +                 (("/bin/sh") (which "sh")))

When cross-compiling, "which" looks in the 'native-inputs', and not 'inputs'.
For tools/**/*.c, you should use (string-append (assoc-ref inputs "bash") "/bin/sh")
or something like that.  If/when <https://issues.guix.gnu.org/47869> is merged,
you can write the simpler (which "sh" inputs) instead, but that's not (yet) the case.

> +
> +               (setenv "SHELL" (which "sh"))
> +               (setenv "CONFIG_SHELL" (which "sh"))
> +
> +               (invoke "./bootstrap.sh"
> +                       (string-append "--prefix=" out)
> +                       ;; Auto-detection looks for ICU only in traditional
> +                       ;; install locations.
> +                       (string-append "--with-icu=" icu)
> +                       "--with-toolset=clang"))))
> +         (replace 'build
> +           (lambda* (#:key inputs make-flags #:allow-other-keys)
> +             (let ((zlib (assoc-ref inputs "zlib")))

The ((zlib (assoc-ref ...))) binding seems unused here.

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#47972; Package guix-patches. (Thu, 10 Jun 2021 08:29:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludovic.courtes <at> inria.fr>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: 47972 <at> debbugs.gnu.org
Subject: Re: bug#47972: Add irods.
Date: Thu, 10 Jun 2021 10:28:21 +0200
Hi Ricardo,

Ricardo Wurmus <rekado <at> elephly.net> skribis:

> * gnu/packages/boost.scm (boost-for-irods): New variable.

[...]

> +;; Sadly, this is needed for irods.  It won't link with 1.69 or later.
> +(define-public boost-for-irods
> +  (package
> +    (name "boost-for-irods")
> +    (version "1.68.0")

For this and the other “for-irods” packages, how about:

  1. Inheriting from the original package (‘boost’ in this case), to at
     least avoid duplicating the synopsis, description, and license?

  2. Adding the ‘hidden?’ property, because they are not meant to be
     installed on their own?

Apart from that, it LGTM.

Thanks!

Ludo’.




Reply sent to Ricardo Wurmus <rekado <at> elephly.net>:
You have taken responsibility. (Mon, 14 Jun 2021 14:49:02 GMT) Full text and rfc822 format available.

Notification sent to Ricardo Wurmus <rekado <at> elephly.net>:
bug acknowledged by developer. (Mon, 14 Jun 2021 14:49:02 GMT) Full text and rfc822 format available.

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

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Ludovic Courtès <ludovic.courtes <at> inria.fr>
Cc: 47972-done <at> debbugs.gnu.org
Subject: Re: bug#47972: Add irods.
Date: Mon, 14 Jun 2021 16:48:29 +0200
Ludovic Courtès <ludovic.courtes <at> inria.fr> writes:

> Hi Ricardo,
>
> Ricardo Wurmus <rekado <at> elephly.net> skribis:
>
>> * gnu/packages/boost.scm (boost-for-irods): New variable.
>
> [...]
>
>> +;; Sadly, this is needed for irods.  It won't link with 1.69 
>> or later.
>> +(define-public boost-for-irods
>> +  (package
>> +    (name "boost-for-irods")
>> +    (version "1.68.0")
>
> For this and the other “for-irods” packages, how about:
>
>   1. Inheriting from the original package (‘boost’ in this 
>   case), to at
>      least avoid duplicating the synopsis, description, and 
>      license?
>
>   2. Adding the ‘hidden?’ property, because they are not meant 
>   to be
>      installed on their own?

Done.

I also addressed what I could of Maxime’s comments.  Thank you.

I split out the package variant of avro-cpp that is used by both 
irods packages and pushed the patch series to the “master” branch.


-- 
Ricardo




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 13 Jul 2021 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 258 days ago.

Previous Next


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