Skip to Main Content

Berkeley DB Family

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Failed to compile on Ubuntu 16.04 gcc 6.5.0

130b1980-611e-4f0e-b3ce-f7f01c31b68dJan 18 2019 — edited Jan 18 2019

Failed to build due to node index and multimap value types mismatch.

It need to apply the next patch:

diff --git a/src/dbxml/nodeStore/NsUpdate.cpp b/src/dbxml/nodeStore/NsUpdate.cpp

index dc5362c..5192803 100644

--- a/src/dbxml/nodeStore/NsUpdate.cpp

+++ b/src/dbxml/nodeStore/NsUpdate.cpp

@@ -1359,21 +1359,13 @@ int NsUpdate::getTextIndex(const std::string &key, int index) const

void NsUpdate::attributeRemoved(const DbXmlNodeImpl &node)

{

  string key = makeKey(node);

-#if defined(_MSC_VER) && (_MSC_VER>1600)

  attrMap_.insert(make_pair(key,node.getIndex()));

-#else

- attrMap_.insert(make_pair<const std::string, int>(key,node.getIndex()));

-#endif

}

void NsUpdate::textRemoved(const DbXmlNodeImpl &node)

{

  string key = makeKey(node);

-#if defined(_MSC_VER) && (_MSC_VER>1600)

  textDeleteMap_.insert(make_pair(key,node.getIndex()));

-#else

- textDeleteMap_.insert(make_pair<const std::string, int>(key,node.getIndex()));

-#endif

}

void NsUpdate::textRemoved(int index, const NsNid &nid,

@@ -1381,21 +1373,13 @@ void NsUpdate::textRemoved(int index, const NsNid &nid,

     const std::string &cname)

{

  string key = makeKey(nid, did, cname);

-#if defined(_MSC_VER) && (_MSC_VER>1600)

  textDeleteMap_.insert(make_pair(key,index));

-#else

- textDeleteMap_.insert(make_pair<const std::string, int>(key,index));

-#endif

}

void NsUpdate::textInserted(int index, const DbXmlNodeImpl &node)

{

  string key = makeKey(node);

-#if defined(_MSC_VER) && (_MSC_VER>1600)

  textInsertMap_.insert(make_pair(key,index));

-#else

- textInsertMap_.insert(make_pair<const std::string, int>(key,index));

-#endif

}

void NsUpdate::textInserted(int index, const NsNid &nid,

@@ -1403,11 +1387,7 @@ void NsUpdate::textInserted(int index, const NsNid &nid,

      const std::string &cname)

{

  string key = makeKey(nid, did, cname);

-#if defined(_MSC_VER) && (_MSC_VER>1600)

  textInsertMap_.insert(make_pair(key,index));

-#else

- textInsertMap_.insert(make_pair<const std::string, int>(key,index));

-#endif

}

//

diff --git a/src/dbxml/nodeStore/NsUpdate.hpp b/src/dbxml/nodeStore/NsUpdate.hpp

index 9b36ea9..68915cc 100644

--- a/src/dbxml/nodeStore/NsUpdate.hpp

+++ b/src/dbxml/nodeStore/NsUpdate.hpp

@@ -97,7 +97,7 @@ private:

  OperationContext &oc_;

};

-typedef std::multimap<std::string, int> UpdateMap;

+typedef std::multimap<std::string, u_int32_t> UpdateMap;

typedef std::map<std::string, Document*> RewriteMap;

typedef std::map<std::string, NidMarker> NidMap;

typedef std::map<int, IndexInfo*> IndexInfoMap;

Comments
Post Details
Added on Jan 18 2019
0 comments
411 views