All of lore.kernel.org
 help / color / mirror / Atom feed
* btrfs-progs-4.8.3 libbtrfs missing symbols?
@ 2016-11-22 18:49 Mike Gilbert
  2016-11-22 19:07 ` Mike Gilbert
  2016-11-23  9:45 ` David Sterba
  0 siblings, 2 replies; 6+ messages in thread
From: Mike Gilbert @ 2016-11-22 18:49 UTC (permalink / raw)
  To: linux-btrfs

Hi,

I received a bug report about a build failure in a package (snapper)
that utilizes libbtrfs.

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

To summarize the issue, the package has a configure test that executes
the following:

configure:16618: x86_64-pc-linux-gnu-gcc -o conftest -O2 -pipe
-march=amdfam10 -frecord-gcc-switches -std=c99 -Wall -Wextra
-Wformat=2 -Wmissing-prototypes -Wno-unused-parameter
-DCONFDIR='"/etc/conf.d"' -Wl,-O1 -Wl,--as-needed conftest.c -lbtrfs
>&5
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libbtrfs.so:
undefined reference to `lookup_path_rootid'
collect2: error: ld returned 1 exit status
configure:16618: $? = 1

It seems that the "lookup_path_rootid" symbol is not included in the library.

Could someone look into this?

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

* Re: btrfs-progs-4.8.3 libbtrfs missing symbols?
  2016-11-22 18:49 btrfs-progs-4.8.3 libbtrfs missing symbols? Mike Gilbert
@ 2016-11-22 19:07 ` Mike Gilbert
  2016-11-23  9:45 ` David Sterba
  1 sibling, 0 replies; 6+ messages in thread
From: Mike Gilbert @ 2016-11-22 19:07 UTC (permalink / raw)
  To: linux-btrfs

On Tue, Nov 22, 2016 at 1:49 PM, Mike Gilbert <floppymaster@gmail.com> wrote:
> Hi,
>
> I received a bug report about a build failure in a package (snapper)
> that utilizes libbtrfs.
>
> https://bugs.gentoo.org/show_bug.cgi?id=600078
>
> To summarize the issue, the package has a configure test that executes
> the following:
>
> configure:16618: x86_64-pc-linux-gnu-gcc -o conftest -O2 -pipe
> -march=amdfam10 -frecord-gcc-switches -std=c99 -Wall -Wextra
> -Wformat=2 -Wmissing-prototypes -Wno-unused-parameter
> -DCONFDIR='"/etc/conf.d"' -Wl,-O1 -Wl,--as-needed conftest.c -lbtrfs
>>&5
> /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libbtrfs.so:
> undefined reference to `lookup_path_rootid'
> collect2: error: ld returned 1 exit status
> configure:16618: $? = 1
>
> It seems that the "lookup_path_rootid" symbol is not included in the library.
>
> Could someone look into this?

I this this issue was introduced here:

https://git.kernel.org/cgit/linux/kernel/git/kdave/btrfs-progs.git/commit/?id=1c85c3de5aab997ff66ea95cb0f2c9f79726ec40

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

* Re: btrfs-progs-4.8.3 libbtrfs missing symbols?
  2016-11-22 18:49 btrfs-progs-4.8.3 libbtrfs missing symbols? Mike Gilbert
  2016-11-22 19:07 ` Mike Gilbert
@ 2016-11-23  9:45 ` David Sterba
  2016-11-23 18:43   ` Mike Gilbert
  1 sibling, 1 reply; 6+ messages in thread
From: David Sterba @ 2016-11-23  9:45 UTC (permalink / raw)
  To: Mike Gilbert; +Cc: linux-btrfs

On Tue, Nov 22, 2016 at 01:49:15PM -0500, Mike Gilbert wrote:
> Hi,
> 
> I received a bug report about a build failure in a package (snapper)
> that utilizes libbtrfs.
> 
> https://bugs.gentoo.org/show_bug.cgi?id=600078
> 
> To summarize the issue, the package has a configure test that executes
> the following:
> 
> configure:16618: x86_64-pc-linux-gnu-gcc -o conftest -O2 -pipe
> -march=amdfam10 -frecord-gcc-switches -std=c99 -Wall -Wextra
> -Wformat=2 -Wmissing-prototypes -Wno-unused-parameter
> -DCONFDIR='"/etc/conf.d"' -Wl,-O1 -Wl,--as-needed conftest.c -lbtrfs
> >&5
> /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libbtrfs.so:
> undefined reference to `lookup_path_rootid'
> collect2: error: ld returned 1 exit status
> configure:16618: $? = 1
> 
> It seems that the "lookup_path_rootid" symbol is not included in the library.
> 
> Could someone look into this?

Thanks for the report, bug reproduced here. My referential snapper build
does not fail so I did not know about that. I've now extended the
library test to cover the missing symbol. As the build does not fail
it's needed to actually run the built binary.

