All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hollis Blanchard <hollis_blanchard@mentor.com>
To: <openembedded-devel@lists.linuxtogo.org>
Subject: libxml2 using host's zlib?
Date: Tue, 16 Oct 2012 10:26:25 -0700	[thread overview]
Message-ID: <507D98C1.6000105@mentor.com> (raw)

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



             reply	other threads:[~2012-10-16 17:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-16 17:26 Hollis Blanchard [this message]
2012-10-16 17:40 ` libxml2 using host's zlib? Henning Heinold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=507D98C1.6000105@mentor.com \
    --to=hollis_blanchard@mentor.com \
    --cc=openembedded-devel@lists.linuxtogo.org \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.