Error "WSREP_DEBUG was not declared in this scope" while compiling on Ubuntu 13.04

Bug #1262716 reported by Valerii Kravchuk on 2013-12-19
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraDB Cluster
Status tracked in 5.6
5.5
Undecided
Unassigned
5.6
Undecided
Unassigned

Bug Description

I've got the following errors while compiling recent PXC 5.5.34 on Ubuntu 13.04:

...
[ 85%] Building CXX object sql/CMakeFiles/sql.dir/sql_manager.cc.o
[ 85%] Building CXX object sql/CMakeFiles/sql.dir/sql_parse.cc.o
/home/openxs/bzr/pxc-5.5/Percona-XtraDB-Cluster-5.5.34/sql/sql_parse.cc: In function Б─≤int mysql_execute_command(THD*)Б─≥:
/home/openxs/bzr/pxc-5.5/Percona-XtraDB-Cluster-5.5.34/sql/sql_parse.cc:2542:78: error: Б─≤WSREP_DEBUGБ─≥ was not declared in this scope
/home/openxs/bzr/pxc-5.5/Percona-XtraDB-Cluster-5.5.34/sql/sql_parse.cc:4357:68: error: Б─≤WSREP_DEBUGБ─≥ was not declared in this scope
/home/openxs/bzr/pxc-5.5/Percona-XtraDB-Cluster-5.5.34/sql/sql_parse.cc:4375:69: error: Б─≤WSREP_DEBUGБ─≥ was not declared in this scope
/home/openxs/bzr/pxc-5.5/Percona-XtraDB-Cluster-5.5.34/sql/sql_parse.cc:4422:71: error: Б─≤WSREP_DEBUGБ─≥ was not declared in this scope
/home/openxs/bzr/pxc-5.5/Percona-XtraDB-Cluster-5.5.34/sql/sql_parse.cc:4966:72: error: Б─≤WSREP_DEBUGБ─≥ was not declared in this scope
/home/openxs/bzr/pxc-5.5/Percona-XtraDB-Cluster-5.5.34/sql/sql_parse.cc:4981:74: error: Б─≤WSREP_DEBUGБ─≥ was not declared in this scope
make[2]: *** [sql/CMakeFiles/sql.dir/sql_parse.cc.o] Error 1
make[1]: *** [sql/CMakeFiles/sql.dir/all] Error 2
make: *** [all] Error 2

Some details about the build environment:

openxs@ao756:~/bzr/pxc-5.5/Percona-XtraDB-Cluster-5.5.34$ cd ..
openxs@ao756:~/bzr/pxc-5.5$ bzr version-info
revision-id: <email address hidden>
date: 2013-12-18 23:23:08 +0530
build-date: 2013-12-19 17:19:39 +0200
revno: 597
branch-nick: pxc-5.5
openxs@ao756:~/bzr/pxc-5.5$ gcc --version
gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

openxs@ao756:~/bzr/pxc-5.5$ cmake --version
cmake version 2.8.10.1

Code was built as usual, using the following commands 9from fc -l):

2006 bzr branch http://bazaar.launchpad.net/~percona-core/percona-xtradb-cluster/5.5/ pxc-5.5
2007 cd pxc-5.5
2008 make
2009 export CFLAGS="-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2"
2010 export CXXFLAGS="-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2"
2011 export LIBS=-lrt
2012 cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_CONFIG=mysql_release -DFEATURE_SET=community -DWITH_EMBEDDED_SERVER=OFF -DCMAKE_INSTALL_PREFIX=/home/openxs/dbs/pxc
2013 cd Percona-XtraDB-Cluster-5.5.34
2014 cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_CONFIG=mysql_release -DFEATURE_SET=community -DWITH_EMBEDDED_SERVER=OFF -DCMAKE_INSTALL_PREFIX=/home/openxs/dbs/pxc
2015 make

Related branches

@Valerii,

You need to provide WITH_WSREP=ON . Please check build-binary.sh in bzr tree.

Also, currently the 5.5 trunk is bzr+ssh://bazaar.launchpad.net/~percona-core/percona-xtradb-cluster/trunk-25/
  parent

Well, how one could know about that trunk-25? I am checking with -DWITH_WSREP=ON added, but how one can guess it is needed (it was not the case some time ago)?

Why cmake that outputs suggested commands does NOT list this option if it is mandatory for successful build?

After adding -DWITH_WSREP=ON to cmake command line everything was built successfully. So, there just a minor problem:

Why make does not include -DWITH_WSREP=ON into cmake command it outputs if it is now mandatory?

