[parted-devel] libparted ped_get_version() undefined reference

Jim Meyering jim at meyering.net
Wed Apr 8 20:15:42 UTC 2009


Curtis Gedak wrote:
> Recently I have been unable to link to the latest git version of
> parted (1.8.8.1.91-b23b).
>
> After some time spent isolating the source of the problem, I have come
> up with a small test case.
> Following is a sample program that illustrates the problem:
>
> ----------  begin test_parted.c  ----------
> #include <stdio.h>
> #include <parted/parted.h>
>
> int main ()
> {
>    printf( "Found libparted %s\n", ped_get_version() ) ;
>    return 1 ;
> }
> ----------  end test_parted.c  ----------
>
> $ gcc -lparted test_parted.c -o test_parted
> /usr/local/lib/libparted.so: undefined reference to `last_component'
> collect2: ld returned 1 exit status
> $
>
> Any help with this problem would be greatly appreciated.
>
> Please note that I have not experienced this problem with older git
> versions of parted.

last_component is from gnulib, i.e., lib/libparted.*
(lib/basename.c).

I've just confirmed that running this

  ./bootstrap --gnulib-srcdir=$HOME/.../gnulib
  ./configure && make

works for me



More information about the parted-devel mailing list