btrfs-progs: build: add missing symbols from volumes.o to libbtrfs
diff mbox series

Message ID 20191023080226.10826-1-jthumshirn@suse.de
State New
Headers show
Series
  • btrfs-progs: build: add missing symbols from volumes.o to libbtrfs
Related show

Commit Message

Johannes Thumshirn Oct. 23, 2019, 8:02 a.m. UTC
When using snapper a user reports that some symbols from volumes.[ch] are
missing from libbtrfs, eg. write_raid56_with_parity().

Link: https://github.com/openSUSE/snapper/issues/500
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

David Sterba Oct. 23, 2019, 12:22 p.m. UTC | #1
On Wed, Oct 23, 2019 at 10:02:26AM +0200, Johannes Thumshirn wrote:
> When using snapper a user reports that some symbols from volumes.[ch] are
> missing from libbtrfs, eg. write_raid56_with_parity().

With this patch on top of master:

$ make library-test
    [TEST PREP]  library-test
/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: /labs/dsterba/gits/btrfs-progs/libbtrfs.so: undefined reference to `write_raid56_with_parity'
/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: /labs/dsterba/gits/btrfs-progs/libbtrfs.so: undefined reference to `btrfs_map_block'
/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: /labs/dsterba/gits/btrfs-progs/libbtrfs.so: undefined reference to `total_memory'
collect2: error: ld returned 1 exit status
make: *** [Makefile:621: library-test] Error 1

Patch
diff mbox series

diff --git a/Makefile b/Makefile
index 21bf2717a9e7..37a681c23f4e 100644
--- a/Makefile
+++ b/Makefile
@@ -152,11 +152,11 @@  cmds_objects = cmds/subvolume.o cmds/filesystem.o cmds/device.o cmds/scrub.o \
 libbtrfs_objects = send-stream.o send-utils.o kernel-lib/rbtree.o btrfs-list.o \
 		   kernel-lib/radix-tree.o extent-cache.o extent_io.o \
 		   kernel-lib/crc32c.o common/messages.o \
-		   uuid-tree.o utils-lib.o common/rbtree-utils.o
+		   uuid-tree.o utils-lib.o common/rbtree-utils.o volumes.o
 libbtrfs_headers = send-stream.h send-utils.h send.h kernel-lib/rbtree.h btrfs-list.h \
 	       kernel-lib/crc32c.h kernel-lib/list.h kerncompat.h \
 	       kernel-lib/radix-tree.h kernel-lib/sizes.h kernel-lib/raid56.h \
-	       extent-cache.h extent_io.h ioctl.h ctree.h btrfsck.h version.h
+	       extent-cache.h extent_io.h ioctl.h ctree.h btrfsck.h version.h volumes.h
 libbtrfsutil_major := $(shell sed -rn 's/^\#define BTRFS_UTIL_VERSION_MAJOR ([0-9])+$$/\1/p' libbtrfsutil/btrfsutil.h)
 libbtrfsutil_minor := $(shell sed -rn 's/^\#define BTRFS_UTIL_VERSION_MINOR ([0-9])+$$/\1/p' libbtrfsutil/btrfsutil.h)
 libbtrfsutil_patch := $(shell sed -rn 's/^\#define BTRFS_UTIL_VERSION_PATCH ([0-9])+$$/\1/p' libbtrfsutil/btrfsutil.h)