all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#51592] [PATCH 0/2] gnu: Add bloomberg-bde.
@ 2021-11-03 19:12 Greg Hogan
  2021-12-01 15:50 ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Greg Hogan @ 2021-11-03 19:12 UTC (permalink / raw)
  To: 51592


[-- Attachment #1.1: Type: text/plain, Size: 84 bytes --]

This patchset adds Bloomberg's BDE C++ library as well as the bde-tools
dependency.

[-- Attachment #1.2: Type: text/html, Size: 109 bytes --]

[-- Attachment #2: 0002-gnu-Add-bloomberg-bde.patch --]
[-- Type: application/octet-stream, Size: 5981 bytes --]

From 9fc2c247d937d587c54b634ec6fcca2b77e22f37 Mon Sep 17 00:00:00 2001
From: Greg Hogan <code@greghogan.com>
Date: Wed, 3 Nov 2021 15:22:19 +0000
Subject: [PATCH 2/2] gnu: Add bloomberg-bde.

* gnu/packages/cpp.scm (bloomberg-bde): New variable.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/cpp.scm                          | 72 ++++++++++++++++++-
 .../bloomberg-bde-cmake-module-path.patch     | 16 +++++
 3 files changed, 88 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/bloomberg-bde-cmake-module-path.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 337835f5cd..20786fcf71 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -923,6 +923,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/blender-2.79-oiio2.patch			\
   %D%/packages/patches/blender-2.79-python-3.7-fix.patch	\
   %D%/packages/patches/blender-2.79-python-3.8-fix.patch	\
+  %D%/packages/patches/bloomberg-bde-cmake-module-path.patch	\
   %D%/packages/patches/bloomberg-bde-tools-fix-install-path.patch	\
   %D%/packages/patches/bpftrace-disable-bfd-disasm.patch	\
   %D%/packages/patches/byobu-writable-status.patch		\
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index c3dac6a980..3fb913619a 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -72,7 +72,9 @@ (define-module (gnu packages cpp)
   #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages web)
-  #:use-module (gnu packages xml))
+  #:use-module (gnu packages xml)
+  #:use-module (ice-9 match))
+
 
 (define-public range-v3
   (package
@@ -1426,3 +1428,71 @@ (define-public bloomberg-bde-tools
        "This package provides the cmake imports needed to build bloomberg-bde.")
       (home-page "https://github.com/bloomberg/bde-tools")
       (license license:asl2.0))))
+
+(define-public bloomberg-bde
+  (let ((commit "e4f76793cfae8bab9a698316a9cd6f8e96487100"))
+    (package
+      (name "bloomberg-bde")
+      ; Recent releases are not tagged so commit must be used for checkout.
+      (version "3.93.0.0")
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/bloomberg/bde")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "18fkpxl210z336kw9wdv3jzwxyizzq9vvymc2n4alvb3fi50srr8"))
+                (patches
+                 (search-patches
+                  "bloomberg-bde-cmake-module-path.patch"))
+                (snippet
+                 `(begin
+                    ; Delete failing tests.
+                    (for-each
+                     delete-file
+                     (list "groups/bal/ball/ball_fileobserver2.t.cpp"
+                           "groups/bal/ball/ball_recordstringformatter.t.cpp"
+                           "groups/bal/balst/balst_stacktraceutil.t.cpp"
+                           "groups/bdl/bdlmt/bdlmt_eventscheduler.t.cpp"
+                           "groups/bdl/bdls/bdls_filesystemutil.t.cpp"
+                           "groups/bsl/bslh/bslh_hashpair.t.cpp"
+                           "groups/bsl/bsls/bsls_platform.t.cpp"
+                           "groups/bsl/bsls/bsls_stopwatch.t.cpp"))
+                    #t))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:parallel-tests? #f           ; Test parallelism fails inconsistently.
+         ; Set UFID to build shared libraries. Flag descriptions can be found at
+         ; https://bloomberg.github.io/bde-tools/reference/bde_repo.html#ufid
+         #:configure-flags ,(match %current-system
+            ((or "i686-linux" "armhf-linux")
+             ''("-DUFID=opt_dbg_exc_mt_32_shr_cpp17"))
+            (_
+             ''("-DUFID=opt_dbg_exc_mt_64_shr_cpp17")))
+         #:phases
+         (modify-phases %standard-phases
+           ; Explicitly build tests separate from the main build.
+           (add-after 'build 'build-tests
+             (lambda* (#:key make-flags #:allow-other-keys)
+               (apply invoke "make" "all.t"
+                 `(,@(if #:parallel-build?
+                         `("-j" ,(number->string (parallel-job-count)))
+                         '())
+                 ,@make-flags)))))))
+      (native-inputs
+       `(("bloomberg-bde-tools" ,bloomberg-bde-tools)
+         ("pkg-config" ,pkg-config)
+         ; Use python-2 due to hard-coded 'python' executable in
+         ; bloomberg-bde-tools; bug report and patch submitted to
+         ; https://github.com/bloomberg/bde-tools/issues/38
+         ("python" ,python-2)))
+      (synopsis "Foundational C++ libraries used at Bloomberg")
+      (description
+       "The BDE Development Environment libraries provide an enhanced
+implementation of STL containers, vocabulary types for representing common
+concepts (like dates and times), and building blocks for developing
+multi-threaded applications and network applications.")
+      (home-page "https://github.com/bloomberg/bde")
+      (license license:asl2.0))))
diff --git a/gnu/packages/patches/bloomberg-bde-cmake-module-path.patch b/gnu/packages/patches/bloomberg-bde-cmake-module-path.patch
new file mode 100644
index 0000000000..b08ca5eac0
--- /dev/null
+++ b/gnu/packages/patches/bloomberg-bde-cmake-module-path.patch
@@ -0,0 +1,16 @@
+This package requires CMAKE_MODULE_PATH be set by the calling process. This
+patch uses the CMAKE_PREFIX_PATH passed from Guix as the search path for
+locating the bloomberg-bde-tools CMake modules.
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,8 +1,6 @@
+ cmake_minimum_required(VERSION 3.15)
+ 
+-if (NOT CMAKE_MODULE_PATH)
+-    message(FATAL "Please specify path to BDE cmake modules.")
+-endif()
++string(REPLACE ":" "cmake/;" CMAKE_MODULE_PATH "$ENV{CMAKE_PREFIX_PATH}cmake/")
+ 
+ get_filename_component(repoName ${CMAKE_CURRENT_LIST_DIR} NAME)
+ 
-- 
2.33.1


[-- Attachment #3: 0001-gnu-Add-bloomberg-bde-tools.patch --]
[-- Type: application/octet-stream, Size: 6913 bytes --]

From 66419a1baa68685047085114875ec3c3460289c6 Mon Sep 17 00:00:00 2001
From: Greg Hogan <code@greghogan.com>
Date: Wed, 3 Nov 2021 15:20:51 +0000
Subject: [PATCH 1/2] gnu: Add bloomberg-bde-tools.

* gnu/packages/cpp.scm (bloomberg-bde-tools): New variable.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/cpp.scm                          | 28 ++++++
 ...bloomberg-bde-tools-fix-install-path.patch | 95 +++++++++++++++++++
 3 files changed, 124 insertions(+)
 create mode 100644 gnu/packages/patches/bloomberg-bde-tools-fix-install-path.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 3a849ed2b0..337835f5cd 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -923,6 +923,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/blender-2.79-oiio2.patch			\
   %D%/packages/patches/blender-2.79-python-3.7-fix.patch	\
   %D%/packages/patches/blender-2.79-python-3.8-fix.patch	\
+  %D%/packages/patches/bloomberg-bde-tools-fix-install-path.patch	\
   %D%/packages/patches/bpftrace-disable-bfd-disasm.patch	\
   %D%/packages/patches/byobu-writable-status.patch		\
   %D%/packages/patches/cabal-install-base16-bytestring1.0.patch		\
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 643b85a8db..c3dac6a980 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -41,6 +41,7 @@ (define-module (gnu packages cpp)
   #:use-module (guix utils)
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module (guix modules)
@@ -1398,3 +1399,30 @@ (define-public simdjson
 validation.")
     (home-page "https://github.com/simdjson/simdjson")
     (license license:asl2.0)))
+
+(define-public bloomberg-bde-tools
+  (let ((commit "1112c5dd4b22aa968be6881bf3cd6b5ddd85f535"))
+    (package
+      (name "bloomberg-bde-tools")
+      ; Recent releases are not tagged so commit must be used for checkout.
+      (version "3.93.0.0")
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/bloomberg/bde-tools")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0p3vq5rjahiz5bh5f10swyng2dylfylwrqdgfqask0yxvlb3g83f"))
+                (patches
+                 (search-patches
+                  "bloomberg-bde-tools-fix-install-path.patch"))))
+      (build-system copy-build-system)
+      ; Unable to be an inline dependency of bloomberg-bde due to patch.
+      (properties '((hidden? . #t)))
+      (synopsis "Tools for developing and building libraries modeled on BDE")
+      (description
+       "This package provides the cmake imports needed to build bloomberg-bde.")
+      (home-page "https://github.com/bloomberg/bde-tools")
+      (license license:asl2.0))))
diff --git a/gnu/packages/patches/bloomberg-bde-tools-fix-install-path.patch b/gnu/packages/patches/bloomberg-bde-tools-fix-install-path.patch
new file mode 100644
index 0000000000..a80c6c3ea3
--- /dev/null
+++ b/gnu/packages/patches/bloomberg-bde-tools-fix-install-path.patch
@@ -0,0 +1,95 @@
+Install shared libraries into "lib". Do not create symbolic links to static
+libraries since only shared libraries are built.
+
+--- a/cmake/layers/ufid.cmake
++++ b/cmake/layers/ufid.cmake
+@@ -6,10 +6,7 @@ bde_prefixed_override(ufid project_setup_install_opts)
+ function(ufid_project_setup_install_opts proj)
+     bde_assert_no_extra_args()
+ 
+-    set(libPath "bin/so")
+-    if (${bde_ufid_is_64}) 
+-        string(APPEND libPath "/64")
+-    endif()
++    set(libPath "lib")
+ 
+     bde_struct_create(
+         installOpts
+@@ -86,13 +83,6 @@ function(bde_create_ufid_symlink uor installOpts)
+             "${symlinkPrefix}/${symlinkDir}/${libLinkName}"
+         )
+ 
+-        install(
+-            CODE
+-                "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \
+-                ${symlinkVal} ${symlinkFile})"
+-            COMPONENT "${component}-symlinks"
+-        )
+-
+         # This code creates compatibility symlinks
+         # WARNING: This is custom logic that has nothing to do with our build system.
+         # Some external build systems expect to find a variaty of ufids in dpkg.
+@@ -110,14 +100,6 @@ function(bde_create_ufid_symlink uor installOpts)
+                 symlinkFile
+                 "${symlinkPrefix}/${symlinkDir}/${libLinkName}"
+             )
+-
+-            # IMPORTANT: symlinkFile is the same as above!
+-            install(
+-                CODE
+-                    "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \
+-                    ${symlinkVal} ${symlinkFile})"
+-                COMPONENT "${component}-symlinks"
+-            )
+         endif()
+ 
+         if (${bde_ufid_is_pic})
+@@ -134,14 +116,6 @@ function(bde_create_ufid_symlink uor installOpts)
+                 "${symlinkPrefix}/${symlinkDir}/${libLinkName}"
+             )
+ 
+-            # IMPORTANT: symlinkFile is the same as above!
+-            install(
+-                CODE
+-                    "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \
+-                    ${symlinkVal} ${symlinkFile})"
+-                COMPONENT "${component}-pic-symlink-hack"
+-            )
+-
+             # And another one for "64" - remove "pic", add "64"
+             if (${bde_ufid_is_64})
+                 set(temp_ufid_flags ${install_ufid_flags})
+@@ -157,14 +131,6 @@ function(bde_create_ufid_symlink uor installOpts)
+                     symlinkFile
+                     "${symlinkPrefix}/${symlinkDir}/${libLinkName}"
+                 )
+-
+-                # IMPORTANT: symlinkFile is the same as above!
+-                install(
+-                    CODE
+-                        "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \
+-                        ${symlinkVal} ${symlinkFile})"
+-                    COMPONENT "${component}-pic-symlink-hack"
+-                )
+             endif()
+         endif()
+ 
+@@ -177,18 +143,5 @@ function(bde_create_ufid_symlink uor installOpts)
+             symlinkReleaseFile
+             "${symlinkPrefix}/${symlinkDir}/${libReleaseLinkName}"
+         )
+-        install(
+-            CODE
+-                "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \
+-                ${symlinkVal} ${symlinkReleaseFile})"
+-            COMPONENT "${component}-release-symlink"
+-        )
+-        install(
+-            CODE
+-                "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \
+-                ${symlinkVal} ${symlinkReleaseFile})"
+-            COMPONENT "release-symlink"
+-            EXCLUDE_FROM_ALL
+-        )
+     endif()
+ endfunction()
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#51592] [PATCH 0/2] gnu: Add bloomberg-bde.
  2021-11-03 19:12 [bug#51592] [PATCH 0/2] gnu: Add bloomberg-bde Greg Hogan
@ 2021-12-01 15:50 ` Ludovic Courtès
  2021-12-21  1:26   ` Greg Hogan
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2021-12-01 15:50 UTC (permalink / raw)
  To: Greg Hogan; +Cc: 51592

Hi,

Greg Hogan <code@greghogan.com> skribis:

> From 9fc2c247d937d587c54b634ec6fcca2b77e22f37 Mon Sep 17 00:00:00 2001
> From: Greg Hogan <code@greghogan.com>
> Date: Wed, 3 Nov 2021 15:22:19 +0000
> Subject: [PATCH 2/2] gnu: Add bloomberg-bde.
>
> * gnu/packages/cpp.scm (bloomberg-bde): New variable.

[...]

> +      (name "bloomberg-bde")
> +      ; Recent releases are not tagged so commit must be used for checkout.
> +      (version "3.93.0.0")
> +      (source (origin
> +                (method git-fetch)
> +                (uri (git-reference
> +                      (url "https://github.com/bloomberg/bde")
> +                      (commit commit)))

There are several bundled code bases, including pcre2, which is already
packaged.

Could you look into unbundling at least pcre2, and ideally all of these?
You can remove ‘thirdparty/’ subdirectories from the snippet.

If some of them are too hard to unbundle, we can leave a FIXME and
address them later.

Nitpick: Please use two semicolons to introduce comments that are on a
line of their own.  :-)

Thanks in advance, and apologies for the delay!

Ludo’.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#51592] [PATCH 0/2] gnu: Add bloomberg-bde.
  2021-12-01 15:50 ` Ludovic Courtès
@ 2021-12-21  1:26   ` Greg Hogan
  2022-02-04 21:23     ` Greg Hogan
  0 siblings, 1 reply; 5+ messages in thread
From: Greg Hogan @ 2021-12-21  1:26 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 51592


[-- Attachment #1.1: Type: text/plain, Size: 1663 bytes --]

On Wed, Dec 1, 2021 at 10:50 AM Ludovic Courtès <ludo@gnu.org> wrote:

> Hi,
>
> Greg Hogan <code@greghogan.com> skribis:
>
> > From 9fc2c247d937d587c54b634ec6fcca2b77e22f37 Mon Sep 17 00:00:00 2001
> > From: Greg Hogan <code@greghogan.com>
> > Date: Wed, 3 Nov 2021 15:22:19 +0000
> > Subject: [PATCH 2/2] gnu: Add bloomberg-bde.
> >
> > * gnu/packages/cpp.scm (bloomberg-bde): New variable.
>
> [...]
>
> > +      (name "bloomberg-bde")
> > +      ; Recent releases are not tagged so commit must be used for
> checkout.
> > +      (version "3.93.0.0")
> > +      (source (origin
> > +                (method git-fetch)
> > +                (uri (git-reference
> > +                      (url "https://github.com/bloomberg/bde")
> > +                      (commit commit)))
>
> There are several bundled code bases, including pcre2, which is already
> packaged.
>
> Could you look into unbundling at least pcre2, and ideally all of these?
> You can remove ‘thirdparty/’ subdirectories from the snippet.
>
> If some of them are too hard to unbundle, we can leave a FIXME and
> address them later.
>

I added a FIXME. It is noted that the third-party sources are modified.


> Nitpick: Please use two semicolons to introduce comments that are on a
> line of their own.  :-)
>

Fixed. Thanks for the reminder.


> Thanks in advance, and apologies for the delay!
>

In addition to rebasing against master and updating the inputs formatting,
I was able to switch the native-input dependency from python2 to python
since my simple patch was accepted upstream. Always nice to see that.


> Ludo’.
>

Greg

[-- Attachment #1.2: Type: text/html, Size: 2986 bytes --]

[-- Attachment #2: 0001-gnu-Add-bloomberg-bde-tools.patch --]
[-- Type: application/octet-stream, Size: 6915 bytes --]

From 7b16f7f69f4f500e6c2b5243a2f2bba3d0212c80 Mon Sep 17 00:00:00 2001
From: Greg Hogan <code@greghogan.com>
Date: Wed, 3 Nov 2021 15:20:51 +0000
Subject: [PATCH 1/2] gnu: Add bloomberg-bde-tools.

* gnu/packages/cpp.scm (bloomberg-bde-tools): New variable.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/cpp.scm                          | 28 ++++++
 ...bloomberg-bde-tools-fix-install-path.patch | 95 +++++++++++++++++++
 3 files changed, 124 insertions(+)
 create mode 100644 gnu/packages/patches/bloomberg-bde-tools-fix-install-path.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index d20a51070b..9bafada1fa 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -913,6 +913,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/blender-2.79-oiio2.patch			\
   %D%/packages/patches/blender-2.79-python-3.7-fix.patch	\
   %D%/packages/patches/blender-2.79-python-3.8-fix.patch	\
+  %D%/packages/patches/bloomberg-bde-tools-fix-install-path.patch	\
   %D%/packages/patches/bpftrace-disable-bfd-disasm.patch	\
   %D%/packages/patches/byobu-writable-status.patch		\
   %D%/packages/patches/cabal-install-base16-bytestring1.0.patch		\
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index c3b6403e02..5b3180e326 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -45,6 +45,7 @@ (define-module (gnu packages cpp)
   #:use-module (guix utils)
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module (guix modules)
@@ -1450,3 +1451,30 @@ (define-public simdjson
 validation.")
     (home-page "https://github.com/simdjson/simdjson")
     (license license:asl2.0)))
+
+(define-public bloomberg-bde-tools
+  (let ((commit "3ff522692e87e5350889d7d3c6b7a7b3743f6bed"))
+    (package
+      (name "bloomberg-bde-tools")
+      ;; Recent releases are not tagged so commit must be used for checkout.
+      (version "3.96.0.0")
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/bloomberg/bde-tools")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0ckkykcbajg56nn7l4qwlj3ypyb09r31qjl0gv9lpmnyg9lqsbz4"))
+                (patches
+                 (search-patches
+                  "bloomberg-bde-tools-fix-install-path.patch"))))
+      (build-system copy-build-system)
+      ;; Unable to be an inline dependency of bloomberg-bde due to patch.
+      (properties '((hidden? . #t)))
+      (synopsis "Tools for developing and building libraries modeled on BDE")
+      (description
+       "This package provides the cmake imports needed to build bloomberg-bde.")
+      (home-page "https://github.com/bloomberg/bde-tools")
+      (license license:asl2.0))))
diff --git a/gnu/packages/patches/bloomberg-bde-tools-fix-install-path.patch b/gnu/packages/patches/bloomberg-bde-tools-fix-install-path.patch
new file mode 100644
index 0000000000..a80c6c3ea3
--- /dev/null
+++ b/gnu/packages/patches/bloomberg-bde-tools-fix-install-path.patch
@@ -0,0 +1,95 @@
+Install shared libraries into "lib". Do not create symbolic links to static
+libraries since only shared libraries are built.
+
+--- a/cmake/layers/ufid.cmake
++++ b/cmake/layers/ufid.cmake
+@@ -6,10 +6,7 @@ bde_prefixed_override(ufid project_setup_install_opts)
+ function(ufid_project_setup_install_opts proj)
+     bde_assert_no_extra_args()
+ 
+-    set(libPath "bin/so")
+-    if (${bde_ufid_is_64}) 
+-        string(APPEND libPath "/64")
+-    endif()
++    set(libPath "lib")
+ 
+     bde_struct_create(
+         installOpts
+@@ -86,13 +83,6 @@ function(bde_create_ufid_symlink uor installOpts)
+             "${symlinkPrefix}/${symlinkDir}/${libLinkName}"
+         )
+ 
+-        install(
+-            CODE
+-                "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \
+-                ${symlinkVal} ${symlinkFile})"
+-            COMPONENT "${component}-symlinks"
+-        )
+-
+         # This code creates compatibility symlinks
+         # WARNING: This is custom logic that has nothing to do with our build system.
+         # Some external build systems expect to find a variaty of ufids in dpkg.
+@@ -110,14 +100,6 @@ function(bde_create_ufid_symlink uor installOpts)
+                 symlinkFile
+                 "${symlinkPrefix}/${symlinkDir}/${libLinkName}"
+             )
+-
+-            # IMPORTANT: symlinkFile is the same as above!
+-            install(
+-                CODE
+-                    "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \
+-                    ${symlinkVal} ${symlinkFile})"
+-                COMPONENT "${component}-symlinks"
+-            )
+         endif()
+ 
+         if (${bde_ufid_is_pic})
+@@ -134,14 +116,6 @@ function(bde_create_ufid_symlink uor installOpts)
+                 "${symlinkPrefix}/${symlinkDir}/${libLinkName}"
+             )
+ 
+-            # IMPORTANT: symlinkFile is the same as above!
+-            install(
+-                CODE
+-                    "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \
+-                    ${symlinkVal} ${symlinkFile})"
+-                COMPONENT "${component}-pic-symlink-hack"
+-            )
+-
+             # And another one for "64" - remove "pic", add "64"
+             if (${bde_ufid_is_64})
+                 set(temp_ufid_flags ${install_ufid_flags})
+@@ -157,14 +131,6 @@ function(bde_create_ufid_symlink uor installOpts)
+                     symlinkFile
+                     "${symlinkPrefix}/${symlinkDir}/${libLinkName}"
+                 )
+-
+-                # IMPORTANT: symlinkFile is the same as above!
+-                install(
+-                    CODE
+-                        "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \
+-                        ${symlinkVal} ${symlinkFile})"
+-                    COMPONENT "${component}-pic-symlink-hack"
+-                )
+             endif()
+         endif()
+ 
+@@ -177,18 +143,5 @@ function(bde_create_ufid_symlink uor installOpts)
+             symlinkReleaseFile
+             "${symlinkPrefix}/${symlinkDir}/${libReleaseLinkName}"
+         )
+-        install(
+-            CODE
+-                "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \
+-                ${symlinkVal} ${symlinkReleaseFile})"
+-            COMPONENT "${component}-release-symlink"
+-        )
+-        install(
+-            CODE
+-                "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \
+-                ${symlinkVal} ${symlinkReleaseFile})"
+-            COMPONENT "release-symlink"
+-            EXCLUDE_FROM_ALL
+-        )
+     endif()
+ endfunction()
-- 
2.34.0


[-- Attachment #3: 0002-gnu-Add-bloomberg-bde.patch --]
[-- Type: application/octet-stream, Size: 6337 bytes --]

From b04acfe967216a14a575aa006c51086533a1489f Mon Sep 17 00:00:00 2001
From: Greg Hogan <code@greghogan.com>
Date: Wed, 3 Nov 2021 15:22:19 +0000
Subject: [PATCH 2/2] gnu: Add bloomberg-bde.

* gnu/packages/cpp.scm (bloomberg-bde): New variable.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/cpp.scm                          | 75 ++++++++++++++++++-
 .../bloomberg-bde-cmake-module-path.patch     | 16 ++++
 3 files changed, 91 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/bloomberg-bde-cmake-module-path.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 9bafada1fa..a5a4d0f0ca 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -913,6 +913,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/blender-2.79-oiio2.patch			\
   %D%/packages/patches/blender-2.79-python-3.7-fix.patch	\
   %D%/packages/patches/blender-2.79-python-3.8-fix.patch	\
+  %D%/packages/patches/bloomberg-bde-cmake-module-path.patch	\
   %D%/packages/patches/bloomberg-bde-tools-fix-install-path.patch	\
   %D%/packages/patches/bpftrace-disable-bfd-disasm.patch	\
   %D%/packages/patches/byobu-writable-status.patch		\
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 5b3180e326..4a3da14a65 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -77,7 +77,8 @@ (define-module (gnu packages cpp)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages web)
-  #:use-module (gnu packages xml))
+  #:use-module (gnu packages xml)
+  #:use-module (ice-9 match))
 
 (define-public range-v3
   (package
@@ -1478,3 +1479,75 @@ (define-public bloomberg-bde-tools
        "This package provides the cmake imports needed to build bloomberg-bde.")
       (home-page "https://github.com/bloomberg/bde-tools")
       (license license:asl2.0))))
+
+(define-public bloomberg-bde
+  (let ((commit "b97be140bb581cba108bbb1e8db4d82ecb18a896"))
+    (package
+      (name "bloomberg-bde")
+      ;; Recent releases are not tagged so commit must be used for checkout.
+      (version "3.96.0.0")
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/bloomberg/bde")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1w5sywmxfa1ss3f6d56scfylw58smixar90riqkilb644iyyk3wb"))
+                (patches
+                 (search-patches
+                  "bloomberg-bde-cmake-module-path.patch"))
+                ;;(modules '((guix build utils)))
+                (snippet
+                 `(begin
+                    ;; FIXME: Delete bundled software. The third-party packages
+                    ;; may be patched or modified from upstream sources.
+                    ;;(for-each delete-file-recursively
+                    ;; (list "thirdparty"))
+                    ;; Delete failing tests.
+                    (for-each
+                     delete-file
+                     (list "groups/bal/ball/ball_asyncfileobserver.t.cpp"
+                           "groups/bal/ball/ball_fileobserver2.t.cpp"
+                           "groups/bal/ball/ball_recordstringformatter.t.cpp"
+                           "groups/bal/balst/balst_stacktraceutil.t.cpp"
+                           "groups/bdl/bdlmt/bdlmt_eventscheduler.t.cpp"
+                           "groups/bdl/bdlmt/bdlmt_timereventscheduler.t.cpp"
+                           "groups/bdl/bdls/bdls_filesystemutil.t.cpp"
+                           "groups/bsl/bslh/bslh_hashpair.t.cpp"
+                           "groups/bsl/bsls/bsls_platform.t.cpp"
+                           "groups/bsl/bsls/bsls_stackaddressutil.t.cpp"
+                           "groups/bsl/bsls/bsls_stopwatch.t.cpp"
+                           "groups/bsl/bslstl/bslstl_function_invokerutil.t.cpp"))
+                    #t))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:parallel-tests? #f           ; Test parallelism may fail inconsistently.
+         ;; Set UFID to build shared libraries. Flag descriptions can be found at
+         ;; https://bloomberg.github.io/bde-tools/reference/bde_repo.html#ufid
+         #:configure-flags ,(match %current-system
+            ((or "i686-linux" "armhf-linux")
+             ''("-DUFID=opt_dbg_exc_mt_32_shr_cpp17"))
+            (_
+             ''("-DUFID=opt_dbg_exc_mt_64_shr_cpp17")))
+         #:phases
+         (modify-phases %standard-phases
+           ;; Explicitly build tests separate from the main build.
+           (add-after 'build 'build-tests
+             (lambda* (#:key make-flags #:allow-other-keys)
+               (apply invoke "make" "all.t"
+                 `(,@(if #:parallel-build?
+                         `("-j" ,(number->string (parallel-job-count)))
+                         '())
+                 ,@make-flags)))))))
+      (native-inputs
+       (list bloomberg-bde-tools pkg-config python))
+      (synopsis "Foundational C++ libraries used at Bloomberg")
+      (description
+       "The BDE Development Environment libraries provide an enhanced
+implementation of STL containers, vocabulary types for representing common
+concepts (like dates and times), and building blocks for developing
+multi-threaded applications and network applications.")
+      (home-page "https://github.com/bloomberg/bde")
+      (license license:asl2.0))))
diff --git a/gnu/packages/patches/bloomberg-bde-cmake-module-path.patch b/gnu/packages/patches/bloomberg-bde-cmake-module-path.patch
new file mode 100644
index 0000000000..b08ca5eac0
--- /dev/null
+++ b/gnu/packages/patches/bloomberg-bde-cmake-module-path.patch
@@ -0,0 +1,16 @@
+This package requires CMAKE_MODULE_PATH be set by the calling process. This
+patch uses the CMAKE_PREFIX_PATH passed from Guix as the search path for
+locating the bloomberg-bde-tools CMake modules.
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,8 +1,6 @@
+ cmake_minimum_required(VERSION 3.15)
+ 
+-if (NOT CMAKE_MODULE_PATH)
+-    message(FATAL "Please specify path to BDE cmake modules.")
+-endif()
++string(REPLACE ":" "cmake/;" CMAKE_MODULE_PATH "$ENV{CMAKE_PREFIX_PATH}cmake/")
+ 
+ get_filename_component(repoName ${CMAKE_CURRENT_LIST_DIR} NAME)
+ 
-- 
2.34.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#51592] [PATCH 0/2] gnu: Add bloomberg-bde.
  2021-12-21  1:26   ` Greg Hogan
@ 2022-02-04 21:23     ` Greg Hogan
  2022-02-08 17:19       ` bug#51592: " Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Greg Hogan @ 2022-02-04 21:23 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 51592


[-- Attachment #1.1: Type: text/plain, Size: 136 bytes --]

I have updated the attached patches to the latest versioned commits. I
believe the recommended fixes are all in place.

Thanks,
Greg

>

[-- Attachment #1.2: Type: text/html, Size: 431 bytes --]

[-- Attachment #2: 0001-gnu-Add-bloomberg-bde-tools.patch --]
[-- Type: text/x-patch, Size: 7437 bytes --]

From fa9d62133973705b08f4f0952cf55189ff9cdb7b Mon Sep 17 00:00:00 2001
From: Greg Hogan <code@greghogan.com>
Date: Wed, 3 Nov 2021 15:20:51 +0000
Subject: [PATCH 1/2] gnu: Add bloomberg-bde-tools.

* gnu/packages/cpp.scm (bloomberg-bde-tools): New variable.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/cpp.scm                          | 30 +++++-
 ...bloomberg-bde-tools-fix-install-path.patch | 95 +++++++++++++++++++
 3 files changed, 125 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/bloomberg-bde-tools-fix-install-path.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index dddda78efa..b533002407 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -911,6 +911,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/binutils-mingw-w64-timestamp.patch	\
   %D%/packages/patches/binutils-mingw-w64-deterministic.patch	\
   %D%/packages/patches/binutils-CVE-2021-45078.patch		\
+  %D%/packages/patches/bloomberg-bde-tools-fix-install-path.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/cpp.scm b/gnu/packages/cpp.scm
index 4d46339341..b8c89813d1 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -14,7 +14,7 @@
 ;;; Copyright © 2020, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
-;;; Copyright © 2020, 2021 Greg Hogan <code@greghogan.com>
+;;; Copyright © 2020-2022 Greg Hogan <code@greghogan.com>
 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
 ;;; Copyright © 2020 Milkey Mouse <milkeymouse@meme.institute>
 ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
@@ -48,6 +48,7 @@ (define-module (gnu packages cpp)
   #:use-module (guix utils)
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module (guix modules)
@@ -1585,3 +1586,30 @@ (define-public simdjson
 validation.")
     (home-page "https://github.com/simdjson/simdjson")
     (license license:asl2.0)))
+
+(define-public bloomberg-bde-tools
+  (let ((commit "094885bd177e0159232d4e6a060a04edb1edd786"))
+    (package
+      (name "bloomberg-bde-tools")
+      ;; Recent releases are not tagged so commit must be used for checkout.
+      (version "3.97.0.0")
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/bloomberg/bde-tools")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0mbbai73z8amh23ah3wy35kmy612380yr5wg89mic60qwqmpqb02"))
+                (patches
+                 (search-patches
+                  "bloomberg-bde-tools-fix-install-path.patch"))))
+      (build-system copy-build-system)
+      ;; Unable to be an inline dependency of bloomberg-bde due to patch.
+      (properties '((hidden? . #t)))
+      (synopsis "Tools for developing and building libraries modeled on BDE")
+      (description
+       "This package provides the cmake imports needed to build bloomberg-bde.")
+      (home-page "https://github.com/bloomberg/bde-tools")
+      (license license:asl2.0))))
diff --git a/gnu/packages/patches/bloomberg-bde-tools-fix-install-path.patch b/gnu/packages/patches/bloomberg-bde-tools-fix-install-path.patch
new file mode 100644
index 0000000000..a80c6c3ea3
--- /dev/null
+++ b/gnu/packages/patches/bloomberg-bde-tools-fix-install-path.patch
@@ -0,0 +1,95 @@
+Install shared libraries into "lib". Do not create symbolic links to static
+libraries since only shared libraries are built.
+
+--- a/cmake/layers/ufid.cmake
++++ b/cmake/layers/ufid.cmake
+@@ -6,10 +6,7 @@ bde_prefixed_override(ufid project_setup_install_opts)
+ function(ufid_project_setup_install_opts proj)
+     bde_assert_no_extra_args()
+ 
+-    set(libPath "bin/so")
+-    if (${bde_ufid_is_64}) 
+-        string(APPEND libPath "/64")
+-    endif()
++    set(libPath "lib")
+ 
+     bde_struct_create(
+         installOpts
+@@ -86,13 +83,6 @@ function(bde_create_ufid_symlink uor installOpts)
+             "${symlinkPrefix}/${symlinkDir}/${libLinkName}"
+         )
+ 
+-        install(
+-            CODE
+-                "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \
+-                ${symlinkVal} ${symlinkFile})"
+-            COMPONENT "${component}-symlinks"
+-        )
+-
+         # This code creates compatibility symlinks
+         # WARNING: This is custom logic that has nothing to do with our build system.
+         # Some external build systems expect to find a variaty of ufids in dpkg.
+@@ -110,14 +100,6 @@ function(bde_create_ufid_symlink uor installOpts)
+                 symlinkFile
+                 "${symlinkPrefix}/${symlinkDir}/${libLinkName}"
+             )
+-
+-            # IMPORTANT: symlinkFile is the same as above!
+-            install(
+-                CODE
+-                    "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \
+-                    ${symlinkVal} ${symlinkFile})"
+-                COMPONENT "${component}-symlinks"
+-            )
+         endif()
+ 
+         if (${bde_ufid_is_pic})
+@@ -134,14 +116,6 @@ function(bde_create_ufid_symlink uor installOpts)
+                 "${symlinkPrefix}/${symlinkDir}/${libLinkName}"
+             )
+ 
+-            # IMPORTANT: symlinkFile is the same as above!
+-            install(
+-                CODE
+-                    "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \
+-                    ${symlinkVal} ${symlinkFile})"
+-                COMPONENT "${component}-pic-symlink-hack"
+-            )
+-
+             # And another one for "64" - remove "pic", add "64"
+             if (${bde_ufid_is_64})
+                 set(temp_ufid_flags ${install_ufid_flags})
+@@ -157,14 +131,6 @@ function(bde_create_ufid_symlink uor installOpts)
+                     symlinkFile
+                     "${symlinkPrefix}/${symlinkDir}/${libLinkName}"
+                 )
+-
+-                # IMPORTANT: symlinkFile is the same as above!
+-                install(
+-                    CODE
+-                        "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \
+-                        ${symlinkVal} ${symlinkFile})"
+-                    COMPONENT "${component}-pic-symlink-hack"
+-                )
+             endif()
+         endif()
+ 
+@@ -177,18 +143,5 @@ function(bde_create_ufid_symlink uor installOpts)
+             symlinkReleaseFile
+             "${symlinkPrefix}/${symlinkDir}/${libReleaseLinkName}"
+         )
+-        install(
+-            CODE
+-                "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \
+-                ${symlinkVal} ${symlinkReleaseFile})"
+-            COMPONENT "${component}-release-symlink"
+-        )
+-        install(
+-            CODE
+-                "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \
+-                ${symlinkVal} ${symlinkReleaseFile})"
+-            COMPONENT "release-symlink"
+-            EXCLUDE_FROM_ALL
+-        )
+     endif()
+ endfunction()
-- 
2.34.0


[-- Attachment #3: 0002-gnu-Add-bloomberg-bde.patch --]
[-- Type: text/x-patch, Size: 6410 bytes --]

From 5b6114f4ee2c3801858d2984d706a490cd34f50e Mon Sep 17 00:00:00 2001
From: Greg Hogan <code@greghogan.com>
Date: Wed, 3 Nov 2021 15:22:19 +0000
Subject: [PATCH 2/2] gnu: Add bloomberg-bde.

* gnu/packages/cpp.scm (bloomberg-bde): New variable.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/cpp.scm                          | 75 ++++++++++++++++++-
 .../bloomberg-bde-cmake-module-path.patch     | 16 ++++
 3 files changed, 91 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/bloomberg-bde-cmake-module-path.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index b533002407..4b194604db 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -911,6 +911,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/binutils-mingw-w64-timestamp.patch	\
   %D%/packages/patches/binutils-mingw-w64-deterministic.patch	\
   %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/bpftrace-disable-bfd-disasm.patch	\
   %D%/packages/patches/byobu-writable-status.patch		\
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index b8c89813d1..86ac3c8e39 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -80,7 +80,8 @@ (define-module (gnu packages cpp)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages web)
-  #:use-module (gnu packages xml))
+  #:use-module (gnu packages xml)
+  #:use-module (ice-9 match))
 
 (define-public argagg
   (let ((commit "79e4adfa2c6e2bfbe63da05cc668eb9ad5596748") (revision "0"))
@@ -1613,3 +1614,75 @@ (define-public bloomberg-bde-tools
        "This package provides the cmake imports needed to build bloomberg-bde.")
       (home-page "https://github.com/bloomberg/bde-tools")
       (license license:asl2.0))))
+
+(define-public bloomberg-bde
+  (let ((commit "b6bcc0e24a5862bf77aea7edd831dedf50e21d64"))
+    (package
+      (name "bloomberg-bde")
+      ;; Recent releases are not tagged so commit must be used for checkout.
+      (version "3.98.0.0")
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/bloomberg/bde")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0y3lipi1lj9qazgc935851r2qsx5aq3vvc4y52jq57riyz8wg3ma"))
+                (patches
+                 (search-patches
+                  "bloomberg-bde-cmake-module-path.patch"))
+                ;;(modules '((guix build utils)))
+                (snippet
+                 `(begin
+                    ;; FIXME: Delete bundled software. The third-party packages
+                    ;; may be patched or modified from upstream sources.
+                    ;;(for-each delete-file-recursively
+                    ;; (list "thirdparty"))
+                    ;; Delete failing tests.
+                    (for-each
+                     delete-file
+                     (list "groups/bal/ball/ball_asyncfileobserver.t.cpp"
+                           "groups/bal/ball/ball_fileobserver2.t.cpp"
+                           "groups/bal/ball/ball_recordstringformatter.t.cpp"
+                           "groups/bal/balst/balst_stacktraceutil.t.cpp"
+                           "groups/bdl/bdlmt/bdlmt_eventscheduler.t.cpp"
+                           "groups/bdl/bdlmt/bdlmt_timereventscheduler.t.cpp"
+                           "groups/bdl/bdls/bdls_filesystemutil.t.cpp"
+                           "groups/bsl/bslh/bslh_hashpair.t.cpp"
+                           "groups/bsl/bsls/bsls_platform.t.cpp"
+                           "groups/bsl/bsls/bsls_stackaddressutil.t.cpp"
+                           "groups/bsl/bsls/bsls_stopwatch.t.cpp"
+                           "groups/bsl/bslstl/bslstl_function_invokerutil.t.cpp"))
+                    #t))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:parallel-tests? #f           ; Test parallelism may fail inconsistently.
+         ;; Set UFID to build shared libraries. Flag descriptions can be found at
+         ;; https://bloomberg.github.io/bde-tools/reference/bde_repo.html#ufid
+         #:configure-flags ,(match %current-system
+            ((or "i686-linux" "armhf-linux")
+             ''("-DUFID=opt_dbg_exc_mt_32_shr_cpp17"))
+            (_
+             ''("-DUFID=opt_dbg_exc_mt_64_shr_cpp17")))
+         #:phases
+         (modify-phases %standard-phases
+           ;; Explicitly build tests separate from the main build.
+           (add-after 'build 'build-tests
+             (lambda* (#:key make-flags #:allow-other-keys)
+               (apply invoke "make" "all.t"
+                 `(,@(if #:parallel-build?
+                         `("-j" ,(number->string (parallel-job-count)))
+                         '())
+                 ,@make-flags)))))))
+      (native-inputs
+       (list bloomberg-bde-tools pkg-config python))
+      (synopsis "Foundational C++ libraries used at Bloomberg")
+      (description
+       "The BDE Development Environment libraries provide an enhanced
+implementation of STL containers, vocabulary types for representing common
+concepts (like dates and times), and building blocks for developing
+multi-threaded applications and network applications.")
+      (home-page "https://github.com/bloomberg/bde")
+      (license license:asl2.0))))
diff --git a/gnu/packages/patches/bloomberg-bde-cmake-module-path.patch b/gnu/packages/patches/bloomberg-bde-cmake-module-path.patch
new file mode 100644
index 0000000000..b08ca5eac0
--- /dev/null
+++ b/gnu/packages/patches/bloomberg-bde-cmake-module-path.patch
@@ -0,0 +1,16 @@
+This package requires CMAKE_MODULE_PATH be set by the calling process. This
+patch uses the CMAKE_PREFIX_PATH passed from Guix as the search path for
+locating the bloomberg-bde-tools CMake modules.
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,8 +1,6 @@
+ cmake_minimum_required(VERSION 3.15)
+ 
+-if (NOT CMAKE_MODULE_PATH)
+-    message(FATAL "Please specify path to BDE cmake modules.")
+-endif()
++string(REPLACE ":" "cmake/;" CMAKE_MODULE_PATH "$ENV{CMAKE_PREFIX_PATH}cmake/")
+ 
+ get_filename_component(repoName ${CMAKE_CURRENT_LIST_DIR} NAME)
+ 
-- 
2.34.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#51592: [PATCH 0/2] gnu: Add bloomberg-bde.
  2022-02-04 21:23     ` Greg Hogan
@ 2022-02-08 17:19       ` Ludovic Courtès
  0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2022-02-08 17:19 UTC (permalink / raw)
  To: Greg Hogan; +Cc: 51592-done

