All of lore.kernel.org
 help / color / mirror / Atom feed
* libxml2 using host's zlib?
@ 2012-10-16 17:26 Hollis Blanchard
  2012-10-16 17:40 ` Henning Heinold
  0 siblings, 1 reply; 2+ messages in thread
From: Hollis Blanchard @ 2012-10-16 17:26 UTC (permalink / raw)
  To: openembedded-devel

I was trying to build php using meta-webserver, and got stuck with this 
error during configuration of php-native:

    configure:49076: gcc -o conftest -I/usr/include
    -isystem/mnt/mel/build/tmp/sysroots/i686-linux/usr/include -O2 -pipe
    -g0 -fvisibility=hidden
    -isystem/mnt/mel/build/tmp/sysroots/i686-linux/usr/include
    -L/usr/lib -L/mnt/mel/build/tmp/sysroots/i686-linux/usr/lib
    -L/mnt/mel/build/tmp/sysroots/i686-linux/lib
    -Wl,-rpath-link,/mnt/mel/build/tmp/sysroots/i686-linux/usr/lib
    -Wl,-rpath-link,/mnt/mel/build/tmp/sysroots/i686-linux/lib
    -Wl,-rpath,/mnt/mel/build/tmp/sysroots/i686-linux/usr/lib
    -Wl,-rpath,/mnt/mel/build/tmp/sysroots/i686-linux/lib -Wl,-O1
    -Wl,--hash-style=both
    -Wl,-rpath,/mnt/mel/build/tmp/sysroots/i686-linux/usr/lib
    -L/mnt/mel/build/tmp/sysroots/i686-linux/usr/lib
    -Wl,-rpath,/mnt/mel/build/tmp/sysroots/i686-linux/usr/lib/../lib
    -L/mnt/mel/build/tmp/sysroots/i686-linux/usr/lib/../lib conftest.c
    -lz -lcrypt -lrt -lm -lnsl -lxml2 -lcrypt -lxml2 -lz -lm -lxml2 -lz
    -lm >&5
    /mnt/mel/build/tmp/sysroots/i686-linux/usr/lib/libxml2.so: undefined
    reference to `gzopen64@ZLIB_1.2.3.3'


My build host has /lib/libz.so.1.2.3.3, so my guess is:
* libxml2 is linking with libz from the host
* php-native properly links with zlib-native from Poky (1.2.7), plus the 
tainted libxml2
* libxml2 fails to link because it wants symbols from 1.2.3, which it 
can't find in zlib-native

I've tried the following:

    hblancha@sb-ubuntu-1004:/mnt/mel$ diff -u
    poky/meta/recipes-core/libxml/libxml2.inc{.orig,}---
    poky/meta/recipes-core/libxml/libxml2.inc.orig      2012-10-16
    10:54:17.000000000 -0500
    +++ poky/meta/recipes-core/libxml/libxml2.inc   2012-10-16
    10:55:54.000000000 -0500
    @@ -9,7 +9,7 @@
    file://list.c;beginline=4;endline=13;md5=cdbfa3dee51c099edb04e39f762ee907
    \
    file://trio.c;beginline=5;endline=14;md5=6c025753c86d958722ec76e94cae932e"

    -DEPENDS_virtclass-native = "python-native"
    +DEPENDS_append_virtclass-native = " python-native"
      DEPENDS =+ "zlib"

      SRC_URI = "ftp://xmlsoft.org/libxml2/libxml2-${PV}.tar.gz \
    @@ -25,8 +25,8 @@
      }

      EXTRA_OECONF = "--without-python --without-debug --without-legacy
    --without-catalog --without-docbook --with-c14n --without-lzma"
    -EXTRA_OECONF_virtclass-native =
    "--with-python=${STAGING_BINDIR}/python --without-legacy
    --with-catalog --without-docbook --with-c14n --without-lzma"
    -EXTRA_OECONF_virtclass-nativesdk =
    "--with-python=${STAGING_BINDIR}/python --without-legacy
    --with-catalog --without-docbook --with-c14n --without-lzma"
    +EXTRA_OECONF_virtclass-native =
    "--with-python=${STAGING_BINDIR}/python --without-legacy
    --with-catalog --without-docbook --with-c14n --without-lzma
    --with-zlib=${STAGING_LIBDIR}"
    +EXTRA_OECONF_virtclass-nativesdk =
    "--with-python=${STAGING_BINDIR}/python --without-legacy
    --with-catalog --without-docbook --with-c14n --without-lzma
    --with-zlib=${STAGING_LIBDIR}"
      EXTRA_OECONF_linuxstdbase = "--without-python --with-debug
    --with-legacy --with-catalog --with-docbook --with-c14n --without-lzma"

      # required for pythong binding

    hblancha@sb-ubuntu-1004:/mnt/mel/build$ bitbake -c clean libxml2-native
    [...]
    hblancha@sb-ubuntu-1004:/mnt/mel/build$ bitbake libxml2-native
    [...]
    hblancha@sb-ubuntu-1004:/mnt/mel/build$ nm
    tmp/sysroots/i686-linux/usr/lib/libxml2.so | grep gzopen
              U gzopen64@@ZLIB_1.2.3.3

