GNU bug report logs - #43620
[PATCH 2/2] gnu: Add folly.

Previous Next

Package: guix-patches;

Reported by: Greg Hogan <code <at> greghogan.com>

Date: Fri, 25 Sep 2020 18:15:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

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 43620 in the body.
You can then email your comments to 43620 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#43620; Package guix-patches. (Fri, 25 Sep 2020 18:15:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Greg Hogan <code <at> greghogan.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 25 Sep 2020 18:15:01 GMT) Full text and rfc822 format available.

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

From: Greg Hogan <code <at> greghogan.com>
To: guix-patches <at> gnu.org
Subject: [PATCH 2/2] gnu: Add folly.
Date: Fri, 25 Sep 2020 14:13:40 -0400
[Message part 1 (text/plain, inline)]
This patch depends on #43619

From 2835c2ac08db9b5887bcc33a3c15e84f26111864 Mon Sep 17 00:00:00 2001
From: Greg Hogan <code <at> greghogan.com>
Date: Tue, 22 Sep 2020 15:22:32 +0000
Subject: [PATCH 2/2] gnu: Add folly.

* gnu/packages/cpp.scm (folly): New variable.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/cpp.scm                          | 73 +++++++++++++++++++
 .../patches/folly-add-missing-include.patch   | 10 +++
 3 files changed, 84 insertions(+)
 create mode 100644 gnu/packages/patches/folly-add-missing-include.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 99e9b5a6ab..6f62493ff2 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -964,6 +964,7 @@ dist_patch_DATA =
    \
   %D%/packages/patches/findutils-localstatedir.patch           \
   %D%/packages/patches/findutils-test-rwlock-threads.patch     \
   %D%/packages/patches/flann-cmake-3.11.patch                  \
+  %D%/packages/patches/folly-add-missing-include.patch         \
   %D%/packages/patches/foobillard++-pkg-config.patch           \
   %D%/packages/patches/foomatic-filters-CVE-2015-8327.patch    \
   %D%/packages/patches/foomatic-filters-CVE-2015-8560.patch    \
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 90e139e9eb..277f9da115 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -41,12 +41,23 @@
   #:use-module (guix build-system python)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
   #:use-module (gnu packages code)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages crypto)
+  #:use-module (gnu packages gcc)
+  #:use-module (gnu packages libevent)
+  #:use-module (gnu packages libunwind)
+  #:use-module (gnu packages liburing)
+  #:use-module (gnu packages linux)
   #:use-module (gnu packages llvm)
+  #:use-module (gnu packages logging)
+  #:use-module (gnu packages maths)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages popt)
+  #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages web))

@@ -669,3 +680,65 @@ parsers according to a Parsing Expression Grammar
(PEG).")
 standard GNU style syntax for options.")
     (home-page "https://github.com/jarro2783/cxxopts/wiki")
     (license license:expat)))
