Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/libxslt: fix static build
Date: Tue, 29 Mar 2016 16:09:10 +0200	[thread overview]
Message-ID: <20160329160910.267a0dc8@free-electrons.com> (raw)
In-Reply-To: <1459259543.5308.10.camel@embedded.rocks>

Hello,

On Tue, 29 Mar 2016 15:52:23 +0200, J?rg Krause wrote:
> > Baruch, J?rg, could you have a closer look at this problem, and see
> > which solution, between the one from J?rg and the one from Baruch is
> > actually correct ?
> 
> The problem is that xml2-config does not work for cross-compilation:
> 
> $ ./output/host/usr/bfin-buildroot-uclinux-clibc/sysroot/usr//bin/xml2-
> config --libs
> -lxml2 -lm

Why do you say it doesn't work for cross-compilation? This result is
perfectly good for cross-compilation.

> I am not quite sure why it works either. I guess it has something todo
> with how libtool works, as libtool sets the correct dependency_libs in
> libxslt.la if '--with-libxml-libs-prefix' is used:
> 
> # Libraries that this one depends upon.
> dependency_libs=' -L/home/joerg/git/buildroot/output/host/usr/bfin-
> buildroot-uclinux-uclibc/sysroot/usr/lib
> /home/joerg/git/buildroot/output/host/usr/bfin-buildroot-uclinux-
> uclibc/sysroot/usr/lib/libxml2.la
> /home/joerg/git/buildroot/output/host/usr/bfin-buildroot-uclinux-
> uclibc/sysroot/usr/lib/liblzma.la -lm'
> 
> .. whereas, whithout '--with-libxml-libs-prefix:
> 
> # Libraries that this one depends upon.
> dependency_libs=' -lxml2 -lm'

Weird. I guess libtool is parsing this -L<path> option and does some
magic with it. It is completely stupid, because since we have --sysroot
$(STAGING_DIR), then automatically $(STAGING_DIR)/usr/lib is in the
search path for libraries, without the need to add a -L<path> option.
Except for the silly libtool.

> > Ideally, xml2-config should have a --static option, or even better,
> > drop xml2-config entirely and use pkg-config :-)
> 
> Patching libxlst to use pkg-config is what OE and yocto are doing [1]
> as libxml2 does have a correct .pc file.

And why isn't that upstream? The development of libxslt seems to be
active upstream: https://git.gnome.org/browse/libxslt/log/. Well,
except for the fact that they haven't done a release in the last three
years.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2016-03-29 14:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-28 21:09 [Buildroot] [PATCH] package/libxslt: fix static build Jörg Krause
2016-03-29  1:01 ` Thomas Petazzoni
2016-03-29 12:52   ` Thomas Petazzoni
2016-03-29 13:52     ` Jörg Krause
2016-03-29 14:09       ` Thomas Petazzoni [this message]
2016-03-29 17:44     ` Baruch Siach
2016-03-29 17:56       ` Thomas Petazzoni
2016-03-29 18:35         ` Jörg Krause

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=20160329160910.267a0dc8@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox