building xtrabackup with innodb plugin problem

127 views
Skip to first unread message

Vibhor Chowdhary

unread,
Feb 23, 2010, 12:17:20 PM2/23/10
to Percona Discussion
Hi

I finally got around to trying to build xtrabackup with innodb plugin
so that I can use it to backup barracuda compressed tables. I did the
following steps:
1) built unzipped mysql-5.1.34 and replace the contents of storage/
innobase/ with innodb plugin 1.0.4 source.
2) built mysql
3) copied xtrabackup 1.0's innobase/xtrabackup directory to
mysql-5.1.34/storage/innobase
4) in mysql-5.1.34/storage/innobase applied patch using the command:
patch -p1 < xtrabackup/fix_innodb_for_backup_plugin.patch
5) ran make
6) inside mysql-5.1.34/storage/innobase/xtrabackup uncommented out the
section for mysql innodb plugin in the Makefile (and commented out the
mysql5.0 and mysql5.1 sections) and ran make
here the make command fails:
cc -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -I. -I.. -I./../
include -I./../../include -I./../../../include -DUNIV_LINUX -
DMYSQL_SERVER -c xtrabackup.c
cc -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 xtrabackup.o ../
ha_innodb_la-btr0btr.o ../ha_innodb_la-btr0cur.o ../ha_innodb_la-
btr0pcur.o ../ha_innodb_la-btr0sea.o ../ha_innodb_la-buf0buddy.o ../
ha_innodb_la-buf0buf.o ../ha_innodb_la-buf0flu.o ../ha_innodb_la-
buf0lru.o ../ha_innodb_la-buf0rea.o ../ha_innodb_la-data0data.o ../
ha_innodb_la-data0type.o ../ha_innodb_la-dict0boot.o ../ha_innodb_la-
dict0crea.o ../ha_innodb_la-dict0dict.o ../ha_innodb_la-dict0load.o ../
ha_innodb_la-dict0mem.o ../ha_innodb_la-dyn0dyn.o ../ha_innodb_la-
eval0eval.o ../ha_innodb_la-eval0proc.o ../ha_innodb_la-fil0fil.o ../
ha_innodb_la-fsp0fsp.o ../ha_innodb_la-fut0fut.o ../ha_innodb_la-
fut0lst.o ../ha_innodb_la-ha0ha.o ../ha_innodb_la-ha0storage.o ../
ha_innodb_la-hash0hash.o ../ha_innodb_la-ibuf0ibuf.o ../ha_innodb_la-
lock0iter.o ../ha_innodb_la-lock0lock.o ../ha_innodb_la-log0log.o ../
ha_innodb_la-log0recv.o ../ha_innodb_la-mach0data.o ../ha_innodb_la-
mem0mem.o ../ha_innodb_la-mem0pool.o ../ha_innodb_la-mtr0log.o ../
ha_innodb_la-mtr0mtr.o ../ha_innodb_la-os0file.o ../ha_innodb_la-
os0proc.o ../ha_innodb_la-os0sync.o ../ha_innodb_la-os0thread.o ../
ha_innodb_la-page0cur.o ../ha_innodb_la-page0page.o ../ha_innodb_la-
page0zip.o ../ha_innodb_la-lexyy.o ../ha_innodb_la-pars0grm.o ../
ha_innodb_la-pars0opt.o ../ha_innodb_la-pars0pars.o ../ha_innodb_la-
pars0sym.o ../ha_innodb_la-que0que.o ../ha_innodb_la-read0read.o ../
ha_innodb_la-rem0cmp.o ../ha_innodb_la-rem0rec.o ../ha_innodb_la-
row0ext.o ../ha_innodb_la-row0ins.o ../ha_innodb_la-row0merge.o ../
ha_innodb_la-row0mysql.o ../ha_innodb_la-row0purge.o ../ha_innodb_la-
row0row.o ../ha_innodb_la-row0sel.o ../ha_innodb_la-row0uins.o ../
ha_innodb_la-row0umod.o ../ha_innodb_la-row0undo.o ../ha_innodb_la-
row0upd.o ../ha_innodb_la-row0vers.o ../ha_innodb_la-srv0que.o ../
ha_innodb_la-srv0srv.o ../ha_innodb_la-srv0start.o ../ha_innodb_la-
sync0arr.o ../ha_innodb_la-sync0rw.o ../ha_innodb_la-sync0sync.o ../
ha_innodb_la-thr0loc.o ../ha_innodb_la-trx0purge.o ../ha_innodb_la-
trx0rec.o ../ha_innodb_la-trx0roll.o ../ha_innodb_la-trx0rseg.o ../
ha_innodb_la-trx0sys.o ../ha_innodb_la-trx0trx.o ../ha_innodb_la-
trx0undo.o ../ha_innodb_la-usr0sess.o ../ha_innodb_la-ut0byte.o ../
ha_innodb_la-ut0dbg.o ../ha_innodb_la-ut0list.o ../ha_innodb_la-
ut0mem.o ../ha_innodb_la-ut0rnd.o ../ha_innodb_la-ut0ut.o ../
ha_innodb_la-ut0vec.o ../ha_innodb_la-ut0wqueue.o ../../../mysys/
libmysys.a ../../../strings/libmystrings.a -lpthread -o xtrabackup
../ha_innodb_la-btr0cur.o: In function
`btr_store_big_rec_extern_fields':
btr0cur.c:(.text+0x2749): undefined reference to `deflate'
btr0cur.c:(.text+0x2b67): undefined reference to `deflateReset'
btr0cur.c:(.text+0x2cc8): undefined reference to `deflateInit2_'
btr0cur.c:(.text+0x2d44): undefined reference to `deflateEnd'
btr0cur.c:(.text+0x2d97): undefined reference to `deflateEnd'
../ha_innodb_la-btr0cur.o: In function
`btr_copy_externally_stored_field_prefix_low':
btr0cur.c:(.text+0x3032): undefined reference to `inflateInit_'
btr0cur.c:(.text+0x30fc): undefined reference to `inflate'
btr0cur.c:(.text+0x329e): undefined reference to `inflateEnd'
btr0cur.c:(.text+0x347c): undefined reference to `inflate'
../ha_innodb_la-page0zip.o: In function `page_zip_calc_checksum':
page0zip.c:(.text+0x50): undefined reference to `adler32'
page0zip.c:(.text+0x61): undefined reference to `adler32'
../ha_innodb_la-page0zip.o: In function `page_zip_empty_size':
page0zip.c:(.text+0x51a): undefined reference to `compressBound'
../ha_innodb_la-page0zip.o: In function `page_zip_decompress':
page0zip.c:(.text+0x249d): undefined reference to `inflateInit2_'
page0zip.c:(.text+0x2508): undefined reference to `inflate'
page0zip.c:(.text+0x2522): undefined reference to `inflate'
page0zip.c:(.text+0x2780): undefined reference to `inflate'
page0zip.c:(.text+0x27a7): undefined reference to `inflateEnd'
page0zip.c:(.text+0x28ff): undefined reference to `inflate'
page0zip.c:(.text+0x2989): undefined reference to `inflate'
page0zip.c:(.text+0x299f): undefined reference to `inflateEnd'
page0zip.c:(.text+0x2d16): undefined reference to `inflate'
page0zip.c:(.text+0x2db1): undefined reference to `inflate'
page0zip.c:(.text+0x2dc7): undefined reference to `inflateEnd'
page0zip.c:(.text+0x309d): undefined reference to `inflate'
page0zip.c:(.text+0x31a1): undefined reference to `inflate'
page0zip.c:(.text+0x3231): undefined reference to `inflate'
page0zip.c:(.text+0x32cc): undefined reference to `inflate'
page0zip.c:(.text+0x32e2): undefined reference to `inflateEnd'
page0zip.c:(.text+0x368d): undefined reference to `inflate'
page0zip.c:(.text+0x3758): undefined reference to `inflate'
../ha_innodb_la-page0zip.o: In function `page_zip_compress':
page0zip.c:(.text+0x51cd): undefined reference to `deflateInit2_'
page0zip.c:(.text+0x5358): undefined reference to `deflate'
page0zip.c:(.text+0x55ed): undefined reference to `deflate'
page0zip.c:(.text+0x5625): undefined reference to `deflate'
page0zip.c:(.text+0x56b7): undefined reference to `deflate'
page0zip.c:(.text+0x56cd): undefined reference to `deflateEnd'
page0zip.c:(.text+0x5a8a): undefined reference to `deflate'
page0zip.c:(.text+0x5ba6): undefined reference to `deflate'
page0zip.c:(.text+0x5bbe): undefined reference to `deflateEnd'
page0zip.c:(.text+0x6113): undefined reference to `deflate'
page0zip.c:(.text+0x62a2): undefined reference to `deflate'
page0zip.c:(.text+0x63a4): undefined reference to `deflate'
page0zip.c:(.text+0x6422): undefined reference to `deflate'
../ha_innodb_la-page0zip.o: In function `page_zip_calc_checksum':
page0zip.c:(.text+0x80): undefined reference to `adler32'
collect2: ld returned 1 exit status
make: *** [xtrabackup] Error 1

what am i doing wrong? any suggestions?

Vadim Tkachenko

unread,
Feb 23, 2010, 1:26:22 PM2/23/10
to percona-d...@googlegroups.com
Hi,

Do you have zlib-devel installed ?

> --
> You received this message because you are subscribed to the Google Groups "Percona Discussion" group.
> To post to this group, send email to percona-d...@googlegroups.com.
> To unsubscribe from this group, send email to percona-discuss...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/percona-discussion?hl=en.
>
>

--
Vadim Tkachenko, CTO, Percona Inc.
Phone +1-888-401-3403, Skype: vadimtk153
Schedule meeting: http://tungle.me/VadimTkachenko

Vibhor Chowdhary

unread,
Feb 23, 2010, 1:57:20 PM2/23/10
to Percona Discussion
yes, i have zlib-devel - 1.2.3-3.x86_64 installed.

> > For more options, visit this group athttp://groups.google.com/group/percona-discussion?hl=en.

Andrew Garner

unread,
Feb 23, 2010, 2:08:24 PM2/23/10
to percona-d...@googlegroups.com
I believe the Makefile is expecting the builtin zlib to be built:

#MYSQLOBJS= ../../../mysys/libmysys.a
../../../strings/libmystrings.a ../../../zlib/.libs/libzlt.a
...

I built this against the innodb_plugin using mysql's bundled zlib by doing:
patch -p0 < fix_innodb_for_backup_plugin.patch
./configure .... \
--with-zlib-dir=bundled
make
make -C storage/innodb_plugin/xtrabackup-1.0

~Andrew

Vibhor Chowdhary

unread,
Feb 23, 2010, 3:08:31 PM2/23/10
to Percona Discussion
Andrew, thanks for the info. That worked perfectly.

Unfortunately, it didn't fix the root of the problem. Backing up
barracuda compressed tables. I'm still getting:
[root@s3 mysql]# xtrabackup --backup --target-dir=/mnt/backup/
xtrabackup: tables regcomp(): Success
xtrabackup Ver undefined Rev undefined for 5.1.32 unknown-linux-gnu
(x86_64)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /disk2/mysql
xtrabackup: Target instance is assumed as followings.
xtrabackup: innodb_data_home_dir = ./
xtrabackup: innodb_data_file_path = ibdata1:10M:autoextend
xtrabackup: innodb_log_group_home_dir = ./
xtrabackup: innodb_log_files_in_group = 2
xtrabackup: innodb_log_file_size = 536870912
xtrabackup: use O_DIRECT
>> log scanned up to (2542766226781)
Copying ./ibdata1
to /mnt/backup//ibdata1
xtrabackup: Database page corruption detected at page 64. retrying...
xtrabackup: Database page corruption detected at page 64. retrying...
xtrabackup: Database page corruption detected at page 64. retrying...
xtrabackup: Database page corruption detected at page 64. retrying...
xtrabackup: Database page corruption detected at page 64. retrying...
xtrabackup: Database page corruption detected at page 64. retrying...
xtrabackup: Database page corruption detected at page 64. retrying...
xtrabackup: Database page corruption detected at page 64. retrying...
xtrabackup: Database page corruption detected at page 64. retrying...
xtrabackup: Error: 10 retries resulted in fail. This file seems to be
corrupted.
xtrabackup: Error: xtrabackup_copy_datafile() failed.
xtrabackup: Error: failed to copy system datafile.

This was the same issue I was having with the xtrabackup binary
available at percona.com. And I was told to rebuild the xtrabackup
from source using innodb plugin for barracuda compressed table
support.

Thanks
Vibhor

On Feb 23, 1:08 pm, Andrew Garner <muza...@gmail.com> wrote:
> I believe the Makefile is expecting the builtin zlib to be built:
>
> #MYSQLOBJS=     ../../../mysys/libmysys.a
> ../../../strings/libmystrings.a ../../../zlib/.libs/libzlt.a
> ...
>
> I built this against the innodb_plugin using mysql's bundled zlib by doing:
> patch -p0 < fix_innodb_for_backup_plugin.patch
> ./configure .... \
>    --with-zlib-dir=bundled
> make
> make -C storage/innodb_plugin/xtrabackup-1.0
>
> ~Andrew
>
> On Tue, Feb 23, 2010 at 12:57 PM, Vibhor  Chowdhary
>

Andrew Garner

unread,
Feb 23, 2010, 4:00:22 PM2/23/10
to percona-d...@googlegroups.com
Hmm. I get that as well, but only on the shared (ibdata1) tablespace.
xtrabackup won't have a problem with the .ibd tables. I don't know
enough about the innodb file format to explain this.

It's also worth nothing that tar4ibd (in --stream mode) will still
fail on compressed innodb tables as well (and not just the shared
tablespace), regardless of what xtrabackup is compiled against.

~Andrew

Vadim Tkachenko

unread,
Feb 23, 2010, 4:10:02 PM2/23/10
to percona-d...@googlegroups.com
Hi,

Thank you for you reports,
we will look into fixes as soon as possible.

Thanks,
Vadim

Reply all
Reply to author
Forward
0 new messages