percona-xtrabackup fails to build with boost-1.65.0: sql/item_geofunc_internal.cc:42:3: error: expected primary-expression before 'catch'

Bug #1718461 reported by Tomas Mozes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
New
Undecided
Unassigned

Bug Description

Downstream bug: https://bugs.gentoo.org/630946

Percona-xtrabackup 2.4.8 fails to build with boost 1.65.0 (it works fine with boost 1.63.0):

[ 64%] Building CXX object storage/innobase/CMakeFiles/innobase.dir/handler/ha_innopart.cc.o
cd /var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8_build/storage/innobase && /usr/bin/x86_64-pc-linux-gnu-g++ -DCOMPILER_HINTS -DHAVE_CONFIG_H -DHAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE=1 -DHAVE_IB_ATOMIC_PTHREAD_T_GCC=1 -DHAVE_IB_GCC_ATOMIC_COMPARE_EXCHANGE=1 -DHAVE_IB_GCC_ATOMIC_THREAD_FENCE=1 -DHAVE_IB_GCC_SYNC_SYNCHRONISE=1 -DHAVE_IB_LINUX_FUTEX=1 -DHAVE_LZ4=1 -DHAVE_NANOSLEEP=1 -DHAVE_SCHED_GETCPU=1 -DLINUX_NATIVE_AIO=1 -DMUTEX_EVENT -DXTRABACKUP -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8_build/include -I/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/extra/rapidjson/include -I/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8_build/libbinlogevents/include -I/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/libbinlogevents/export -I/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/storage/innobase/include -I/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/storage/innobase/handler -I/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/libbinlogevents/include -I/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/include -I/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/sql -I/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/sql/auth -I/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/regex -I/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/extra/yassl/include -I/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/extra/yassl/taocrypt/include -DDBUG_OFF -mtune=native -O2 -pipe -fPIC -Wall -Wextra -Wformat-security -Wvla -Woverloaded-virtual -Wno-unused-parameter -DDBUG_OFF -DDBUG_OFF -DUNIV_LINUX -D_GNU_SOURCE=1 -o CMakeFiles/innobase.dir/handler/ha_innopart.cc.o -c /var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/storage/innobase/handler/ha_innopart.cc
/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/sql/item_geofunc_internal.cc: In function 'void handle_gis_exception(const char*)':
/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/sql/item_geofunc_internal.cc:37:81: error: expected unqualified-id before '&' token
   catch (const boost::geometry::detail::self_get_turn_points::self_ip_exception &)
                                                                                 ^
/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/sql/item_geofunc_internal.cc:37:81: error: expected ')' before '&' token
/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/sql/item_geofunc_internal.cc:37:81: error: expected '{' before '&' token
/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/sql/item_geofunc_internal.cc:37:82: error: expected primary-expression before ')' token
   catch (const boost::geometry::detail::self_get_turn_points::self_ip_exception &)
                                                                                  ^
/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/sql/item_geofunc_internal.cc:42:3: error: expected primary-expression before 'catch'
   catch (const boost::geometry::empty_input_exception &)
   ^~~~~
/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/sql/item_geofunc_internal.cc:46:3: error: expected primary-expression before 'catch'
   catch (const boost::geometry::inconsistent_turns_exception &)
   ^~~~~
/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/sql/item_geofunc_internal.cc:50:3: error: expected primary-expression before 'catch'
   catch (const boost::geometry::exception &)
   ^~~~~
/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/sql/item_geofunc_internal.cc:54:3: error: expected primary-expression before 'catch'
   catch (const std::bad_alloc &e)
   ^~~~~
/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/sql/item_geofunc_internal.cc:58:3: error: expected primary-expression before 'catch'
   catch (const std::domain_error &e)
   ^~~~~
/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/sql/item_geofunc_internal.cc:62:3: error: expected primary-expression before 'catch'
   catch (const std::length_error &e)
   ^~~~~
