Re: gnulib: take2, trunk-relative patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Richard W.M. Jones" <rjones@xxxxxxxxxx> wrote:
> Jim Meyering wrote:
>> "Richard W.M. Jones" <rjones@xxxxxxxxxx> wrote:
>>> Jim, I also needed the attached patch, and then I had to do this:
>>>
>>>   cd docs/examples && ./index.py
>> ...
>>> -LDADDS = @STATIC_BINARIES@ $(WARN_CFLAGS) $(top_builddir)/src/libvirt.la
>>> +LDADDS = @STATIC_BINARIES@ $(WARN_CFLAGS) $(top_builddir)/src/libvirt.la \\
>>> +	$(top_builddir)/gnulib/lib/libgnu.la
>>
>> Hi Rich,
>>
>> I don't seem to need it.  I.e., ./index.py works fine without it:
>>
>>     $ ./index.py
>>     loading ../libvirt-api.xml
>>     Parsing info1.c
>>     Parsing suspend.c
>>
>> If you could give me details of why you needed it,
>> I'd feel better about applying it.
>
> Hi Jim,
>
> It's not index.py that fails, but the Makefile.am (which in that
> directory is generated).  More specifically, a program called 'info1'
> fails to link:
>
> gcc -g -O2 -o .libs/info1 info1.o -Wall -Wformat -Wformat-security
> -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow
> -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes
> -Winline -Wredundant-decls -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2
> -fexceptions -fasynchronous-unwind-tables -Werror
> ../../src/.libs/libvirt.so -lxml2 -lgnutls -lxenstore
> ../../src/.libs/libvirt.so: undefined reference to `physmem_total'
...
> make[1]: Leaving directory `/home/rjones/d/libvirt-mingw'
> make: *** [all] Error 2

That suggests something is wrong with your libvirt library.
It should include physmem_total.  That's why it works for me:

    $ rm info1.o && make info1
    gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include \
    -I./include -g -O2 -MT info1.o -MD -MP -MF .deps/info1.Tpo -c -o \
    info1.o info1.c
    mv -f .deps/info1.Tpo .deps/info1.Po
    /bin/sh ../../libtool --tag=CC --mode=link gcc -g -O2 -o info1 \
    info1.o -Wall -Wformat -Wformat-security -Wmissing-prototypes \
    -Wnested-externs -Wpointer-arith -Wextra -Wshadow -Wcast-align \
    -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline \
    -Wredundant-decls -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 \
    -fexceptions -fasynchronous-unwind-tables ../../src/libvirt.la \
    -lxenstore
    libtool: link: gcc -g -O2 -o .libs/info1 info1.o -Wall -Wformat \
    -Wformat-security -Wmissing-prototypes -Wnested-externs \
    -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings \
    -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls \
    -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions \
    -fasynchronous-unwind-tables  ../../src/.libs/libvirt.so -lxml2 \
    -lgnutls -lxenstore -Wl,-rpath -Wl,/usr/local/lib
    libtool: link: creating info1
    $

Please check your library.
Here's what I get:

    $ nm -e ../../src/.libs/libvirt.a|grep physmem
                     U physmem_total
    physmem.o:
    0000000000000060 T physmem_available
    0000000000000000 T physmem_total
    $

And you?

It looks like you're seeing this failure on mingw,
so I think the problem may be a little deeper.

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]