+
+(define-public folly
+  (package
+    (name "folly")
+    (version "2020.09.21.00")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/facebook/folly")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0ppd02scbi4a52s99par4i17cys4z8gangpxa86yma48k72z5xvs"))
+              (patches (search-patches
"folly-add-missing-include.patch"))))
+    (build-system cmake-build-system)
+    (arguments
+     '(;; Tests must be explicitly enabled
+       ;#:configure-flags
+       ;'("-DBUILD_TESTS=ON")))
+       ;; Leave tests disabled; see
https://github.com/facebook/folly/issues/1456
+       #:tests? #f))
+    (propagated-inputs
+     `(("boost" ,boost)
+       ("gflags" ,gflags)
+       ("glog" ,glog)
+       ("liburing" ,liburing)))
+    (inputs
+     `(("bzip2" ,bzip2)
+       ("double-conversion" ,double-conversion)
+       ("fmt" ,fmt)
+       ("libaio" ,libaio)
+       ("libevent" ,libevent)
+       ("libiberty" ,libiberty)
+       ("libsodium" ,libsodium)
+       ("libunwind" ,libunwind)
+       ("lz4" ,lz4)
+       ("openssl" ,openssl)
+       ("snappy" ,snappy)
+       ("zlib" ,zlib)
+       ("zstd" ,zstd "lib")))
+    (native-inputs
+     `(("googletest" ,googletest)))
+    (synopsis "An open-source C++ library developed and used at Facebook")
+    (description
+     "Folly (acronymed loosely after Facebook Open Source Library) is a
library
+  of C++14 components designed with practicality and efficiency in mind.
Folly
+  contains a variety of core library components used extensively at
Facebook. In
+  particular, it's often a dependency of Facebook's other open source C++
efforts
+  and place where those projects can share code.
+
+  It complements (as opposed to competing against) offerings such as Boost
and of
+  course std. In fact, we embark on defining our own component only when
+  something we need is either not available, or does not meet the needed
+  performance profile. We endeavor to remove things from folly if or when
std or
+  Boost obsoletes them.
+
+  Performance concerns permeate much of Folly, sometimes leading to
designs that
+  are more idiosyncratic than they would otherwise be (see e.g.
PackedSyncPtr.h,
+  SmallLocks.h). Good performance at large scale is a unifying theme in
all of Folly.")
+    (home-page "https://github.com/facebook/folly/wiki")
+    (license license:asl2.0)))
diff --git a/gnu/packages/patches/folly-add-missing-include.patch
b/gnu/packages/patches/folly-add-missing-include.patch
new file mode 100644
index 0000000000..929239233f
--- /dev/null
+++ b/gnu/packages/patches/folly-add-missing-include.patch
@@ -0,0 +1,10 @@
+--- a/folly/concurrency/test/AtomicSharedPtrTest.cpp
++++ b/folly/concurrency/test/AtomicSharedPtrTest.cpp
+@@ -27,6 +27,7 @@
+ #include <folly/concurrency/AtomicSharedPtr.h>
+ #include <folly/concurrency/test/AtomicSharedPtrCounted.h>
+ #include <folly/portability/GTest.h>
++#include <folly/portability/GFlags.h>
+
+ #include <folly/test/DeterministicSchedule.h>
+
-- 
2.28.0
[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#43620; Package guix-patches. (Tue, 29 Sep 2020 20:47:01 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Greg Hogan <code <at> greghogan.com>
Cc: 43620 <at> debbugs.gnu.org
Subject: Re: [bug#43620] [PATCH 2/2] gnu: Add folly.
Date: Tue, 29 Sep 2020 22:46:24 +0200
Greg Hogan <code <at> greghogan.com> skribis:

>>From 2835c2ac08db9b5887bcc33a3c15e84f26111864 Mon Sep 17 00:00:00 2001
> From: Greg Hogan <code <at> greghogan.com>
> Date: Tue, 22 Sep 2020 15:22:32 +0000
> Subject: [PATCH 2/2] gnu: Add folly.
>
> * gnu/packages/cpp.scm (folly): New variable.

[...]

> +              (file-name (git-file-name name version))
> +              (sha256
> +               (base32
> +                "0ppd02scbi4a52s99par4i17cys4z8gangpxa86yma48k72z5xvs"))
> +              (patches (search-patches
> "folly-add-missing-include.patch"))))

Looks like your mail client mangled the patch.

> +    (synopsis "An open-source C++ library developed and used at Facebook")

Everything is free software in here, no need to write it.  Also, please
remove the initial article and somehow say what the library provides in
terms of features:

  https://guix.gnu.org/manual/en/html_node/Synopses-and-Descriptions.html

> +    (description
> +     "Folly (acronymed loosely after Facebook Open Source Library) is a
> library
> +  of C++14 components designed with practicality and efficiency in mind.
> Folly
> +  contains a variety of core library components used extensively at
> Facebook. In
> +  particular, it's often a dependency of Facebook's other open source C++
> efforts
> +  and place where those projects can share code.
> +
> +  It complements (as opposed to competing against) offerings such as Boost
> and of
> +  course std. In fact, we embark on defining our own component only when
> +  something we need is either not available, or does not meet the needed
> +  performance profile. We endeavor to remove things from folly if or when
> std or
> +  Boost obsoletes them.
> +
> +  Performance concerns permeate much of Folly, sometimes leading to
> designs that
> +  are more idiosyncratic than they would otherwise be (see e.g.
> PackedSyncPtr.h,
> +  SmallLocks.h). Good performance at large scale is a unifying theme in
> all of Folly.")

I’d strip all but one reference to Facebook, we’re not an advertising
project.  :-)

Nitpick: please remove “open source”, avoid marketing terms
(“competing”, “offerings”, etc.), write @code{std}, @file{SmallLocks.h}
and similar.

Could you send an updated patch?

Thank you!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#43620; Package guix-patches. (Sat, 10 Oct 2020 16:51:01 GMT) Full text and rfc822 format available.

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

From: Greg Hogan <code <at> greghogan.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 43620 <at> debbugs.gnu.org
Subject: Re: [bug#43620] [PATCH 2/2] gnu: Add folly.
Date: Sat, 10 Oct 2020 12:50:15 -0400
[Message part 1 (text/plain, inline)]
This patch depends on #43619

Reworded synopsis and description. Updated to newest version. Limited to
64-bit architectures.

From 8e3df10ad8aa791e34a5a5abcaabe0438f7b063a Mon Sep 17 00:00:00 2001
From: Greg Hogan <code <at> greghogan.com>
Date: Tue, 22 Sep 2020 15:22:32 +0000
Subject: [PATCH] gnu: Add folly.

* gnu/packages/cpp.scm (folly): New variable.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/cpp.scm                          | 61 +++++++++++++++++++
 .../patches/folly-add-missing-include.patch   | 10 +++
 3 files changed, 72 insertions(+)
 create mode 100644 gnu/packages/patches/folly-add-missing-include.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 83d2d72ab1..155de6c590 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -966,6 +966,7 @@ dist_patch_DATA = \
   %D%/packages/patches/findutils-localstatedir.patch \
   %D%/packages/patches/findutils-test-rwlock-threads.patch \
   %D%/packages/patches/flann-cmake-3.11.patch \
+  %D%/packages/patches/folly-add-missing-include.patch \
   %D%/packages/patches/foobillard++-pkg-config.patch \
   %D%/packages/patches/foomatic-filters-CVE-2015-8327.patch \
   %D%/packages/patches/foomatic-filters-CVE-2015-8560.patch \
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index d3daae74c0..680a2ad520 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -41,12 +41,22 @@
   #:use-module (guix build-system python)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
   #:use-module (gnu packages code)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages crypto)
+  #:use-module (gnu packages gcc)
+  #:use-module (gnu packages libevent)
+  #:use-module (gnu packages libunwind)
+  #:use-module (gnu packages linux)
   #:use-module (gnu packages llvm)
+  #:use-module (gnu packages logging)
+  #:use-module (gnu packages maths)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages popt)
+  #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages web))

@@ -669,3 +679,54 @@ parsers according to a Parsing Expression Grammar
(PEG).")
 standard GNU style syntax for options.")
     (home-page "https://github.com/jarro2783/cxxopts/wiki")
     (license license:expat)))
+
+(define-public folly
+  (package
+    (name "folly")
+    (version "2020.10.05.00")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/facebook/folly")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0q4w4cvjxffc462hvs8h4zryq4965j7015zvkwagcm6cj6wmz3cn"))
+              (patches (search-patches
"folly-add-missing-include.patch"))))
+    (build-system cmake-build-system)
+    (arguments
+     '(;; Tests must be explicitly enabled
+       ;#:configure-flags
+       ;'("-DBUILD_TESTS=ON")))
+       ;; Leave tests disabled; see
https://github.com/facebook/folly/issues/1456
+       #:tests? #f))
+    (propagated-inputs
+     `(("boost" ,boost)
+       ("gflags" ,gflags)
+       ("glog" ,glog)
+       ("liburing" ,liburing)))
+    (inputs
+     `(("bzip2" ,bzip2)
+       ("double-conversion" ,double-conversion)
+       ("fmt" ,fmt)
+       ("libaio" ,libaio)
+       ("libevent" ,libevent)
+       ("libiberty" ,libiberty)
+       ("libsodium" ,libsodium)
+       ("libunwind" ,libunwind)
+       ("lz4" ,lz4)
+       ("openssl" ,openssl)
+       ("snappy" ,snappy)
+       ("zlib" ,zlib)
+       ("zstd" ,zstd "lib")))
+    (native-inputs
+     `(("googletest" ,googletest)))
+    (synopsis "Collection of C++ components complementing the standard
library")
+    (description
+     "Folly (acronymed loosely after Facebook Open Source Library) is a
library
+of C++14 components which complements @code{std} and Boost.")
+    (home-page "https://github.com/facebook/folly/wiki")
+    ; 32-bit is not supported: https://github.com/facebook/folly/issues/103
+    (supported-systems '("aarch64" "x86_64-linux"))
+    (license license:asl2.0)))
diff --git a/gnu/packages/patches/folly-add-missing-include.patch
b/gnu/packages/patches/folly-add-missing-include.patch
new file mode 100644
index 0000000000..929239233f
--- /dev/null
+++ b/gnu/packages/patches/folly-add-missing-include.patch
@@ -0,0 +1,10 @@
+--- a/folly/concurrency/test/AtomicSharedPtrTest.cpp
++++ b/folly/concurrency/test/AtomicSharedPtrTest.cpp
+@@ -27,6 +27,7 @@
+ #include <folly/concurrency/AtomicSharedPtr.h>
+ #include <folly/concurrency/test/AtomicSharedPtrCounted.h>
+ #include <folly/portability/GTest.h>
++#include <folly/portability/GFlags.h>
+
+ #include <folly/test/DeterministicSchedule.h>
+
-- 
2.28.0

On Tue, Sep 29, 2020 at 4:46 PM Ludovic Courtès <ludo <at> gnu.org> wrote:

> Greg Hogan <code <at> greghogan.com> skribis:
>
> >>From 2835c2ac08db9b5887bcc33a3c15e84f26111864 Mon Sep 17 00:00:00 2001
> > From: Greg Hogan <code <at> greghogan.com>
> > Date: Tue, 22 Sep 2020 15:22:32 +0000
> > Subject: [PATCH 2/2] gnu: Add folly.
> >
> > * gnu/packages/cpp.scm (folly): New variable.
>
> [...]
>
> > +              (file-name (git-file-name name version))
> > +              (sha256
> > +               (base32
> > +                "0ppd02scbi4a52s99par4i17cys4z8gangpxa86yma48k72z5xvs"))
> > +              (patches (search-patches
> > "folly-add-missing-include.patch"))))
>
> Looks like your mail client mangled the patch.
>
> > +    (synopsis "An open-source C++ library developed and used at
> Facebook")
>
> Everything is free software in here, no need to write it.  Also, please
> remove the initial article and somehow say what the library provides in
> terms of features:
>
>   https://guix.gnu.org/manual/en/html_node/Synopses-and-Descriptions.html
>
> > +    (description
> > +     "Folly (acronymed loosely after Facebook Open Source Library) is a
> > library
> > +  of C++14 components designed with practicality and efficiency in mind.
> > Folly
> > +  contains a variety of core library components used extensively at
> > Facebook. In
> > +  particular, it's often a dependency of Facebook's other open source
> C++
> > efforts
> > +  and place where those projects can share code.
> > +
> > +  It complements (as opposed to competing against) offerings such as
> Boost
> > and of
> > +  course std. In fact, we embark on defining our own component only when
> > +  something we need is either not available, or does not meet the needed
> > +  performance profile. We endeavor to remove things from folly if or
> when
> > std or
> > +  Boost obsoletes them.
> > +
> > +  Performance concerns permeate much of Folly, sometimes leading to
> > designs that
> > +  are more idiosyncratic than they would otherwise be (see e.g.
> > PackedSyncPtr.h,
> > +  SmallLocks.h). Good performance at large scale is a unifying theme in
> > all of Folly.")
>
> I’d strip all but one reference to Facebook, we’re not an advertising
> project.  :-)
>
> Nitpick: please remove “open source”, avoid marketing terms
> (“competing”, “offerings”, etc.), write @code{std}, @file{SmallLocks.h}
> and similar.
>
> Could you send an updated patch?
>
> Thank you!
>
> Ludo’.
>
[Message part 2 (text/html, inline)]

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Sat, 10 Oct 2020 21:00:02 GMT) Full text and rfc822 format available.

