All of lore.kernel.org
 help / color / mirror / Atom feed
* Missing __error symbol in btrfs-progs-4.10
@ 2017-03-26 20:37 Mike Gilbert
  2017-03-27 11:47 ` David Sterba
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Gilbert @ 2017-03-26 20:37 UTC (permalink / raw)
  To: linux-btrfs

A Gentoo user reports that snapper broke after upgrading to btrfs-progs-4.10.

snapper: symbol lookup error: /usr/lib64/libbtrfs.so.0: undefined
symbol: __error

https://bugs.gentoo.org/show_bug.cgi?id=613890

It seems that the __error symbol is referenced, but not included in libbtrfs.

Exporting this symbol seems like a bad idea, so I would suggest
renaming it, or go back to inlining it in the headers.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Missing __error symbol in btrfs-progs-4.10
  2017-03-26 20:37 Missing __error symbol in btrfs-progs-4.10 Mike Gilbert
@ 2017-03-27 11:47 ` David Sterba
  2017-03-27 21:07   ` [PATCH] btrfs-progs: fix missing __error symbol in libbtrfs.so.0 slyich
  0 siblings, 1 reply; 4+ messages in thread
From: David Sterba @ 2017-03-27 11:47 UTC (permalink / raw)
  To: Mike Gilbert; +Cc: linux-btrfs

On Sun, Mar 26, 2017 at 04:37:05PM -0400, Mike Gilbert wrote:
> A Gentoo user reports that snapper broke after upgrading to btrfs-progs-4.10.
> 
> snapper: symbol lookup error: /usr/lib64/libbtrfs.so.0: undefined
> symbol: __error
> 
> https://bugs.gentoo.org/show_bug.cgi?id=613890
> 
> It seems that the __error symbol is referenced, but not included in libbtrfs.
> 
> Exporting this symbol seems like a bad idea, so I would suggest
> renaming it, or go back to inlining it in the headers.

Right, the name is too generic. I'd like to keep the function not
inlined, so I'll rename them to __btrfs_error etc, but the macros could
still clash with other symbols from the library user.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] btrfs-progs: fix missing __error symbol in libbtrfs.so.0
  2017-03-27 11:47 ` David Sterba
@ 2017-03-27 21:07   ` slyich
  2017-03-28 11:26     ` David Sterba
  0 siblings, 1 reply; 4+ messages in thread
From: slyich @ 2017-03-27 21:07 UTC (permalink / raw)
  To: David Sterba; +Cc: Sergei Trofimovich, linux-btrfs, Mike Gilbert

From: Sergei Trofimovich <slyfox@gentoo.org>

The easiest way to reproduce the error is to try to build
btrfs-progs with
    $ make LDFLAGS=-Wl,--no-undefined

    btrfs-list.o: In function `lookup_ino_path':
    btrfs-list.c:(.text+0x7d2): undefined reference to `__error'

Noticed by Denis Descheneaux when snapper tool
stopped working after upgrade to btrfs-progs-4.10.

As soname didn't change in 4.9 -> 4.10 release
I assume it's just an object file omission
in library depends and not the API/ABI change
of the library error printing.

Cc: linux-btrfs@vger.kernel.org
Cc: Mike Gilbert <floppym@gentoo.org>
Reported-by: Denis Descheneaux
Bug: https://bugs.gentoo.org/show_bug.cgi?id=613890

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
---
 Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index fdc63c3a..35a8b47c 100644
--- a/Makefile
+++ b/Makefile
@@ -95,7 +95,7 @@ objects = ctree.o disk-io.o kernel-lib/radix-tree.o extent-tree.o print-tree.o \
 	  qgroup.o raid56.o free-space-cache.o kernel-lib/list_sort.o props.o \
 	  kernel-shared/ulist.o qgroup-verify.o backref.o string-table.o task-utils.o \
 	  inode.o file.o find-root.o free-space-tree.o help.o send-dump.o \
