From 7ebcada02028e5ce8199cc123fda6aa1aba72e64 Mon Sep 17 00:00:00 2001 From: Charles Strahan Date: Wed, 28 Dec 2016 00:19:51 -0500 Subject: mesos: 1.0.1 -> 1.1.0 --- .../python/build-python-package-setuptools.nix | 2 +- pkgs/development/libraries/protobuf/generic.nix | 22 +++++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) (limited to 'pkgs/development') diff --git a/pkgs/development/interpreters/python/build-python-package-setuptools.nix b/pkgs/development/interpreters/python/build-python-package-setuptools.nix index f077533ecfe..eab10372674 100644 --- a/pkgs/development/interpreters/python/build-python-package-setuptools.nix +++ b/pkgs/development/interpreters/python/build-python-package-setuptools.nix @@ -53,4 +53,4 @@ in attrs // { fi ${postShellHook} ''; -} \ No newline at end of file +} diff --git a/pkgs/development/libraries/protobuf/generic.nix b/pkgs/development/libraries/protobuf/generic.nix index 47f66c83ff5..2e962298550 100644 --- a/pkgs/development/libraries/protobuf/generic.nix +++ b/pkgs/development/libraries/protobuf/generic.nix @@ -1,4 +1,4 @@ -{ stdenv, version, src +{ stdenv, lib, version, src , autoreconfHook, zlib, gtest , ... }: @@ -21,6 +21,26 @@ stdenv.mkDerivation rec { buildInputs = [ autoreconfHook zlib ]; + # The generated C++ code uses static initializers which mutate a global data + # structure. This causes problems for an executable when: + # + # 1) it dynamically links to two libs, both of which contain generated C++ for + # the same proto file, and + # 2) the two aforementioned libs both dynamically link to libprotobuf. + # + # One solution is to statically link libprotobuf, that way the global + # variables are not shared; in fact, this is necessary for the python Mesos + # binding to not crash, as the python lib contains two C extensions which + # both refer to the same proto schema. + # + # See: https://github.com/NixOS/nixpkgs/pull/19064#issuecomment-255082684 + # https://github.com/google/protobuf/issues/1489 + dontDisableStatic = true; + configureFlags = [ + "CFLAGS=-fPIC" + "CXXFLAGS=-fPIC" + ]; + doCheck = true; meta = { -- cgit 1.4.1