guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#47972] [PATCH 1/6] gnu: Add boost-for-irods.


From: Maxime Devos
Subject: [bug#47972] [PATCH 1/6] gnu: Add boost-for-irods.
Date: Sat, 24 Apr 2021 13:02:11 +0200
User-agent: Evolution 3.34.2

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.

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]