Fixed in devel now, I'll release 4.8.4 with this (and maybe other)
bugfixes.

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

* Re: btrfs-progs-4.8.3 libbtrfs missing symbols?
  2016-11-23  9:45 ` David Sterba
@ 2016-11-23 18:43   ` Mike Gilbert
  2016-11-23 18:49     ` Mike Gilbert
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Gilbert @ 2016-11-23 18:43 UTC (permalink / raw)
  To: dsterba, linux-btrfs

On Wed, Nov 23, 2016 at 4:45 AM, David Sterba <dsterba@suse.cz> wrote:
> On Tue, Nov 22, 2016 at 01:49:15PM -0500, Mike Gilbert wrote:
>> Hi,
>>
>> I received a bug report about a build failure in a package (snapper)
>> that utilizes libbtrfs.
>>
>> https://bugs.gentoo.org/show_bug.cgi?id=600078
>>
>> To summarize the issue, the package has a configure test that executes
>> the following:
>>
>> configure:16618: x86_64-pc-linux-gnu-gcc -o conftest -O2 -pipe
>> -march=amdfam10 -frecord-gcc-switches -std=c99 -Wall -Wextra
>> -Wformat=2 -Wmissing-prototypes -Wno-unused-parameter
>> -DCONFDIR='"/etc/conf.d"' -Wl,-O1 -Wl,--as-needed conftest.c -lbtrfs
>> >&5
>> /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libbtrfs.so:
>> undefined reference to `lookup_path_rootid'
>> collect2: error: ld returned 1 exit status
>> configure:16618: $? = 1
>>
>> It seems that the "lookup_path_rootid" symbol is not included in the library.
>>
>> Could someone look into this?
>
> Thanks for the report, bug reproduced here. My referential snapper build
> does not fail so I did not know about that. I've now extended the
> library test to cover the missing symbol. As the build does not fail
> it's needed to actually run the built binary.

That's very strange; I definitely get a build-time failure here. Maybe
there's some difference in your toolchain.

On current master:

floppym@naomi btrfs-progs % make V=1 library-test
    [LD]     library-test
gcc -g -O1 -Wall -D_FORTIFY_SOURCE=2 -include config.h
-DBTRFS_FLAT_INCLUDES -D_XOPEN_SOURCE=700 -fno-strict-aliasing -fPIC
-I/home/floppym/src/btrfs-progs
-I/home/floppym/src/btrfs-progs/kernel-lib    -o library-test
library-test.o -rdynamic  -lbtrfs
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libbtrfs.so:
undefined reference to `lookup_path_rootid'
collect2: error: ld returned 1 exit status
make: *** [Makefile:433: library-test] Error 1

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

* Re: btrfs-progs-4.8.3 libbtrfs missing symbols?
  2016-11-23 18:43   ` Mike Gilbert
@ 2016-11-23 18:49     ` Mike Gilbert
  2016-11-24 10:58       ` David Sterba
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Gilbert @ 2016-11-23 18:49 UTC (permalink / raw)
  To: dsterba, linux-btrfs

On Wed, Nov 23, 2016 at 1:43 PM, Mike Gilbert <floppymaster@gmail.com> wrote:
> On Wed, Nov 23, 2016 at 4:45 AM, David Sterba <dsterba@suse.cz> wrote:
>> On Tue, Nov 22, 2016 at 01:49:15PM -0500, Mike Gilbert wrote:
>>> Hi,
>>>
>>> I received a bug report about a build failure in a package (snapper)
>>> that utilizes libbtrfs.
>>>
>>> https://bugs.gentoo.org/show_bug.cgi?id=600078
>>>
>>> To summarize the issue, the package has a configure test that executes
>>> the following:
>>>
>>> configure:16618: x86_64-pc-linux-gnu-gcc -o conftest -O2 -pipe
>>> -march=amdfam10 -frecord-gcc-switches -std=c99 -Wall -Wextra
>>> -Wformat=2 -Wmissing-prototypes -Wno-unused-parameter
>>> -DCONFDIR='"/etc/conf.d"' -Wl,-O1 -Wl,--as-needed conftest.c -lbtrfs
>>> >&5
>>> /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libbtrfs.so:
>>> undefined reference to `lookup_path_rootid'
>>> collect2: error: ld returned 1 exit status
>>> configure:16618: $? = 1
>>>
>>> It seems that the "lookup_path_rootid" symbol is not included in the library.
>>>
>>> Could someone look into this?
>>
>> Thanks for the report, bug reproduced here. My referential snapper build
>> does not fail so I did not know about that. I've now extended the
>> library test to cover the missing symbol. As the build does not fail
>> it's needed to actually run the built binary.
>
> That's very strange; I definitely get a build-time failure here. Maybe
> there's some difference in your toolchain.
>
> On current master:
>
> floppym@naomi btrfs-progs % make V=1 library-test
>     [LD]     library-test
> gcc -g -O1 -Wall -D_FORTIFY_SOURCE=2 -include config.h
> -DBTRFS_FLAT_INCLUDES -D_XOPEN_SOURCE=700 -fno-strict-aliasing -fPIC
> -I/home/floppym/src/btrfs-progs
> -I/home/floppym/src/btrfs-progs/kernel-lib    -o library-test
> library-test.o -rdynamic  -lbtrfs
> /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libbtrfs.so:
> undefined reference to `lookup_path_rootid'
> collect2: error: ld returned 1 exit status
> make: *** [Makefile:433: library-test] Error 1