Hi Greg,

Greg Hogan <code@greghogan.com> skribis:

> From fa9d62133973705b08f4f0952cf55189ff9cdb7b Mon Sep 17 00:00:00 2001
> From: Greg Hogan <code@greghogan.com>
> Date: Wed, 3 Nov 2021 15:20:51 +0000
> Subject: [PATCH 1/2] gnu: Add bloomberg-bde-tools.
>
> * gnu/packages/cpp.scm (bloomberg-bde-tools): New variable.

> From 5b6114f4ee2c3801858d2984d706a490cd34f50e Mon Sep 17 00:00:00 2001
> From: Greg Hogan <code@greghogan.com>
> Date: Wed, 3 Nov 2021 15:22:19 +0000
> Subject: [PATCH 2/2] gnu: Add bloomberg-bde.
>
> * gnu/packages/cpp.scm (bloomberg-bde): New variable.

Applied both, sorry for the delay!

However, I hit a test failure in one case:

--8<---------------cut here---------------start------------->8---
513/950 Test #513: bslh_defaultseededhashalgorithm.t ..................   Passed    0.05 sec
        Start 514: bslh_fibonaccibadhashwrapper.t
514/950 Test #514: bslh_fibonaccibadhashwrapper.t .....................   Passed    0.05 sec
        Start 515: bslh_hash.t
