pbxt doesn't build on debian ppc 32bit

Bug #567402 reported by Lee Bieber
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
Won't Fix
High
Paul McCullagh
Cherry
Fix Released
High
Paul McCullagh

Bug Description

See the complete log at http://hudson.drizzle.org/view/Drizzle-build/job/drizzle-build-debian-ppc-32bit/365/console

g++ -DHAVE_CONFIG_H -I. -I. -ggdb3 -pipe -mno-fused-madd -std=gnu++0x -O3 -Werror -pedantic -Wall -Wundef -Wshadow -fdiagnostics-show-option -Wformat -fno-strict-aliasing -Wno-strict-aliasing -Wextra -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-long-long -Wmissing-declarations -Wno-redundant-decls -DDRIZZLED -Wno-overloaded-virtual -Wno-sign-compare -Wno-unused-function -MT plugin/pbxt/src/plugin_pbxt_libpbxt_la-cache_xt.lo -MD -MP -MF plugin/pbxt/src/.deps/plugin_pbxt_libpbxt_la-cache_xt.Tpo -c plugin/pbxt/src/cache_xt.cc -fPIC -DPIC -o plugin/pbxt/src/.libs/plugin_pbxt_libpbxt_la-cache_xt.o
cc1plus: warnings being treated as errors
plugin/pbxt/src/cache_xt.cc:372: error: unused parameter ‘thread’ [-Wunused-parameter]
plugin/pbxt/src/cache_xt.cc:829: error: unused parameter ‘ot’ [-Wunused-parameter]

Related branches

Revision history for this message
Paul McCullagh (paul-mccullagh) wrote :

The problem with this function:

xtPublic void xt_ind_release_handle(XTIndHandlePtr handle, xtBool have_lock, XTThreadPtr thread)

is that 'thread' is not used if atomic ops are not used(i.e. if the global XT_NO_ATOMICS is defined).

In cache_xt.cc, we see:

#ifdef XT_NO_ATOMICS
#define IDX_CAC_USE_PTHREAD_RW
#else
//#define IDX_CAC_USE_PTHREAD_RW
#define IDX_CAC_USE_XSMUTEX
//#define IDX_USE_SPINXSLOCK
#endif

#if defined(IDX_CAC_USE_PTHREAD_RW)
#define IDX_CAC_LOCK_TYPE xt_rwlock_type
#define IDX_CAC_INIT_LOCK(s, i) xt_init_rwlock_with_autoname(s, &(i)->cs_lock)
#define IDX_CAC_FREE_LOCK(s, i) xt_free_rwlock(&(i)->cs_lock)
#define IDX_CAC_READ_LOCK(i, o) xt_slock_rwlock_ns(&(i)->cs_lock)
#define IDX_CAC_WRITE_LOCK(i, o) xt_xlock_rwlock_ns(&(i)->cs_lock)
#define IDX_CAC_UNLOCK(i, o) xt_unlock_rwlock_ns(&(i)->cs_lock)
#elif defined(IDX_CAC_USE_XSMUTEX)
....

So the macro IDX_CAC_READ_LOCK(i, o) ignores the thread parameter (o) in the case of XT_NO_ATOMICS.

So the solution may be as follows:

#define IDX_CAC_READ_LOCK(i, o) xt_slock_rwlock_ns(&(i)->cs_lock); (void) (o);

or even better:

#define IDX_CAC_READ_LOCK(i, o) do { xt_slock_rwlock_ns(&(i)->cs_lock); (void) (o); } where (0)

This should also solve the second warning: plugin/pbxt/src/cache_xt.cc:829: error: unused parameter ‘ot’

Revision history for this message
Stewart Smith (stewart) wrote : Re: [Bug 567402] Re: pbxt doesn't build on debian ppc 32bit

On Tue, 20 Apr 2010 18:58:19 -0000, Paul McCullagh <email address hidden> wrote:
> So the solution may be as follows:
>
> #define IDX_CAC_READ_LOCK(i, o)
> xt_slock_rwlock_ns(&(i)->cs_lock); (void) (o);
>
> or even better:
>
> #define IDX_CAC_READ_LOCK(i, o) do {
> xt_slock_rwlock_ns(&(i)->cs_lock); (void) (o); } where (0)

latter is better.

or static inline i guess.

--
Stewart Smith

Revision history for this message
Lee Bieber (kalebral-deactivatedaccount) wrote :

Still seeing build failures, see complete log at http://hudson.drizzle.org/view/Drizzle-build/job/drizzle-build-debian-ppc-32bit/408/console

 g++ -DHAVE_CONFIG_H -I. -I. -ggdb3 -pipe -mno-fused-madd -std=gnu++0x -O3 -Werror -pedantic -Wall -Wundef -Wshadow -fdiagnostics-show-option -Wformat -fno-strict-aliasing -Wno-strict-aliasing -Wextra -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-long-long -Wmissing-declarations -Wno-redundant-decls -DDRIZZLED -Wno-overloaded-virtual -Wno-sign-compare -Wno-unused-function -MT plugin/pbxt/src/plugin_pbxt_libpbxt_la-restart_xt.lo -MD -MP -MF plugin/pbxt/src/.deps/plugin_pbxt_libpbxt_la-restart_xt.Tpo -c plugin/pbxt/src/restart_xt.cc -fPIC -DPIC -o plugin/pbxt/src/.libs/plugin_pbxt_libpbxt_la-restart_xt.o
cc1plus: warnings being treated as errors
plugin/pbxt/src/restart_xt.cc: In function ‘void xt_print_log_record(u_int32_t, off_t, XTXactLogBuffer*)’:
plugin/pbxt/src/restart_xt.cc:217: error: array subscript is above array bounds [-Warray-bounds]
plugin/pbxt/src/restart_xt.cc:217: error: array subscript is above array bounds [-Warray-bounds]
make[2]: *** [plugin/pbxt/src/plugin_pbxt_libpbxt_la-restart_xt.lo] Error 1
make[2]: Leaving directory `/home/lee/hudson/workspace/drizzle-build-debian-ppc-32bit'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/lee/hudson/workspace/drizzle-build-debian-ppc-32bit'
make: *** [all] Error 2
Sending e-mails to: <email address hidden>
Finished: FAILURE

Changed in drizzle:
milestone: 2010-05-10 → 2010-05-24
Changed in drizzle:
status: Confirmed → Won't Fix
milestone: 2010-05-24 → none
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.