Notification sent to Greg Hogan <code <at> greghogan.com>:
bug acknowledged by developer. (Sat, 10 Oct 2020 21:00:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Greg Hogan <code <at> greghogan.com>
Cc: 43620-done <at> debbugs.gnu.org
Subject: Re: [bug#43620] [PATCH 2/2] gnu: Add folly.
Date: Sat, 10 Oct 2020 22:59:50 +0200
[Message part 1 (text/plain, inline)]
Greg Hogan <code <at> greghogan.com> skribis:

>>From 8e3df10ad8aa791e34a5a5abcaabe0438f7b063a Mon Sep 17 00:00:00 2001
> From: Greg Hogan <code <at> greghogan.com>
> Date: Tue, 22 Sep 2020 15:22:32 +0000
> Subject: [PATCH] gnu: Add folly.
>
> * gnu/packages/cpp.scm (folly): New variable.

Applied with the changes below.

Thanks!

Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 7f52dc3772..da3ea8ec55 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -697,8 +697,7 @@ standard GNU style syntax for options.")
     (build-system cmake-build-system)
     (arguments
      '(;; Tests must be explicitly enabled
-       ;#:configure-flags
-       ;'("-DBUILD_TESTS=ON")))
+       ;;#:configure-flags '("-DBUILD_TESTS=ON")))
        ;; Leave tests disabled; see https://github.com/facebook/folly/issues/1456
        #:tests? #f))
     (propagated-inputs
@@ -725,8 +724,8 @@ standard GNU style syntax for options.")
     (synopsis "Collection of C++ components complementing the standard library")
     (description
      "Folly (acronymed loosely after Facebook Open Source Library) is a library
-of C++14 components which complements @code{std} and Boost.")
+of C++14 components that complements @code{std} and Boost.")
     (home-page "https://github.com/facebook/folly/wiki")
-    ; 32-bit is not supported: https://github.com/facebook/folly/issues/103
-    (supported-systems '("aarch64" "x86_64-linux"))
+    ;; 32-bit is not supported: https://github.com/facebook/folly/issues/103
+    (supported-systems '("aarch64-linux" "x86_64-linux"))
     (license license:asl2.0)))

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 08 Nov 2020 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 218 days ago.

Previous Next


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