/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/sql/item_geofunc_internal.cc:66:3: error: expected primary-expression before 'catch'
   catch (const std::invalid_argument &e)
   ^~~~~
/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/sql/item_geofunc_internal.cc:70:3: error: expected primary-expression before 'catch'
   catch (const std::out_of_range &e)
   ^~~~~
/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/sql/item_geofunc_internal.cc:74:3: error: expected primary-expression before 'catch'
   catch (const std::overflow_error &e)
   ^~~~~
/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/sql/item_geofunc_internal.cc:78:3: error: expected primary-expression before 'catch'
   catch (const std::range_error &e)
   ^~~~~
/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/sql/item_geofunc_internal.cc:82:3: error: expected primary-expression before 'catch'
   catch (const std::underflow_error &e)
   ^~~~~
/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/sql/item_geofunc_internal.cc:86:3: error: expected primary-expression before 'catch'
   catch (const std::logic_error &e)
   ^~~~~
/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/sql/item_geofunc_internal.cc:90:3: error: expected primary-expression before 'catch'
   catch (const std::runtime_error &e)
   ^~~~~
/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/sql/item_geofunc_internal.cc:94:3: error: expected primary-expression before 'catch'
   catch (const std::exception &e)
   ^~~~~
/var/tmp/portage/dev-db/percona-xtrabackup-2.4.8/work/percona-xtrabackup-2.4.8/sql/item_geofunc_internal.cc:98:3: error: expected primary-expression before 'catch'
   catch (...)
   ^~~~~

Revision history for this message
Tomas Mozes (hydrapolic) wrote :
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Unfortunately, this dependency comes from upstream MySQL code which only compatible with specific versions of boost. xtrabackup does is not linked against boost shared libraries, so it really doesn't matter which boost version comes as system library. To build xtrabackup with specific version of boost, you can use -DWITH_BOOST and -DDOWNLOAD_BOOST options (see details here http://mysqlserverteam.com/building-mysql-5-7/)

Revision history for this message
Tomas Mozes (hydrapolic) wrote :

On Gentoo Linux we remove the bundled 1.59.0 version of Boost and use the system libraries instead. We also remove the other bundled libs like lz4, libedit, zlib, etc.

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

And how do you deal with include/boost*/patches? Do you modify them to work with your system boost version? It is not xtrabackup-specific, it is upstream MySQL that carry some bugfixes to boost. Does latest MySQL 5.7 build with boost 1.65.0?

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Note, that neither MySQL nor xtrabackup doe not link with shared boost libraries, they only use boost header files.

Revision history for this message
Tomas Mozes (hydrapolic) wrote :

Yeah, sorry, I thought it's linked to boost, but it's not as you say:

# ldd /usr/bin/xtrabackup
        linux-vdso.so.1 (0x00007ffff5d4a000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa8bf64f000)
        libgcrypt.so.20 => /usr/lib64/libgcrypt.so.20 (0x00007fa8bf332000)
        librt.so.1 => /lib64/librt.so.1 (0x00007fa8bf12a000)
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fa8beef3000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fa8becef000)
        liblz4.so.1 => /usr/lib64/liblz4.so.1 (0x00007fa8beadb000)
        libz.so.1 => /lib64/libz.so.1 (0x00007fa8be8c4000)
        libaio.so.1 => /lib64/libaio.so.1 (0x00007fa8be6c2000)
        libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libstdc++.so.6 (0x00007fa8be2ca000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fa8bdfc6000)
        libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libgcc_s.so.1 (0x00007fa8bddaf000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fa8bda16000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fa8bf86b000)
        libgpg-error.so.0 => /usr/lib64/libgpg-error.so.0 (0x00007fa8bd801000)

Revision history for this message
Tomas Mozes (hydrapolic) wrote :

No, we don't modify boost with those patches, we use a common boost library for all applications.

We don't have mysql 5.7 in our tree, most of the users are on mariadb or percona server so I cannot check.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXB-1473

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.