Oh! Based on that command line, library-test is getting linked against
/usr/lib64/libbtrfs.so instead of the freshly built copy in $PWD.

You probably need to add -L. or -L$(TOPDIR) to that command in the Makefile.

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

* Re: btrfs-progs-4.8.3 libbtrfs missing symbols?
  2016-11-23 18:49     ` Mike Gilbert
@ 2016-11-24 10:58       ` David Sterba
  0 siblings, 0 replies; 6+ messages in thread
From: David Sterba @ 2016-11-24 10:58 UTC (permalink / raw)
  To: Mike Gilbert; +Cc: linux-btrfs

On Wed, Nov 23, 2016 at 01:49:53PM -0500, Mike Gilbert wrote:
> On Wed, Nov 23, 2016 at 1:43 PM, Mike Gilbert <floppymaster@gmail.com> wrote:
> > On Wed, Nov 23, 2016 at 4:45 AM, David Sterba <dsterba@suse.cz> wrote:
> >> On Tue, Nov 22, 2016 at 01:49:15PM -0500, Mike Gilbert wrote:
> >>> Hi,
> >>>
> >>> I received a bug report about a build failure in a package (snapper)
> >>> that utilizes libbtrfs.
> >>>
> >>> https://bugs.gentoo.org/show_bug.cgi?id=600078
> >>>
> >>> To summarize the issue, the package has a configure test that executes
> >>> the following:
> >>>
> >>> configure:16618: x86_64-pc-linux-gnu-gcc -o conftest -O2 -pipe
> >>> -march=amdfam10 -frecord-gcc-switches -std=c99 -Wall -Wextra
> >>> -Wformat=2 -Wmissing-prototypes -Wno-unused-parameter
> >>> -DCONFDIR='"/etc/conf.d"' -Wl,-O1 -Wl,--as-needed conftest.c -lbtrfs
> >>> >&5
> >>> /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libbtrfs.so:
> >>> undefined reference to `lookup_path_rootid'
> >>> collect2: error: ld returned 1 exit status
> >>> configure:16618: $? = 1
> >>>
> >>> It seems that the "lookup_path_rootid" symbol is not included in the library.
> >>>
> >>> Could someone look into this?
> >>
> >> Thanks for the report, bug reproduced here. My referential snapper build
> >> does not fail so I did not know about that. I've now extended the
> >> library test to cover the missing symbol. As the build does not fail
> >> it's needed to actually run the built binary.
> >
> > That's very strange; I definitely get a build-time failure here. Maybe
> > there's some difference in your toolchain.
> >
> > On current master:
> >
> > floppym@naomi btrfs-progs % make V=1 library-test
> >     [LD]     library-test
> > gcc -g -O1 -Wall -D_FORTIFY_SOURCE=2 -include config.h
> > -DBTRFS_FLAT_INCLUDES -D_XOPEN_SOURCE=700 -fno-strict-aliasing -fPIC
> > -I/home/floppym/src/btrfs-progs
> > -I/home/floppym/src/btrfs-progs/kernel-lib    -o library-test
> > library-test.o -rdynamic  -lbtrfs
> > /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libbtrfs.so:
> > undefined reference to `lookup_path_rootid'
> > collect2: error: ld returned 1 exit status
> > make: *** [Makefile:433: library-test] Error 1
> 
> Oh! Based on that command line, library-test is getting linked against
> /usr/lib64/libbtrfs.so instead of the freshly built copy in $PWD.

Oh, right, that's what we get when we don't use automake :)

> You probably need to add -L. or -L$(TOPDIR) to that command in the Makefile.

That was it, thank you!

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

end of thread, other threads:[~2016-11-24 10:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-22 18:49 btrfs-progs-4.8.3 libbtrfs missing symbols? Mike Gilbert
2016-11-22 19:07 ` Mike Gilbert
2016-11-23  9:45 ` David Sterba
2016-11-23 18:43   ` Mike Gilbert
2016-11-23 18:49     ` Mike Gilbert
2016-11-24 10:58       ` 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.