diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-04-09 18:28:16 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-04-12 18:46:15 +0000 |
commit | fd2e737e0678ee7d8081baef05b305146a2c0034 (patch) | |
tree | ac3e9b27576a0382335532d126f9a66d486bc638 /nixpkgs/pkgs/servers/foundationdb | |
parent | cc207d720b6aa836e256c1ee9842bc739e630a8a (diff) | |
parent | 9e377a6ce42dccd9b624ae4ce8f978dc892ba0e2 (diff) | |
download | nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.gz nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.bz2 nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.lz nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.xz nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.zst nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.zip |
Merge remote-tracking branch 'nixpkgs/nixos-unstable'
Diffstat (limited to 'nixpkgs/pkgs/servers/foundationdb')
4 files changed, 168 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/servers/foundationdb/default.nix b/nixpkgs/pkgs/servers/foundationdb/default.nix index 10d517179c2f..b3a876546e78 100644 --- a/nixpkgs/pkgs/servers/foundationdb/default.nix +++ b/nixpkgs/pkgs/servers/foundationdb/default.nix @@ -2,7 +2,7 @@ , lib, fetchurl, fetchpatch, fetchFromGitHub , cmake, ninja, which, findutils, m4, gawk -, python, python3, openjdk, mono, libressl, boost +, python2, python3, openjdk, mono, libressl, boost }@args: let @@ -69,6 +69,7 @@ in with builtins; { patches = [ ./patches/ldflags-6.0.patch + ./patches/include-fixes-6.0.patch ]; }; @@ -76,13 +77,14 @@ in with builtins; { # ------------------------------------------------------ foundationdb61 = cmakeBuild { - version = "6.1.12"; + version = "6.1.13"; branch = "release-6.1"; - sha256 = "1yh5hx6rim41m0dwhnb2pcwz67wlnk0zwvyw845d36b29gwy58ab"; + sha256 = "10vd694dcnh2pp91mri1m80kfbwjanhiy50c53c5ncqfa6pwvk00"; patches = [ ./patches/clang-libcxx.patch ./patches/suppress-clang-warnings.patch + ./patches/stdexcept-6.1.patch glibc230-fix ]; }; diff --git a/nixpkgs/pkgs/servers/foundationdb/patches/include-fixes-6.0.patch b/nixpkgs/pkgs/servers/foundationdb/patches/include-fixes-6.0.patch new file mode 100644 index 000000000000..93959def44f8 --- /dev/null +++ b/nixpkgs/pkgs/servers/foundationdb/patches/include-fixes-6.0.patch @@ -0,0 +1,137 @@ +diff --git a/fdbrpc/ContinuousSample.h b/fdbrpc/ContinuousSample.h +index 54ff1b109..577c228ae 100644 +--- a/fdbrpc/ContinuousSample.h ++++ b/fdbrpc/ContinuousSample.h +@@ -26,6 +26,7 @@ + #include "flow/IRandom.h" + #include <vector> + #include <algorithm> ++#include <cmath> + + template <class T> + class ContinuousSample { +diff --git a/fdbrpc/Smoother.h b/fdbrpc/Smoother.h +index 3ed8e6e98..f3e4504b6 100644 +--- a/fdbrpc/Smoother.h ++++ b/fdbrpc/Smoother.h +@@ -23,6 +23,7 @@ + #pragma once + + #include "flow/flow.h" ++#include <cmath> + + struct Smoother { + // Times (t) are expected to be nondecreasing +@@ -50,7 +51,7 @@ struct Smoother { + double elapsed = t - time; + if(elapsed) { + time = t; +- estimate += (total-estimate) * (1-exp( -elapsed/eFoldingTime )); ++ estimate += (total-estimate) * (1-std::exp( -elapsed/eFoldingTime )); + } + } + +@@ -83,11 +84,11 @@ struct TimerSmoother { + void update(double t) { + double elapsed = t - time; + time = t; +- estimate += (total-estimate) * (1-exp( -elapsed/eFoldingTime )); ++ estimate += (total-estimate) * (1-std::exp( -elapsed/eFoldingTime )); + } + + double eFoldingTime; + double time, total, estimate; + }; + +-#endif +\ No newline at end of file ++#endif +diff --git a/fdbserver/Knobs.cpp b/fdbserver/Knobs.cpp +index a924bc905..0dc70e7ac 100644 +--- a/fdbserver/Knobs.cpp ++++ b/fdbserver/Knobs.cpp +@@ -20,6 +20,7 @@ + + #include "Knobs.h" + #include "fdbrpc/Locality.h" ++#include <cmath> + + ServerKnobs const* SERVER_KNOBS = new ServerKnobs(); + +diff --git a/flow/Knobs.cpp b/flow/Knobs.cpp +index 2d706dddd..5dbe08861 100644 +--- a/flow/Knobs.cpp ++++ b/flow/Knobs.cpp +@@ -20,6 +20,7 @@ + + #include "Knobs.h" + #include "flow/flow.h" ++#include <cmath> + + FlowKnobs const* FLOW_KNOBS = new FlowKnobs(); + +@@ -128,7 +129,7 @@ FlowKnobs::FlowKnobs(bool randomize, bool isSimulated) { + init( MAX_METRICS, 600 ); + init( MAX_METRIC_SIZE, 2500 ); + init( MAX_METRIC_LEVEL, 25 ); +- init( METRIC_LEVEL_DIVISOR, log(4) ); ++ init( METRIC_LEVEL_DIVISOR, std::log(4) ); + init( METRIC_LIMIT_START_QUEUE_SIZE, 10 ); // The queue size at which to start restricting logging by disabling levels + init( METRIC_LIMIT_RESPONSE_FACTOR, 10 ); // The additional queue size at which to disable logging of another level (higher == less restrictive) + +diff --git a/flow/Platform.cpp b/flow/Platform.cpp +index a754c8747..4d47fad32 100644 +--- a/flow/Platform.cpp ++++ b/flow/Platform.cpp +@@ -98,6 +98,8 @@ + #include <sys/resource.h> + /* Needed for crash handler */ + #include <signal.h> ++/* Needed for major() and minor() with recent glibc */ ++#include <sys/sysmacros.h> + #endif + + #ifdef __APPLE__ +diff --git a/flow/Profiler.actor.cpp b/flow/Profiler.actor.cpp +index 4603dcb77..78eda7278 100644 +--- a/flow/Profiler.actor.cpp ++++ b/flow/Profiler.actor.cpp +@@ -35,8 +35,6 @@ + + extern volatile int profilingEnabled; + +-static uint64_t gettid() { return syscall(__NR_gettid); } +- + struct SignalClosure { + void (* func)(int, siginfo_t*, void*, void*); + void *userdata; +diff --git a/flow/TDMetric.actor.h b/flow/TDMetric.actor.h +index 306352c39..fc63e12f9 100755 +--- a/flow/TDMetric.actor.h ++++ b/flow/TDMetric.actor.h +@@ -35,6 +35,7 @@ + #include "genericactors.actor.h" + #include "CompressedInt.h" + #include <algorithm> ++#include <cmath> + #include <functional> + + struct MetricNameRef { +@@ -799,7 +800,7 @@ struct EventMetric : E, ReferenceCounted<EventMetric<E>>, MetricUtil<EventMetric + if (x == 0.0) + l = FLOW_KNOBS->MAX_METRIC_LEVEL-1; + else +- l = std::min(FLOW_KNOBS->MAX_METRIC_LEVEL-1, (int64_t)(::log(1.0/x) / FLOW_KNOBS->METRIC_LEVEL_DIVISOR)); ++ l = std::min(FLOW_KNOBS->MAX_METRIC_LEVEL-1, (int64_t)(std::log(1.0/x) / FLOW_KNOBS->METRIC_LEVEL_DIVISOR)); + + if(!canLog(l)) + return 0; +@@ -1274,7 +1275,7 @@ public: + l = std::min( + FLOW_KNOBS->MAX_METRIC_LEVEL-1, + (int64_t)( +- log((toggleTime - tv.time) / x) / ++ std::log((toggleTime - tv.time) / x) / + FLOW_KNOBS->METRIC_LEVEL_DIVISOR + ) + ); diff --git a/nixpkgs/pkgs/servers/foundationdb/patches/stdexcept-6.1.patch b/nixpkgs/pkgs/servers/foundationdb/patches/stdexcept-6.1.patch new file mode 100644 index 000000000000..9ebe0c6c0fb5 --- /dev/null +++ b/nixpkgs/pkgs/servers/foundationdb/patches/stdexcept-6.1.patch @@ -0,0 +1,24 @@ +diff --git a/FDBLibTLS/FDBLibTLSPolicy.cpp b/FDBLibTLS/FDBLibTLSPolicy.cpp +index 728ff871d..46e1dd289 100644 +--- a/FDBLibTLS/FDBLibTLSPolicy.cpp ++++ b/FDBLibTLS/FDBLibTLSPolicy.cpp +@@ -31,6 +31,7 @@ + #include <algorithm> + #include <exception> + #include <map> ++#include <stdexcept> + #include <string> + #include <vector> + +diff --git a/FDBLibTLS/FDBLibTLSVerify.cpp b/FDBLibTLS/FDBLibTLSVerify.cpp +index 594389916..1c8b9b50d 100644 +--- a/FDBLibTLS/FDBLibTLSVerify.cpp ++++ b/FDBLibTLS/FDBLibTLSVerify.cpp +@@ -25,6 +25,7 @@ + #include <algorithm> + #include <exception> + #include <cstring> ++#include <stdexcept> + + static int hexValue(char c) { + static char const digits[] = "0123456789ABCDEF"; diff --git a/nixpkgs/pkgs/servers/foundationdb/vsmake.nix b/nixpkgs/pkgs/servers/foundationdb/vsmake.nix index aac9ab07c0f7..e171d7145647 100644 --- a/nixpkgs/pkgs/servers/foundationdb/vsmake.nix +++ b/nixpkgs/pkgs/servers/foundationdb/vsmake.nix @@ -4,7 +4,7 @@ { gcc6Stdenv, lib, fetchurl, fetchFromGitHub , which, findutils, m4, gawk -, python, openjdk, mono, libressl +, python2, openjdk, mono, libressl , ... }: @@ -51,7 +51,7 @@ let inherit rev sha256; }; - nativeBuildInputs = [ python openjdk gawk which m4 findutils mono ]; + nativeBuildInputs = [ python2 openjdk gawk which m4 findutils mono ]; buildInputs = [ libressl boost ]; inherit patches; |