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] FIx libpng, directfb, dbus, fontconfig, etc. builds
Date: Wed, 15 Oct 2008 16:47:37 +0200	[thread overview]
Message-ID: <20081015164737.51a662cf@surf> (raw)

Hi,

The following patch fixes two types of build failures that I
encountered with different packages :

 * Some configure scripts were not able to compile the test programs
   used to test whether zlib was properly installed. The configure
   scripts are properly using -lz, but the
   -L/path/to/staging_dir/usr/lib option was not present, leading to
   build failure.

   The solution I've found is to set a -L option in LDFLAGS.

   See
   http://buildroot.uclibc.org/lists/buildroot/2008-October/010909.html
   for details.

 * While linking applications, for example the applications included in
   the fontconfig package, I had build failures like :

/usr/local/uclibc-0.9.28-2/arm/lib/gcc/arm-linux-uclibc/3.4.5/../../../../arm-linux-uclibc/bin/ld.real:
warning: libfreetype.so.6, needed by ../src/.libs/libfontconfig.so, not
found (try using -rpath or -rpath-link)

    this is due to the fact that ld is not able to find the other
    already installed shared libraries.

    The solution I've found is to add a -Wl,--rpath-link
    -Wl,/path/to/staging_dir/usr/lib option in LDFLAGS.

    See the thread at
    http://buildroot.uclibc.org/lists/buildroot/2008-October/010917.html
    for details.

For both of the problems, I'm not sure about the solutions, but I'm
sure that the problems exist.

Thanks,

Thomas

---

Make sure libraries are visible when building packages

This patch adds an LDFLAGS variable before calling the configure
script of any package, in order to fix two problems :

 * Some configure scripts were not able to compile the test programs
   used to test whether zlib was properly installed. The configure
   scripts are properly using -lz, but the
   -L/path/to/staging_dir/usr/lib option was not present, leading to
   build failure.

 * While linking applications, for example the applications included in
   the fontconfig package, I had build failures like :

/usr/local/uclibc-0.9.28-2/arm/lib/gcc/arm-linux-uclibc/3.4.5/../../../../arm-linux-uclibc/bin/ld.real:
warning: libfreetype.so.6, needed by ../src/.libs/libfontconfig.so, not
found (try using -rpath or -rpath-link)

    this is due to the fact that ld is not able to find the other
    already installed shared libraries.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/Makefile.in |    1 +
 1 file changed, 1 insertion(+)

Index: buildroot/package/Makefile.in
===================================================================
--- buildroot.orig/package/Makefile.in
+++ buildroot/package/Makefile.in
@@ -224,6 +224,7 @@
 		NM_FOR_TARGET="$(TARGET_NM)" \
 		DEFAULT_ASSEMBLER="$(TARGET_AS)" \
 		DEFAULT_LINKER="$(TARGET_LD)" \
+		LDFLAGS="$(TARGET_LDFLAGS) -Wl,--rpath-link -Wl,$(STAGING_DIR)/usr/lib" \
 		PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \
 		PKG_CONFIG="$(STAGING_DIR)/usr/bin/pkg-config" \
 		PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig:$(PKG_CONFIG_PATH)" \


-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com

             reply	other threads:[~2008-10-15 14:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-15 14:47 Thomas Petazzoni [this message]
2008-10-20 13:48 ` [Buildroot] Feedback ? Thomas Petazzoni
2008-10-20 13:55   ` Daniel Laird
2008-10-20 14:52   ` Grant Likely

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=20081015164737.51a662cf@surf \
    --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