Can't compile galera/2.x

Bug #926464 reported by Vadim Tkachenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Galera
Fix Released
Undecided
Alex Yurchenko

Bug Description

Centos 6.2

revno: 114

-Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src galerautils/src/gu_utils++.cpp
galerautils/src/gu_string.cpp: In function 'void gu::trim(std::string&)':
galerautils/src/gu_string.cpp:84:11: error: 'ssize_t' does not name a type
galerautils/src/gu_string.cpp:86:10: error: 'ssize_t' was not declared in this scope
galerautils/src/gu_string.cpp:86:18: error: expected ';' before 'begin'
galerautils/src/gu_string.cpp:86:29: error: 'begin' was not declared in this scope
galerautils/src/gu_string.cpp:86:37: error: 's_length' was not declared in this scope
galerautils/src/gu_string.cpp:90:26: error: expected ';' before 'end'
galerautils/src/gu_string.cpp:90:46: error: 'end' was not declared in this scope

Related branches

Revision history for this message
Vadim Tkachenko (vadim-tk) wrote :

Have you able to reproduce it ?
It blocks us with RedHat / CentOS 6 binaries.

Revision history for this message
Alex Yurchenko (ayurchen) wrote :

We could not reproduce it, but hopefully the fix is in the latest commits.
Sorry for delay, it had to go on top of some not very tested changes.

Changed in galera:
assignee: nobody → Alex Yurchenko (ayurchen)
status: New → Fix Committed
Revision history for this message
Vadim Tkachenko (vadim-tk) wrote :

with rev 115 I am getting another error:

src -Iwsdb/src -Igalera/src galerautils/src/gu_dbug.c
galerautils/src/gu_resolver.cpp: In function 'unsigned int get_ifindex_by_addr(const gu::net::Sockaddr&)':
galerautils/src/gu_resolver.cpp:226:13: error: 'close' was not declared in this scope

Revision history for this message
Alex Yurchenko (ayurchen) wrote :

How about now?

Revision history for this message
Vadim Tkachenko (vadim-tk) wrote :
Download full text (22.9 KiB)

Now it is:

builder_unit_test(["galera/tests/galera_check.passed"], ["galera/tests/galera_check"])
/data/opt/vadim/src/xtradb-cluster/2.x/galera/tests/galera_check: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /data/opt/vadim/src/xtradb-cluster/2.x/galera/tests/galera_check)
scons: *** [galera/tests/galera_check.passed] Error 1
g++ -o gcomm/src/gmcast.o -c -Wno-long-long -Wno-deprecated -pedantic -ansi -Weffc++ -Wold-style-cast -fno-strict-aliasing -g -O3 -DNDEBUG -pipe -Wall -Wextra -Werror -Wno-unused-parameter -m64 -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_BOOST_UNORDERED_MAP_HPP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DGALERA_USE_BOOST_POOL_ALLOC=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -DHAVE_ASIO_HPP -Icommon -Iasio -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src gcomm/src/gmcast.cpp
In file included from gcomm/src/gcomm/view.hpp:16:0,
                 from gcomm/src/evs_message2.hpp:12,
                 from gcomm/src/evs_consensus.cpp:6:
gcomm/src/gcomm/map.hpp: In instantiation of 'gcomm::Map<K, V, C>::iterator gcomm::Map<K, V, C>::insert_unique(const typename gcomm::MapBase<K, V, C>::value_type&) [with K = gcomm::UUID; V = gcomm::evs::MessageNode; C = std::map<gcomm::UUID, gcomm::evs::MessageNode, std::less<gcomm::UUID>, std::allocator<std::pair<const gcomm::UUID, gcomm::evs::MessageNode> > >; gcomm::Map<K, V, C>::iterator = std::_Rb_tree_iterator<std::pair<const gcomm::UUID, gcomm::evs::MessageNode> >; typename gcomm::MapBase<K, V, C>::value_type = std::pair<const gcomm::UUID, gcomm::evs::MessageNode>]':
gcomm/src/evs_message2.hpp:653:33: required from here
gcomm/src/gcomm/map.hpp:224:17: error: no matching function for call to 'get_value(const value_type&)'
gcomm/src/gcomm/map.hpp:224:17: note: candidate is:
gcomm/src/gcomm/map.hpp:275:14: note: template<class K, class V> const V& gcomm::get_value(const typename gcomm::Map<K, V>::value_type&)
gcomm/src/gcomm/map.hpp:275:14: note: template argument deduction/substitution failed:
gcomm/src/gcomm/map.hpp:224:17: note: couldn't deduce template parameter 'K'
gcomm/src/gcomm/map.hpp:224:17: error: no matching function for call to 'get_key(const value_type&)'
gcomm/src/gcomm/map.hpp:224:17: note: candidates are:
gcomm/src/gcomm/map.hpp:269:14: note: template<class K, class V> const K& gcomm::get_key(const typename gcomm::Map<K, V>::value_type&)
gcomm/src/gcomm/map.hpp:269:14: note: template argument deduction/substitution failed:
gcomm/src/gcomm/map.hpp:224:17: note: couldn't deduce template parameter 'K'
gcomm/src/gcomm/map.hpp:263:14: note: template<class K, class V> const K& gcomm::get_key(typename gcomm::Map<K, V>::const_iterator)
gcomm/src/gcomm/map.hpp:263:14: note: template argument deduction/substitution failed:
gcomm/src/gcomm/map.hpp:224:17: note: couldn't deduce template parameter 'K'
gcomm/src/gcomm/map.hpp: In instantiation of 'gcomm::Map<K, V, C>::iterator gcomm::Map<K, V, C>::insert_unique(const typename gcomm::MapBase<K, V, C>::value_type&) [with K = gcomm::UUID; V = gcomm::evs::Node; C = std::map...