As you can see, it didn't help: libxml2.so still is linking with the 
host's zlib-1.2.3.3, and php-native fails to configure because of it.

How to fix? Thanks!

-- 
Hollis Blanchard
Product Owner, Sourcery Analyzer <http://go.mentor.com/sourceryanalyzer>
Mentor Graphics, Embedded Systems Division



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

* Re: libxml2 using host's zlib?
  2012-10-16 17:26 libxml2 using host's zlib? Hollis Blanchard
@ 2012-10-16 17:40 ` Henning Heinold
  0 siblings, 0 replies; 2+ messages in thread
From: Henning Heinold @ 2012-10-16 17:40 UTC (permalink / raw)
  To: openembedded-devel; +Cc: openembedded-devel

On Tue, Oct 16, 2012 at 10:26:25AM -0700, Hollis Blanchard wrote:
> I was trying to build php using meta-webserver, and got stuck with
> this error during configuration of php-native:
> 
>    configure:49076: gcc -o conftest -I/usr/include
>    -isystem/mnt/mel/build/tmp/sysroots/i686-linux/usr/include -O2 -pipe
>    -g0 -fvisibility=hidden
>    -isystem/mnt/mel/build/tmp/sysroots/i686-linux/usr/include
>    -L/usr/lib -L/mnt/mel/build/tmp/sysroots/i686-linux/usr/lib
^^^^^^^^^^^^^^^
this includes the host libs

>    -L/mnt/mel/build/tmp/sysroots/i686-linux/lib
>    -Wl,-rpath-link,/mnt/mel/build/tmp/sysroots/i686-linux/usr/lib
>    -Wl,-rpath-link,/mnt/mel/build/tmp/sysroots/i686-linux/lib
>    -Wl,-rpath,/mnt/mel/build/tmp/sysroots/i686-linux/usr/lib
>    -Wl,-rpath,/mnt/mel/build/tmp/sysroots/i686-linux/lib -Wl,-O1
>    -Wl,--hash-style=both
>    -Wl,-rpath,/mnt/mel/build/tmp/sysroots/i686-linux/usr/lib
>    -L/mnt/mel/build/tmp/sysroots/i686-linux/usr/lib
>    -Wl,-rpath,/mnt/mel/build/tmp/sysroots/i686-linux/usr/lib/../lib
>    -L/mnt/mel/build/tmp/sysroots/i686-linux/usr/lib/../lib conftest.c
>    -lz -lcrypt -lrt -lm -lnsl -lxml2 -lcrypt -lxml2 -lz -lm -lxml2 -lz
>    -lm >&5
>    /mnt/mel/build/tmp/sysroots/i686-linux/usr/lib/libxml2.so: undefined
>    reference to `gzopen64@ZLIB_1.2.3.3'

Bye Henning



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

end of thread, other threads:[~2012-10-16 17:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-16 17:26 libxml2 using host's zlib? Hollis Blanchard
2012-10-16 17:40 ` Henning Heinold

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.