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!

dbxml-6.1.4 won't build on Linux with GCC

3129295Jul 3 2019 — edited Jul 11 2019

I downloaded dbxml-6.1.4.tar.gz from the download page, extracted it using 'tar xpf', 'cd'-ed into the resulting directory, and called './buildall.sh'. However, after some time, I encountered this error:

/bin/sh ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..   -I../include/ -I/home/koz/dbxml-6.1.4/install/include -I/home/koz/dbxml-6.1.4/install/include -I/home/koz/dbxml-6.1.4/install/include -I/usr/include -D_DBXML_COMPRESSION  -O2 -MT NsUpdate.lo -MD -MP -MF .deps/NsUpdate.Tpo -c -o NsUpdate.lo `test -f 'src/dbxml/nodeStore/NsUpdate.cpp' || echo '../'`src/dbxml/nodeStore/NsUpdate.cpp

g++ -DHAVE_CONFIG_H -I. -I.. -I../include/ -I/home/koz/dbxml-6.1.4/install/include -I/home/koz/dbxml-6.1.4/install/include -I/home/koz/dbxml-6.1.4/install/include -I/usr/include -D_DBXML_COMPRESSION -O2 -MT NsUpdate.lo -MD -MP -MF .deps/NsUpdate.Tpo -c ../src/dbxml/nodeStore/NsUpdate.cpp  -fPIC -DPIC -o .libs/NsUpdate.o

../src/dbxml/nodeStore/NsUpdate.cpp: In member function ‘void DbXml::NsUpdate::attributeRemoved(const DbXml::DbXmlNodeImpl&)’:

../src/dbxml/nodeStore/NsUpdate.cpp:1365:52: error: cannot bind rvalue reference of type ‘const std::__cxx11::basic_string<char>&&’ to lvalue of type ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’}

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

      |                                                    ^~~

In file included from /usr/include/c++/9.1.0/bits/stl_algobase.h:64,

                 from /usr/include/c++/9.1.0/bits/char_traits.h:39,

                 from /usr/include/c++/9.1.0/string:40,

                 from ../src/dbxml/nodeStore/../DbXmlInternal.hpp:38,

                 from ../src/dbxml/nodeStore/NsUpdate.cpp:7:

/usr/include/c++/9.1.0/bits/stl_pair.h:524:21: note:   initializing argument 1 of ‘constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&) [with _T1 = const std::__cxx11::basic_string<char>; _T2 = int; typename std::__decay_and_strip<_T2>::__type = int; typename std::__decay_and_strip<_Tp>::__type = std::__cxx11::basic_string<char>]’

  524 |     make_pair(_T1&& __x, _T2&& __y)

      |               ~~~~~~^~~

../src/dbxml/nodeStore/NsUpdate.cpp: In member function ‘void DbXml::NsUpdate::textRemoved(const DbXml::DbXmlNodeImpl&)’:

../src/dbxml/nodeStore/NsUpdate.cpp:1375:58: error: cannot bind rvalue reference of type ‘const std::__cxx11::basic_string<char>&&’ to lvalue of type ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’}

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

      |                                                          ^~~

In file included from /usr/include/c++/9.1.0/bits/stl_algobase.h:64,

                 from /usr/include/c++/9.1.0/bits/char_traits.h:39,

                 from /usr/include/c++/9.1.0/string:40,

                 from ../src/dbxml/nodeStore/../DbXmlInternal.hpp:38,

                 from ../src/dbxml/nodeStore/NsUpdate.cpp:7:

/usr/include/c++/9.1.0/bits/stl_pair.h:524:21: note:   initializing argument 1 of ‘constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&) [with _T1 = const std::__cxx11::basic_string<char>; _T2 = int; typename std::__decay_and_strip<_T2>::__type = int; typename std::__decay_and_strip<_Tp>::__type = std::__cxx11::basic_string<char>]’

  524 |     make_pair(_T1&& __x, _T2&& __y)

      |               ~~~~~~^~~

../src/dbxml/nodeStore/NsUpdate.cpp: In member function ‘void DbXml::NsUpdate::textRemoved(int, const DbXml::NsNid&, const DbXml::DocID&, const string&)’:

../src/dbxml/nodeStore/NsUpdate.cpp:1387:58: error: cannot bind rvalue reference of type ‘const std::__cxx11::basic_string<char>&&’ to lvalue of type ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’}

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

      |                                                          ^~~

In file included from /usr/include/c++/9.1.0/bits/stl_algobase.h:64,

                 from /usr/include/c++/9.1.0/bits/char_traits.h:39,

                 from /usr/include/c++/9.1.0/string:40,

                 from ../src/dbxml/nodeStore/../DbXmlInternal.hpp:38,

                 from ../src/dbxml/nodeStore/NsUpdate.cpp:7:

/usr/include/c++/9.1.0/bits/stl_pair.h:524:21: note:   initializing argument 1 of ‘constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&) [with _T1 = const std::__cxx11::basic_string<char>; _T2 = int; typename std::__decay_and_strip<_T2>::__type = int; typename std::__decay_and_strip<_Tp>::__type = std::__cxx11::basic_string<char>]’

  524 |     make_pair(_T1&& __x, _T2&& __y)

      |               ~~~~~~^~~

../src/dbxml/nodeStore/NsUpdate.cpp: In member function ‘void DbXml::NsUpdate::textInserted(int, const DbXml::DbXmlNodeImpl&)’:

../src/dbxml/nodeStore/NsUpdate.cpp:1397:58: error: cannot bind rvalue reference of type ‘const std::__cxx11::basic_string<char>&&’ to lvalue of type ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’}

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

      |                                                          ^~~

In file included from /usr/include/c++/9.1.0/bits/stl_algobase.h:64,

                 from /usr/include/c++/9.1.0/bits/char_traits.h:39,

                 from /usr/include/c++/9.1.0/string:40,

                 from ../src/dbxml/nodeStore/../DbXmlInternal.hpp:38,

                 from ../src/dbxml/nodeStore/NsUpdate.cpp:7:

/usr/include/c++/9.1.0/bits/stl_pair.h:524:21: note:   initializing argument 1 of ‘constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&) [with _T1 = const std::__cxx11::basic_string<char>; _T2 = int; typename std::__decay_and_strip<_T2>::__type = int; typename std::__decay_and_strip<_Tp>::__type = std::__cxx11::basic_string<char>]’

  524 |     make_pair(_T1&& __x, _T2&& __y)

      |               ~~~~~~^~~

../src/dbxml/nodeStore/NsUpdate.cpp: In member function ‘void DbXml::NsUpdate::textInserted(int, const DbXml::NsNid&, const DbXml::DocID&, const string&)’:

../src/dbxml/nodeStore/NsUpdate.cpp:1409:58: error: cannot bind rvalue reference of type ‘const std::__cxx11::basic_string<char>&&’ to lvalue of type ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’}

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

      |                                                          ^~~

In file included from /usr/include/c++/9.1.0/bits/stl_algobase.h:64,

                 from /usr/include/c++/9.1.0/bits/char_traits.h:39,

                 from /usr/include/c++/9.1.0/string:40,

                 from ../src/dbxml/nodeStore/../DbXmlInternal.hpp:38,

                 from ../src/dbxml/nodeStore/NsUpdate.cpp:7:

/usr/include/c++/9.1.0/bits/stl_pair.h:524:21: note:   initializing argument 1 of ‘constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&) [with _T1 = const std::__cxx11::basic_string<char>; _T2 = int; typename std::__decay_and_strip<_T2>::__type = int; typename std::__decay_and_strip<_Tp>::__type = std::__cxx11::basic_string<char>]’

  524 |     make_pair(_T1&& __x, _T2&& __y)

      |               ~~~~~~^~~

make[1]: *** [Makefile:2694: NsUpdate.lo] Error 1

make[1]: Leaving directory '/home/koz/dbxml-6.1.4/dbxml/build_unix'

make: *** [Makefile:1696: all] Error 2

For reference, I am on Arch Linux, and my GCC version (according to 'gcc --version') is 9.1.0. Am I doing something incorrectly?

Comments
Post Details
Added on Jul 3 2019
1 comment
602 views