I encountered this in the 5.1.54 release branch Maybe this is a gcc version thing. I use 4.4 in this case. MySQL added -Werror when --with-debug is used. That broke the official build (the problem is in the extra subdir). It also broke changes from Percona My configure line: ./configure --enable-thread-safe-client --with-plugins=partition,csv,blackhole,myisam,heap,innodb_plugin --without-plugin-innobase --with-fast-mutexes --with-extra-charsets=all --with-debug C_EXTRA_FLAGS="-fno-omit-frame-pointer -fno-strict-aliasing -DHAVE_purify -Wall" CFLAGS="-O0 -g" CXXFLAGS="-g -O0" cc1: warnings being treated as errors In file included from ./include/buf0buf.h:1571, from ./include/page0page.h:33, from ./include/page0cur.h:32, from ./include/btr0btr.h:33, from btr/btr0btr.c:26: ./include/buf0buf.ic: In function ‘buf_page_release’: ./include/buf0buf.ic:1078: error: unused parameter ‘mtr’ cc1: warnings being treated as errors In file included from ./include/buf0buf.h:1571, from ./include/page0page.h:33, from ./include/page0cur.h:32, from ./include/btr0cur.h:31, from btr/btr0cur.c:44: ./include/buf0buf.ic: In function ‘buf_page_release’: ./include/buf0buf.ic:1078: error: unused parameter ‘mtr’ make[2]: *** [libinnobase_a-btr0btr.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: *** [libinnobase_a-btr0cur.o] Error 1 and another error, I haven't seen this before cc1: warnings being treated as errors buf/buf0buddy.c: In function ‘buf_buddy_relocate’: buf/buf0buddy.c:493: error: ISO C90 forbids mixed declarations and code the problem is that code was added before declarations /* We look inside the allocated objects returned by buf_buddy_alloc() and assume that anything of PAGE_ZIP_MIN_SIZE or larger is a compressed page that contains a valid space_id and page_no in the page header. Should the fields be invalid, we will be unable to relocate the block. We also assume that anything that fits sizeof(buf_page_t) actually is a properly initialized buf_page_t object. */ if (size >= PAGE_ZIP_MIN_SIZE) { /* This is a compressed page. */ mutex_t* mutex; if (!have_page_hash_mutex) { mutex_exit(&zip_free_mutex); mutex_enter(&LRU_list_mutex); rw_lock_x_lock(&page_hash_latch); } /* The src block may be split into smaller blocks, some of which may be free. Thus, the mach_read_from_4() calls below may attempt to read from free memory. The memory is "owned" by the buddy allocator (and it has been allocated from the buffer pool), so there is nothing wrong about this. The mach_read_from_4() calls here will only trigger bogus Valgrind memcheck warnings in UNIV_DEBUG_VALGRIND builds. */ ulint space = mach_read_from_4( (const byte*) src + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID); ulint page_no = mach_read_from_4( (const byte*) src + FIL_PAGE_OFFSET); After that I gave up and removed Werror from Makefile