Skip to content

Commit

Permalink
mongodb: fix build with pcre-8.41
Browse files Browse the repository at this point in the history
master uses a different mongodb branch.
  • Loading branch information
vcunat committed Nov 2, 2017
1 parent a02123d commit d9b0bcc
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pkgs/servers/nosql/mongodb/default.nix
Expand Up @@ -85,6 +85,24 @@ in stdenv.mkDerivation rec {
# don't fail by default on i686
substituteInPlace src/mongo/db/storage/storage_options.h \
--replace 'engine("wiredTiger")' 'engine("mmapv1")'
''
# pcrecpp.h used to export some "using std::foo;" directives before 8.41,
# therefore adding them next to the include should be safe.
# Upstream patch for 3.2 branch apparently doesn't work for our 3.2.9
# https://github.com/mongodb/mongo/commit/18f4c63869a3
+ ''
sed '/^#include <pcrecpp\.h>/i using std::string;' \
-i src/mongo/util/version.cpp.in \
-i src/mongo/util/options_parser/constraints.cpp \
-i src/mongo/util/net/miniwebserver.cpp \
-i src/mongo/shell/dbshell.cpp \
-i src/mongo/shell/bench.cpp \
-i src/mongo/s/catalog/replset/catalog_manager_replica_set_test.cpp \
-i src/mongo/s/catalog/replset/catalog_manager_replica_set.cpp \
-i src/mongo/s/catalog/legacy/catalog_manager_legacy.cpp \
-i src/mongo/db/repl/master_slave.cpp \
-i src/mongo/db/matcher/expression_leaf.cpp \
-i src/mongo/db/dbwebserver.cpp
'';

buildPhase = ''
Expand Down

3 comments on commit d9b0bcc

@pbogdan
Copy link
Member

@pbogdan pbogdan commented on d9b0bcc Nov 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's broken on master too, I'm building 3.4.2 with the upstream patch applied and can submit a PR unless you are working on it already.

@vcunat
Copy link
Member Author

@vcunat vcunat commented on d9b0bcc Nov 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I knew that and pushed a fix in the meantime. For master it was easier.

@pbogdan
Copy link
Member

@pbogdan pbogdan commented on d9b0bcc Nov 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just saw the commit on master :-). Thank you!

Please sign in to comment.