-	  fsfeatures.o messages.o
+	  fsfeatures.o
 cmds_objects = cmds-subvolume.o cmds-filesystem.o cmds-device.o cmds-scrub.o \
 	       cmds-inspect.o cmds-balance.o cmds-send.o cmds-receive.o \
 	       cmds-quota.o cmds-qgroup.o cmds-replace.o cmds-check.o \
@@ -104,7 +104,7 @@ cmds_objects = cmds-subvolume.o cmds-filesystem.o cmds-device.o cmds-scrub.o \
 	       cmds-inspect-dump-super.o cmds-inspect-tree-stats.o cmds-fi-du.o \
 	       mkfs/common.o
 libbtrfs_objects = send-stream.o send-utils.o kernel-lib/rbtree.o btrfs-list.o \
-		   kernel-lib/crc32c.o \
+		   kernel-lib/crc32c.o messages.o \
 		   uuid-tree.o utils-lib.o rbtree-utils.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 \
@@ -446,7 +446,7 @@ test-ioctl: ioctl-test ioctl-test-32 ioctl-test-64
 	$(Q)./ioctl-test-32 > ioctl-test-32.log
 	$(Q)./ioctl-test-64 > ioctl-test-64.log
 
-library-test: library-test.c messages.o $(libs_shared)
+library-test: library-test.c $(libs_shared)
 	@echo "    [TEST PREP]  $@"$(eval TMPD=$(shell mktemp -d))
 	$(Q)mkdir -p $(TMPD)/include/btrfs && \
 	cp $(libbtrfs_headers) $(TMPD)/include/btrfs && \
@@ -456,7 +456,7 @@ library-test: library-test.c messages.o $(libs_shared)
 	@echo "    [TEST CLEAN] $@"
 	$(Q)$(RM) -rf -- $(TMPD)
 
-library-test.static: library-test.c messages.static.o $(libs_static)
+library-test.static: library-test.c $(libs_static)
 	@echo "    [TEST PREP]  $@"$(eval TMPD=$(shell mktemp -d))
 	$(Q)mkdir -p $(TMPD)/include/btrfs && \
 	cp $(libbtrfs_headers) $(TMPD)/include/btrfs && \
-- 
2.12.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] btrfs-progs: fix missing __error symbol in libbtrfs.so.0
  2017-03-27 21:07   ` [PATCH] btrfs-progs: fix missing __error symbol in libbtrfs.so.0 slyich
@ 2017-03-28 11:26     ` David Sterba
  0 siblings, 0 replies; 4+ messages in thread
From: David Sterba @ 2017-03-28 11:26 UTC (permalink / raw)
  To: slyich; +Cc: Sergei Trofimovich, linux-btrfs, Mike Gilbert

On Mon, Mar 27, 2017 at 10:07:20PM +0100, slyich@gmail.com wrote:
> From: Sergei Trofimovich <slyfox@gentoo.org>
> 
> The easiest way to reproduce the error is to try to build
> btrfs-progs with
>     $ make LDFLAGS=-Wl,--no-undefined
> 
>     btrfs-list.o: In function `lookup_ino_path':
>     btrfs-list.c:(.text+0x7d2): undefined reference to `__error'
> 
> Noticed by Denis Descheneaux when snapper tool
> stopped working after upgrade to btrfs-progs-4.10.
> 
> As soname didn't change in 4.9 -> 4.10 release
> I assume it's just an object file omission
> in library depends and not the API/ABI change
> of the library error printing.
> 
> Cc: linux-btrfs@vger.kernel.org
> Cc: Mike Gilbert <floppym@gentoo.org>
> Reported-by: Denis Descheneaux
> Bug: https://bugs.gentoo.org/show_bug.cgi?id=613890
> 
> Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

I've replaced my patch with yours, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-03-28 11:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-26 20:37 Missing __error symbol in btrfs-progs-4.10 Mike Gilbert
2017-03-27 11:47 ` David Sterba
2017-03-27 21:07   ` [PATCH] btrfs-progs: fix missing __error symbol in libbtrfs.so.0 slyich
2017-03-28 11:26     ` David Sterba

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.