Message ID | 20220314093550.16580-2-mail@brendan.scot |
---|---|
State | Accepted |
Headers | show |
Series | [bug#54337,v2,1/3] gnu: crypto++: Update to 8.6.0. | expand |
Context | Check | Description |
---|---|---|
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/applying patch | success | View Laminar job |
cbaines/issue | success | View issue |
Hi, 'Brendan Tildesley <mail@brendan.scot> skribis: > From: Brendan Tildesley <mail@brendan.scot> > > * gnu/packages/boost.scm (boost-for-cryfs): New variable. Since > updating boost would resulting in building 1000s of rebuilds, add a > temporary variant to fixing a missing import resulting in "error: > 'transform' is not a member of 'std'" when building cryfs. See: > https://github.com/boostorg/process/commit/e08374ed95ac33865bda40602c94909e7cd9607f > > * gnu/packages/patches/boost-wchar-include-algorithm.patch: New > file. > * gnu/local.mk: Reference patch. [...] > +(define-public boost-for-cryfs > + ;; This patch applies for boost 1.77. Should not be needed in later releases. > + ;; See: https://github.com/boostorg/process/commit/e08374ed95ac33865bda40602c94909e7cd9607f > + (package/inherit boost > + (name "boost-for-cryfs") > + (source (origin > + (inherit (package-source boost)) > + (patches (search-patches "boost-wchar-include-algorithm.patch")))))) > + > ;; Sadly, this is needed for irods. It won't link with 1.69 or later. > (define-public boost-for-irods > (package > diff --git a/gnu/packages/patches/boost-wchar-include-algorithm.patch b/gnu/packages/patches/boost-wchar-include-algorithm.patch > new file mode 100644 > index 0000000000..c174dc5cd2 > --- /dev/null > +++ b/gnu/packages/patches/boost-wchar-include-algorithm.patch > @@ -0,0 +1,11 @@ > +--- a/boost/process/detail/traits/wchar_t.hpp > ++++ b/boost/process/detail/traits/wchar_t.hpp > +@@ -12,6 +12,8 @@ > + #include <boost/process/detail/traits/env.hpp> > + #include <boost/process/locale.hpp> > + > ++#include <algorithm> ‘guix lint’ must complain that this patch lacks a comment at the top. :-) Since this affect only cryfs, and since it’s just a missing include, I wonder if we could instead add “#include <algorithm>” in the cryfs source file(s) that include(s) Boost headers? That way, we wouldn’t need an extra Boost build. Thoughts? Ludo’.
> On 03/15/2022 9:14 AM Ludovic Courtès <ludo@gnu.org> wrote: ... > Since this affect only cryfs, and since it’s just a missing include, I > wonder if we could instead add “#include <algorithm>” in the cryfs > source file(s) that include(s) Boost headers? That way, we wouldn’t > need an extra Boost build. > > Thoughts? > Happy to do that but I don't understand where to put the includes. can you see from this: RandomDataBuffer.cpp In file included from /gnu/store/f5l9m0dspdjxspdrnvfs4p0rncdhyigf-boost-1.77.0/include/boost/process/detail/basic_cmd.hpp:14, from /gnu/store/f5l9m0dspdjxspdrnvfs4p0rncdhyigf-boost-1.77.0/include/boost/process/args.hpp:33, from /gnu/store/f5l9m0dspdjxspdrnvfs4p0rncdhyigf-boost-1.77.0/include/boost/process.hpp:22, from /tmp/guix-build-cryfs-0.11.2.drv-0/src/cpp-utils/process/subprocess.cpp:6: /gnu/store/f5l9m0dspdjxspdrnvfs4p0rncdhyigf-boost-1.77.0/include/boost/process/detail/traits/wchar_t.hpp: In static member function ‘static std::vector<std::__cxx11::basic_string<wchar_t> > boost::process::detail::char_converter<wchar_t, std::vector<std::__cxx11::basic_string<char> > >::conv(const std::vector<std::__cxx11::basic_string<char> >&)’: /gnu/store/f5l9m0dspdjxspdrnvfs4p0rncdhyigf-boost-1.77.0/include/boost/process/detail/traits/wchar_t.hpp:150:14: error: ‘transform’ is not a member of ‘std’ 150 | std::transform(in.begin(), in.end(), ret.begin(), | ^~~~~~~~~ /gnu/store/f5l9m0dspdjxspdrnvfs4p0rncdhyigf-boost-1.77.0/include/boost/process/detail/traits/wchar_t.hpp: In static member function ‘static std::vector<std::__cxx11::basic_string<wchar_t> > boost::process::detail::char_converter<wchar_t, std::initializer_list<std::__cxx11::basic_string<char> > >::conv(const std::initializer_list<std::__cxx11::basic_string<char> >&)’: /gnu/store/f5l9m0dspdjxspdrnvfs4p0rncdhyigf-boost-1.77.0/include/boost/process/detail/traits/wchar_t.hpp:165:14: error: ‘transform’ is not a member of ‘std’ 165 | std::transform(in.begin(), in.end(), ret.begin(), | ^~~~~~~~~ /gnu/store/f5l9m0dspdjxspdrnvfs4p0rncdhyigf-boost-1.77.0/include/boost/process/detail/traits/wchar_t.hpp: In static member function ‘static std::vector<std::__cxx11::basic_string<wchar_t> > boost::process::detail::char_converter<wchar_t, std::vector<char*> >::conv(const std::vector<char*>&)’: /gnu/store/f5l9m0dspdjxspdrnvfs4p0rncdhyigf-boost-1.77.0/include/boost/process/detail/traits/wchar_t.hpp:180:14: error: ‘transform’ is not a member of ‘std’ 180 | std::transform(in.begin(), in.end(), ret.begin(), | ^~~~~~~~~ /gnu/store/f5l9m0dspdjxspdrnvfs4p0rncdhyigf-boost-1.77.0/include/boost/process/detail/traits/wchar_t.hpp: In static member function ‘static std::vector<std::__cxx11::basic_string<wchar_t> > boost::process::detail::char_converter<wchar_t, std::initializer_list<char*> >::conv(const std::initializer_list<char*>&)’: /gnu/store/f5l9m0dspdjxspdrnvfs4p0rncdhyigf-boost-1.77.0/include/boost/process/detail/traits/wchar_t.hpp:197:14: error: ‘transform’ is not a member of ‘std’ 197 | std::transform(in.begin(), in.end(), ret.begin(), | ^~~~~~~~~ /gnu/store/f5l9m0dspdjxspdrnvfs4p0rncdhyigf-boost-1.77.0/include/boost/process/detail/traits/wchar_t.hpp: In static member function ‘static std::vector<std::__cxx11::basic_string<char> > boost::process::detail::char_converter<char, std::vector<std::__cxx11::basic_string<wchar_t> > >::conv(const std::vector<std::__cxx11::basic_string<wchar_t> >&)’: /gnu/store/f5l9m0dspdjxspdrnvfs4p0rncdhyigf-boost-1.77.0/include/boost/process/detail/traits/wchar_t.hpp:214:14: error: ‘transform’ is not a member of ‘std’ 214 | std::transform(in.begin(), in.end(), ret.begin(), | ^~~~~~~~~ /gnu/store/f5l9m0dspdjxspdrnvfs4p0rncdhyigf-boost-1.77.0/include/boost/process/detail/traits/wchar_t.hpp: In static member function ‘static std::vector<std::__cxx11::basic_string<char> > boost::process::detail::char_converter<char, std::initializer_list<std::__cxx11::basic_string<wchar_t> > >::conv(const std::initializer_list<std::__cxx11::basic_string<wchar_t> >&)’: /gnu/store/f5l9m0dspdjxspdrnvfs4p0rncdhyigf-boost-1.77.0/include/boost/process/detail/traits/wchar_t.hpp:229:14: error: ‘transform’ is not a member of ‘std’ 229 | std::transform(in.begin(), in.end(), ret.begin(), | ^~~~~~~~~ /gnu/store/f5l9m0dspdjxspdrnvfs4p0rncdhyigf-boost-1.77.0/include/boost/process/detail/traits/wchar_t.hpp: In static member function ‘static std::vector<std::__cxx11::basic_string<char> > boost::process::detail::char_converter<char, std::vector<wchar_t*> >::conv(const std::vector<wchar_t*>&)’: /gnu/store/f5l9m0dspdjxspdrnvfs4p0rncdhyigf-boost-1.77.0/include/boost/process/detail/traits/wchar_t.hpp:244:14: error: ‘transform’ is not a member of ‘std’ 244 | std::transform(in.begin(), in.end(), ret.begin(), | ^~~~~~~~~ /gnu/store/f5l9m0dspdjxspdrnvfs4p0rncdhyigf-boost-1.77.0/include/boost/process/detail/traits/wchar_t.hpp: In static member function ‘static std::vector<std::__cxx11::basic_string<char> > boost::process::detail::char_converter<char, std::initializer_list<wchar_t*> >::conv(const std::initializer_list<wchar_t*>&)’: /gnu/store/f5l9m0dspdjxspdrnvfs4p0rncdhyigf-boost-1.77.0/include/boost/process/detail/traits/wchar_t.hpp:261:14: error: ‘transform’ is not a member of ‘std’ 261 | std::transform(in.begin(), in.end(), ret.begin(), | ^~~~~~~~~ [ 36%] Building CXX object src/cpp-utils/CMakeFiles/cpp-utils.dir/random/RandomGenerator.cpp.o
Brendan Tildesley schreef op di 15-03-2022 om 14:07 [+0100]: > Happy to do that but I don't understand where to put the includes. can you see from this: > > RandomDataBuffer.cpp > In file included from /gnu/store/f5l9m0dspdjxspdrnvfs4p0rncdhyigf-boost-1.77.0/include/boost/process/detail/basic_cmd.hpp:14, > from /gnu/store/f5l9m0dspdjxspdrnvfs4p0rncdhyigf-boost-1.77.0/include/boost/process/args.hpp:33, > from /gnu/store/f5l9m0dspdjxspdrnvfs4p0rncdhyigf-boost-1.77.0/include/boost/process.hpp:22, > from /tmp/guix-build-cryfs-0.11.2.drv-0/src/cpp-utils/process/subprocess.cpp:6: [...] In subprocess.cpp. > [ 36%] Building CXX object src/cpp-utils/CMakeFiles/cpp-utils.dir/random/RandomGenerator.cpp.o Looks like parallel compilation is enabled, to investigate issues like these, I recommend adding "--cores=1" to "guix build". Greetings, Maxime.
diff --git a/gnu/local.mk b/gnu/local.mk index 484757b207..465f5ae96d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -915,6 +915,7 @@ dist_patch_DATA = \ %D%/packages/patches/binutils-CVE-2021-45078.patch \ %D%/packages/patches/bloomberg-bde-cmake-module-path.patch \ %D%/packages/patches/bloomberg-bde-tools-fix-install-path.patch \ + %D%/packages/patches/boost-wchar-include-algorithm.patch \ %D%/packages/patches/bpftrace-disable-bfd-disasm.patch \ %D%/packages/patches/byobu-writable-status.patch \ %D%/packages/patches/bubblewrap-fix-locale-in-tests.patch \ diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm index b53b1f4257..b6f0c1fc22 100644 --- a/gnu/packages/boost.scm +++ b/gnu/packages/boost.scm @@ -19,6 +19,7 @@ ;;; Copyright © 2021 Franck Pérignon <franck.perignon@univ-grenoble-alpes.fr> ;;; Copyright © 2021 Greg Hogan <code@greghogan.com> ;;; Copyright © 2021 Aleksandr Vityazev <avityazev@posteo.org> +;;; Copyright © 2022 Brendan Tildesley <mail@brendan.scot> ;;; ;;; This file is part of GNU Guix. ;;; @@ -68,6 +69,7 @@ (define (boost-patch name version hash) (define-public boost (package (name "boost") + ;; Note: consider removing boost-1.77/fixed when updating boost to 1.78 or newer. (version "1.77.0") (source (origin (method url-fetch) @@ -193,6 +195,15 @@ (define-public boost (license (license:x11-style "https://www.boost.org/LICENSE_1_0.txt" "Some components have other similar licences.")))) +(define-public boost-for-cryfs + ;; This patch applies for boost 1.77. Should not be needed in later releases. + ;; See: https://github.com/boostorg/process/commit/e08374ed95ac33865bda40602c94909e7cd9607f + (package/inherit boost + (name "boost-for-cryfs") + (source (origin + (inherit (package-source boost)) + (patches (search-patches "boost-wchar-include-algorithm.patch")))))) + ;; Sadly, this is needed for irods. It won't link with 1.69 or later. (define-public boost-for-irods (package diff --git a/gnu/packages/patches/boost-wchar-include-algorithm.patch b/gnu/packages/patches/boost-wchar-include-algorithm.patch new file mode 100644 index 0000000000..c174dc5cd2 --- /dev/null +++ b/gnu/packages/patches/boost-wchar-include-algorithm.patch @@ -0,0 +1,11 @@ +--- a/boost/process/detail/traits/wchar_t.hpp ++++ b/boost/process/detail/traits/wchar_t.hpp +@@ -12,6 +12,8 @@ + #include <boost/process/detail/traits/env.hpp> + #include <boost/process/locale.hpp> + ++#include <algorithm> ++ + namespace boost { namespace process { namespace detail { + + //template
From: Brendan Tildesley <mail@brendan.scot> * gnu/packages/boost.scm (boost-for-cryfs): New variable. Since updating boost would resulting in building 1000s of rebuilds, add a temporary variant to fixing a missing import resulting in "error: 'transform' is not a member of 'std'" when building cryfs. See: https://github.com/boostorg/process/commit/e08374ed95ac33865bda40602c94909e7cd9607f * gnu/packages/patches/boost-wchar-include-algorithm.patch: New file. * gnu/local.mk: Reference patch. . --- gnu/local.mk | 1 + gnu/packages/boost.scm | 11 +++++++++++ .../patches/boost-wchar-include-algorithm.patch | 11 +++++++++++ 3 files changed, 23 insertions(+) create mode 100644 gnu/packages/patches/boost-wchar-include-algorithm.patch