Build fails with new boost library

Bug #1131736 reported by Raghavendra D Prabhu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Galera
Fix Released
Medium
Alex Yurchenko
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Fix Released
Undecided
Unassigned

Bug Description

On Archlinux with

pacman -Q | grep boost
boost 1.52.0-1
boost-libs 1.52.0-1

it fails with error - https://gist.github.com/b6aab55b73aa83cb83fd

Following patch helps to fix it:

https://gist.github.com/ronin13/7c123d9790bad5ac73cc

However, I think it will do with some polishing of static vs shared libary for boost_system (both are available) and some checks for it.

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

Error is linking error due to boost pool bug: https://svn.boost.org/trac/boost/ticket/7085

Changed in galera:
status: New → Confirmed
Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

That doesn't help since it fails later with this

sudo /pxc/bin/mysqld --defaults-file=/etc/mysql/my.cnf.pxc --basedir=/pxc --user=mysql
130222 20:29:03 [Warning] The syntax '--log-slow-queries' is deprecated and will be removed in a future release. Please use '--slow-query-log'/'--slow-query-log-file' instead.
130222 20:29:03 [Note] WSREP: Read nil XID from storage engines, skipping position init
130222 20:29:03 [Note] WSREP: wsrep_load(): loading provider library '/pxc/lib/libgalera_smm.so'
130222 20:29:03 [ERROR] WSREP: wsrep_load(): dlopen(): /pxc/lib/libgalera_smm.so: undefined symbol: _ZN5boost6system15system_categoryEv
130222 20:29:03 [ERROR] WSREP: wsrep_load(/pxc/lib/libgalera_smm.so) failed: Invalid argument (22). Reverting to no provider.
130222 20:29:03 [Note] WSREP: Read nil XID from storage engines, skipping position init
130222 20:29:03 [Note] WSREP: wsrep_load(): loading provider library 'none'
130222 20:29:03 [ERROR] Aborting

130222 20:29:03 [Note] WSREP: Service disconnected.
130222 20:29:04 [Note] WSREP: Some threads may fail to exit.
130222 20:29:04 [Note] /pxc/bin/mysqld: Shutdown complete

That is because of

nm -D libgalera_smm.so | =grep -w U | grep boost
                 U _ZN5boost6system15system_categoryEv
                 U _ZN5boost6system16generic_categoryEv

ldd libgalera_smm.so
        linux-vdso.so.1 (0x00007fff63dfe000)
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007fe36eb79000)
        librt.so.1 => /usr/lib/librt.so.1 (0x00007fe36e971000)
        libssl.so.1.0.0 => /usr/lib/libssl.so.1.0.0 (0x00007fe36e705000)
        libcrypto.so.1.0.0 => /usr/lib/libcrypto.so.1.0.0 (0x00007fe36e2fa000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fe36dff7000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007fe36dcf9000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fe36dae3000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007fe36d736000)
        /usr/lib64/ld-linux-x86-64.so.2 (0x00007fe36f218000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0x00007fe36d532000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007fe36d31b000)

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

For the time being, I did with:

=== modified file 'SConstruct'
--- SConstruct 2013-01-21 17:23:55 +0000
+++ SConstruct 2013-02-22 16:08:05 +0000
@@ -188,6 +188,7 @@
 # static linking have beed addressed
 #
 env.Append(LINKFLAGS = link_arch)
+env.Append(LINKFLAGS = '-lboost_system')

 #
 # Check required headers and libraries (autoconf functionality)

=== modified file 'garb/SConscript'
--- garb/SConscript 2012-05-15 16:20:10 +0000
+++ garb/SConscript 2013-02-22 15:29:36 +0000
@@ -42,6 +42,7 @@
     # as a last resort try shared library
     env.Append(LIBS=['boost_program_options'])

+env.Append(LIBS=['boost_system'])
 # special environment for garb_config.cpp
 conf_env = env.Clone()
 Import('GALERA_VER', 'GALERA_REV')

=== modified file 'gcs/src/SConscript'
--- gcs/src/SConscript 2012-03-17 00:19:40 +0000
+++ gcs/src/SConscript 2013-02-22 15:33:39 +0000
@@ -41,6 +41,7 @@
 gcs_test_env.Prepend(LIBS = File('#/gcomm/src/libgcomm.a'))
 gcs_test_env.Prepend(LIBS = File('#/gcache/src/libgcache.a'))
 gcs_test_env.Prepend(LIBS = File('#/gcs/src/libgcs.a'))
+gcs_test_env.Append(LIBS=['boost_system'])

 gcs_test_env.Program(target = 'gcs_test',
                      source = 'gcs_test.c',

(Note: boost_pool=0 didn't help)

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

 +gcs_test_env.Append(LIBS=['boost_system'])

was required because the tests failed without that with same error as first one.

Changed in galera:
importance: Undecided → Medium
Revision history for this message
Alex Yurchenko (ayurchen) wrote :

boost_pool scons parameter was not respected throughout the code which caused use of fast_pool_allocator even with boost_pool=0. Fixed in r147. Building with boost >= 1.50 now works with boost_pool=0.

Changed in galera:
assignee: nobody → Alex Yurchenko (ayurchen)
milestone: none → 23.2.4
status: Confirmed → Fix Committed
Changed in galera:
status: Fix Committed → Fix Released
Changed in percona-xtradb-cluster:
milestone: none → 5.5.30-23.7.4
Changed in percona-xtradb-cluster:
status: New → Fix Released
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/PXC-1295

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.