Revision history for this message
Alex Yurchenko (ayurchen) wrote :

Vadim, have you by any chance copied build directory from some other machine as opposed to doing a clean checkout? If so, you should clean bzr tree before proceeding. Also could you please post the command line you're using to build galera?

Revision history for this message
Vadim Tkachenko (vadim-tk) wrote :

Alex,

To double check, I made bzr branch into totally new directory, so I am sure this is clean build.

I do build as:
./scripts/build.sh

Revision history for this message
Alex Yurchenko (ayurchen) wrote :

Have you mangled/modified gcc and/or libstdc++ packages on that system? What are their versions? Do they come from CentOS? Could you try to build on another CentOS machine? Me and Teemu tried to reproduce it independently with no success.

It looks very much like the build environment on that machine is broken. I can understand missing includes, but this:

/data/opt/vadim/src/xtradb-cluster/2.x/galera/tests/galera_check: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /data/opt/vadim/src/xtradb-cluster/2.x/galera/tests/galera_check)

is clearly not a source code problem.

Revision history for this message
Vadim Tkachenko (vadim-tk) wrote :

Alex,

That's right. I have custom gcc 4.7 there.

I moved back to gcc 4.4 that comes with CentOS 6.2, and not all is fine. Sorry.

Revision history for this message
Alex Yurchenko (ayurchen) wrote :

Closing as fixed - if there ever was a bug.

Changed in galera:
status: Fix Committed → Fix Released
Revision history for this message
Ignacio Nin (ignacio-nin) wrote :

Hello,

Confirming this for gcc 4.7, the problem seems to be in gcomm/src/gcomm/map.hpp

$ gcc -dumpversion
4.7

For Ubuntu 12.10:

$ g++ -o gcomm/src/evs_consensus.o -c -Wno-long-long -Wno-deprecated -ansi -pipe -Weffc++ -Wold-style-cast -fno-strict-aliasing -g -O3 -DNDEBUG -m64 -Wall -Wextra -Werror -Wno-unused-parameter -pedantic -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DGALERA_USE_BOOST_POOL_ALLOC=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -Icommon -Iasio -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src gcomm/src/evs_consensus.cpp
In file included from gcomm/src/gcomm/view.hpp:16:0,
                 from gcomm/src/evs_message2.hpp:12,
                 from gcomm/src/evs_consensus.cpp:6:
gcomm/src/gcomm/map.hpp: In instantiation of ‘gcomm::Map<K, V, C>::iterator gcomm::Map<K, V, C>::insert_unique(const typename gcomm::MapBase<K, V, C>::value_type&) [with K = gcomm::UUID; V = gcomm::evs::MessageNode; C = std::map<gcomm::UUID, gcomm::evs::MessageNode, std::less<gcomm::UUID>, std::allocator<std::pair<const gcomm::UUID, gcomm::evs::MessageNode> > >; gcomm::Map<K, V, C>::iterator = std::_Rb_tree_iterator<std::pair<const gcomm::UUID, gcomm::evs::MessageNode> >; typename gcomm::MapBase<K, V, C>::value_type = std::pair<const gcomm::UUID, gcomm::evs::MessageNode>]’:
gcomm/src/evs_message2.hpp:653:33: required from here
gcomm/src/gcomm/map.hpp:226:17: error: no matching function for call to ‘get_value(const value_type&)’
gcomm/src/gcomm/map.hpp:226:17: note: candidate is:
gcomm/src/gcomm/map.hpp:277:14: note: template<class K, class V> const V& gcomm::get_value(const typename gcomm::Map<K, V>::value_type&)
gcomm/src/gcomm/map.hpp:277:14: note: template argument deduction/substitution failed:
gcomm/src/gcomm/map.hpp:226:17: note: couldn't deduce template parameter ‘K’
gcomm/src/gcomm/map.hpp:226:17: error: no matching function for call to ‘get_key(const value_type&)’
gcomm/src/gcomm/map.hpp:226:17: note: candidates are:
gcomm/src/gcomm/map.hpp:271:14: note: template<class K, class V> const K& gcomm::get_key(const typename gcomm::Map<K, V>::value_type&)
gcomm/src/gcomm/map.hpp:271:14: note: template argument deduction/substitution failed:
gcomm/src/gcomm/map.hpp:226:17: note: couldn't deduce template parameter ‘K’
gcomm/src/gcomm/map.hpp:265:14: note: template<class K, class V> const K& gcomm::get_key(typename gcomm::Map<K, V>::const_iterator)
gcomm/src/gcomm/map.hpp:265:14: note: template argument deduction/substitution failed:
gcomm/src/gcomm/map.hpp:226:17: note: couldn't deduce template parameter ‘K’

Revision history for this message
Teemu Ollakka (teemu-ollakka) wrote :

Fix to gcc 4.7 build problem pushed in lp:galera/2.x rev 138

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.