Manual (http://www.percona.com/doc/percona-xtradb-cluster/5.5/installation/compiling_xtradb_cluster.html) actually says that it should be added to cmake command line.

Alex Yurchenko (ayurchen) wrote :

Valerii, it is not mandatory, it is simply a regression. It was fixed in r4023 of codership's sources and so must be in the head of Percona's tree as well. The goal is that you should be able to build mysql without wsrep patch from the same sources.

However a consequent merge with 5.6.15 seem to have introduced another regression, fixed in r4029

@Valerii,

Yes, WITH_WSREP to be ON should be default for the tree. I will
do that.

Regarding adding to cmake command line, yes, it is required if
you want to build it for galera, otherwise you will be building
just the vanilla mysqld.

Download full text (6.4 KiB)

Fixed in 5.6 tree.

For 5.5 it is broken in lock0lock, and needs to be fixed in codership-5.5 as well.

======================================================
/media/Tintin/Work/code/percona-xtradb-cluster/trunk-25/Percona-Server/storage/innobase/lock/lock0lock.c:1056:12: warning: passing argument 2 of ‘lock_rec_has_to_wait’ makes integer from pointer without a cast [enabled by default]
            lock1, 1)));
            ^
/media/Tintin/Work/code/percona-xtradb-cluster/trunk-25/Percona-Server/storage/innobase/lock/lock0lock.c:911:1: note: expected ‘ulint’ but argument is of type ‘struct trx_t * const’
 lock_rec_has_to_wait(
 ^
/media/Tintin/Work/code/percona-xtradb-cluster/trunk-25/Percona-Server/storage/innobase/lock/lock0lock.c:1056:12: warning: passing argument 3 of ‘lock_rec_has_to_wait’ makes pointer from integer without a cast [enabled by default]
            lock1, 1)));
            ^
/media/Tintin/Work/code/percona-xtradb-cluster/trunk-25/Percona-Server/storage/innobase/lock/lock0lock.c:911:1: note: expected ‘const struct ib_lock_t *’ but argument is of type ‘ulint’
 lock_rec_has_to_wait(
 ^
/media/Tintin/Work/code/percona-xtradb-cluster/trunk-25/Percona-Server/storage/innobase/lock/lock0lock.c:1056:12: warning: passing argument 4 of ‘lock_rec_has_to_wait’ makes integer from pointer without a cast [enabled by default]
            lock1, 1)));
            ^
/media/Tintin/Work/code/percona-xtradb-cluster/trunk-25/Percona-Server/storage/innobase/lock/lock0lock.c:911:1: note: expected ‘ulint’ but argument is of type ‘const struct ib_lock_t *’
 lock_rec_has_to_wait(
 ^
/media/Tintin/Work/code/percona-xtradb-cluster/trunk-25/Percona-Server/storage/innobase/lock/lock0lock.c:1056:12: error: too many arguments to function ‘lock_rec_has_to_wait’
            lock1, 1)));
            ^
/media/Tintin/Work/code/percona-xtradb-cluster/trunk-25/Percona-Server/storage/innobase/lock/lock0lock.c:911:1: note: declared here
 lock_rec_has_to_wait(
 ^
/media/Tintin/Work/code/percona-xtradb-cluster/trunk-25/Percona-Server/storage/innobase/lock/lock0lock.c: In function ‘lock_rec_other_has_conflicting’:
/media/Tintin/Work/code/percona-xtradb-cluster/trunk-25/Percona-Server/storage/innobase/lock/lock0lock.c:1632:9: warning: passing argument 1 of ‘lock_rec_has_to_wait’ makes pointer from integer without a cast [enabled by default]
         TRUE)) {
         ^
/media/Tintin/Work/code/percona-xtradb-cluster/trunk-25/Percona-Server/storage/innobase/lock/lock0lock.c:911:1: note: expected ‘const struct trx_t *’ but argument is of type ‘int’
 lock_rec_has_to_wait(
 ^
/media/Tintin/Work/code/percona-xtradb-cluster/trunk-25/Percona-Server/storage/innobase/lock/lock0lock.c:1632:9: warning: passing argument 2 of ‘lock_rec_has_to_wait’ makes integer from pointer without a cast [enabled by default]
         TRUE)) {
         ^
/media/Tintin/Work/code/percona-xtradb-cluster/trunk-25/Percona-Server/storage/innobase/lock/lock0lock.c:911:1: note: expected ‘ulint’ but argument is of type ‘struct trx_t *’
 lock_rec_has_to_wait(
 ^
/media/Tintin/Work/code/percona-xtradb-cluster/trunk-25/Percona-Server/storage/innobase/lock/lock0lock.c:1632:9: error: incompatible type for argumen...

Read more...

Works now in 5.6 tree as well with latest fix merged from codership tree.

Works in 5.5 as well.

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

Other bug subscribers