diff options
author | Charles Strahan <charles@cstrahan.com> | 2017-01-21 19:05:18 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-21 19:05:18 -0500 |
commit | d298a961f1db2356495026702dd9bbc396e000af (patch) | |
tree | 1c5fd8464c7d280eac9a3333798fce462cab8200 /pkgs/development/libraries/protobuf | |
parent | 5b1b089de350aa67233a8be237a4eb5d263f5409 (diff) | |
parent | 7ebcada02028e5ce8199cc123fda6aa1aba72e64 (diff) | |
download | nixlib-d298a961f1db2356495026702dd9bbc396e000af.tar nixlib-d298a961f1db2356495026702dd9bbc396e000af.tar.gz nixlib-d298a961f1db2356495026702dd9bbc396e000af.tar.bz2 nixlib-d298a961f1db2356495026702dd9bbc396e000af.tar.lz nixlib-d298a961f1db2356495026702dd9bbc396e000af.tar.xz nixlib-d298a961f1db2356495026702dd9bbc396e000af.tar.zst nixlib-d298a961f1db2356495026702dd9bbc396e000af.zip |
Merge pull request #21416 from cstrahan/mesos-1.1.0
mesos: 1.0.1 -> 1.1.0
Diffstat (limited to 'pkgs/development/libraries/protobuf')
-rw-r--r-- | pkgs/development/libraries/protobuf/generic.nix | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/pkgs/development/libraries/protobuf/generic.nix b/pkgs/development/libraries/protobuf/generic.nix index 498263458b50..b7c456df85c4 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 = { |