Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 207018 - sys-devel/gettext-0.17 fails to find libxml2 and falls back to internal copy
Summary: sys-devel/gettext-0.17 fails to find libxml2 and falls back to internal copy
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on: 319765
Blocks: bundled-libs
  Show dependency tree
 
Reported: 2008-01-22 12:18 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2010-05-24 02:07 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2008-01-22 12:18:56 UTC
configure:30805: checking libxml2/libxml/xmlversion.h usability
configure:30822: x86_64-pc-linux-gnu-gcc -std=gnu99 -c -march=athlon64 -O2 -ftracer -pipe -ftree-vectorize -Wformat=2 -Wno-error -Wno-pointer-sign -g -ggdb -Wstrict-aliasing=2 -Wno-format-zero-length  conftest.c >&5
In file included from conftest.c:141:
/usr/include/libxml2/libxml/xmlversion.h:13:31: error: libxml/xmlexports.h: No such file or directory
In file included from conftest.c:141:
/usr/include/libxml2/libxml/xmlversion.h:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
configure:30828: $? = 1

[snip]
configure:46932: x86_64-pc-linux-gnu-gcc -std=gnu99 -o conftest -march=athlon64 -O2 -ftracer -pipe -ftree-vectorize -Wformat=2 -Wno-error -Wno-pointer-sign -g -ggdb -Wstrict-aliasing=2 -Wno-format-zero-length  -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu conftest.c  /usr/lib64/libxml2.so /usr/lib64/libdl.so /usr/lib64/libz.so /usr/lib64/libm.so  >&5
conftest.c:213:31: error: libxml/xmlversion.h: No such file or directory
conftest.c: In function 'main':
conftest.c:217: warning: implicit declaration of function 'xmlCheckVersion'
configure:46938: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME ""
[snip defines]
| /* end confdefs.h.  */
| #include <libxml/xmlversion.h>
| int
| main ()
| {
| xmlCheckVersion (0);
|   ;
|   return 0;
| }
configure:46981: x86_64-pc-linux-gnu-gcc -std=gnu99 -o conftest -march=athlon64 -O2 -ftracer -pipe -ftree-vectorize -Wformat=2 -Wno-error -Wno-pointer-sign -g -ggdb -Wstrict-aliasing=2 -Wno-format-zero-length   -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu conftest.c  /usr/lib64/libxml2.so /usr/lib64/libdl.so /usr/lib64/libz.so /usr/lib64/libm.so  >&5
conftest.c:213:31: error: libxml/xmlversion.h: No such file or directory
conftest.c: In function 'main':
conftest.c:217: warning: implicit declaration of function 'xmlCheckVersion'
configure:46987: $? = 1
conftest.c:213:31: error: libxml/xmlversion.h: No such file or directory
conftest.c: In function 'main':
conftest.c:217: warning: implicit declaration of function 'xmlCheckVersion'
configure:46987: $? = 1
configure: failed program was:
| /* confdefs.h.  */
[snip defines]
| /* end confdefs.h.  */
| #include <libxml/xmlversion.h>
| int
| main ()
| {
| xmlCheckVersion (0);
|   ;
|   return 0;
| }
configure:47029: x86_64-pc-linux-gnu-gcc -std=gnu99 -o conftest -march=athlon64 -O2 -ftracer -pipe -ftree-vectorize -Wformat=2 -Wno-error -Wno-pointer-sign -g -ggdb -Wstrict-aliasing=2 -Wno-format-zero-length   -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu conftest.c  /usr/lib64/libxml2.so /usr/lib64/libdl.so /usr/lib64/libz.so /usr/lib64/libm.so  >&5
In file included from conftest.c:213:
/usr/include/libxml2/libxml/xmlversion.h:13:31: error: libxml/xmlexports.h: No such file or directory
In file included from conftest.c:213:
/usr/include/libxml2/libxml/xmlversion.h:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
conftest.c: In function 'main':
conftest.c:217: warning: implicit declaration of function 'xmlCheckVersion'
configure:47035: $? = 1
configure: failed program was:
| /* confdefs.h.  */
[snip defines]
| /* end confdefs.h.  */
| #include <libxml2/libxml/xmlversion.h>
| int
| main ()
| {
| xmlCheckVersion (0);
|   ;
|   return 0;
| }
configure:47102: checking for libxml
configure:47104: result: no
configure:47117: checking whether to use the included libxml
configure:47119: result: yes
Comment 1 Stian Skjelstad 2008-01-22 12:43:11 UTC
It doesn't depend on libxml2 either...
Comment 2 SpanKY gentoo-dev 2008-01-22 13:01:25 UTC
yes it does
Comment 3 Stian Skjelstad 2008-01-22 13:11:35 UTC
Where do it get the depency to libxml2 from?

RDEPEND="virtual/libc
    virtual/libiconv"
DEPEND="${RDEPEND}
    >=dev-util/pkgconfig-0.16
    >=sys-devel/gettext-0.11
    doc? (
        >=dev-util/gtk-doc-1.4
        ~app-text/docbook-xml-dtd-4.1.2
    )"

is from glib-2.14.5.ebuild

And i did a sneak-peek on the inherit list.

(not that it is very relativt to the bugreport.. I can find libxml2 via system packages when I do emerge -epvt glib, but not a direct depency line)
Comment 4 SpanKY gentoo-dev 2008-01-22 13:35:41 UTC
why are you looking at the glib ebuild ?  we're talking about gettext which lists libxml2 in its DEPEND.
Comment 5 Stian Skjelstad 2008-01-22 13:37:33 UTC
never mind :-p me bad. Just ignore the noise from me.
Comment 6 SpanKY gentoo-dev 2008-01-22 13:37:52 UTC
hmm, i was going by the libraries that gettext links against (scanelf -qRn) to verify it was using the system libxml2 and not its internal one ... but i think this is just another case of a poorly written configure script where it checks headers and libraries and then looks at the results ...

so if no headers are found, it assumes no external support, but it doesnt bother clearing out the discovered library values ...
Comment 7 Stian Skjelstad 2008-01-22 13:46:31 UTC
I just looked at the the macro at gettext-0.17/gettext-tools/gnulib-m4/libxml.m4

It tries to inlude libxml2/libxml/xmlversion.h without setting up -I/usr/include/libxml2

However, if the text suceeds, it generates the proper include path and stores it in $gl_cv_INCXML.
Comment 8 SpanKY gentoo-dev 2008-01-22 14:10:38 UTC
hrm, it looks and smells like gnulib, but upstream gnulib doesnt actually provide any xml stuff

the comments say they ignore .pc/-config scripts on purpose for cross-compiling and such, but i think that's hogwash ...

they do attempt #include <libxml2/libxml/xmlversion.h> should should succeed ...
Comment 9 Bruno Haible 2008-12-07 14:04:41 UTC
This has meanwhile be reported on the gettext bug tracker:
https://savannah.gnu.org/bugs/?22831

The workaround is to add -I/usr/include/libxml2 to the CPPFLAGS before/while running configure.
Comment 10 barthek 2010-04-02 21:21:47 UTC
would that be possible to drop the external libxml dependency and use gettext-provided one? ive no need for xml library at all yet gettext pulls one.
cheers
Comment 11 SpanKY gentoo-dev 2010-04-05 23:07:35 UTC
gettext uses xml2 which means you have a package that needs it
Comment 12 SpanKY gentoo-dev 2010-05-24 02:07:37 UTC
should be fixed with gettext-0.18.  no plans on fixing older versions.