515/950 Test #515: bslh_hash.t ........................................***Failed    0.05 sec
[11:23:07] TEST START
[11:23:07] CASE  1: SUCCESS
[11:23:07] CASE  2: SUCCESS
[11:23:07] CASE  3: FAILURE (rc 1)
TEST /tmp/guix-build-bloomberg-bde-3.98.0.0.drv-0/source/groups/bsl/bslh/bslh_hash.t.cpp CASE 3
1463: 1463      alg.getLength(): 10     size: 16
Error, non-zero test status = 1.
Error /tmp/guix-build-bloomberg-bde-3.98.0.0.drv-0/source/groups/bsl/bslh/bslh_hash.t.cpp(1463): alg.getLength() == size    (failed)

[11:23:07] CASE  4: SUCCESS
[11:23:07] CASE  5: SUCCESS
[11:23:07] CASE  6: SUCCESS
[11:23:07] CASE  7: SUCCESS
[11:23:07] CASE  8: SUCCESS

        Start 516: bslh_hashoptional.t
516/950 Test #516: bslh_hashoptional.t ................................   Passed    0.05 sec
        Start 517: bslh_hashtuple.t
517/950 Test #517: bslh_hashtuple.t ...................................   Passed    0.05 sec
        Start 518: bslh_hashvariant.t
518/950 Test #518: bslh_hashvariant.t .................................   Passed    0.05 sec
--8<---------------cut here---------------end--------------->8---

It’d be worth monitoring ci.guix to see if it happens reproducibly.

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-08 17:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-03 19:12 [bug#51592] [PATCH 0/2] gnu: Add bloomberg-bde Greg Hogan
2021-12-01 15:50 ` Ludovic Courtès
2021-12-21  1:26   ` Greg Hogan
2022-02-04 21:23     ` Greg Hogan
2022-02-08 17:19       ` bug#51592: " Ludovic Courtès

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.