undefined reference to __bss_start when linking xtrabackup_56 in ubuntu raring
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB |
Fix Released
|
Medium
|
Vlad Lesin | ||
2.0 |
Fix Released
|
Medium
|
Vlad Lesin | ||
2.1 |
Fix Released
|
Medium
|
Vlad Lesin |
Bug Description
When linking xtrabackup_56 in latest Ubuntu Raring, ld fails with the following error:
g++ xtrabackup.o innodb_int.o compact.o fil_cur.o write_filt.o changed_
/usr/bin/ld: /mnt/src/
/usr/bin/ld: note: '__bss_start' is defined in DSO /lib/i386-
/lib/i386-
collect2: error: ld returned 1 exit status
After some investigation, it was confirmed that the issue goes away when adding -lwrap to the linkage options.
Related branches
- Alexey Kopytov (community): Approve
-
Diff: 25 lines (+18/-0)1 file modifiedpatches/innodb56.patch (+18/-0)
- Alexey Kopytov (community): Approve
-
Diff: 12 lines (+1/-1)1 file modifiedsrc/Makefile (+1/-1)
description: | updated |
Changed in percona-xtrabackup: | |
assignee: | nobody → Vlad Lesin (vlad-lesin) |
The reason is in ds_encrypt / libgcrypt. This combination does something nasty to the linker resulting in __bss_start not defined. I'm not willing to debug it any further, mostly because that code is not used by XtraBackup, so we should look into a workaround rather than a real fix.
The previously suggested workaround of adding -lwrap to linker flags simply because __bss_start is defined in that library will not work. Not all system have libwrap.so, and even Ubuntu 13.04 does not have in a default install.
I suggest we just patch configure.cmake in innodb56.patch to remove the check for __bss_start, i.e. pretend the target system does not support it.
Note that XtraBackup does not use stacktrace. Even if it did (or will be at some point), __bss_start is not actually used on Linux (it uses /proc instead).