All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] Issue when compiling libpng and directfb
Date: Tue, 7 Oct 2008 10:54:40 +0200	[thread overview]
Message-ID: <20081007105440.05399a80@surf> (raw)

Hi,

With current Buildroot SVN, I have an issue when trying to build libpng
and directfb: the configure script cannot find that zlib is installed.

The configure script tries to compile a simple program that makes a
call to zlibVersion() using the -lz option. But the
-L$(STAGING_DIR)/usr/lib/ option is not passed to gcc (the -I options
are correct however), so the compilation fails and configure complains
that it can't find the configure script.

In package/Makefile.in, it seems that the library path is passed in
TARGET_CONFIGURE_OPTS, using LD :

 LD="$(TARGET_LD) $(TARGET_LDFLAGS)" \

In the config.log, I see reference to the correct -L paths, but these
paths seem to be removed when testing the compilation of the sample
zlib program.

I workarounded the problem by using the two following patches, but I'm
quite sure they are not the proper fix.

I don't know if it's important, but I'm using an external toolchain
(that has been previously compiled by Buildroot a long time ago).

Any clue ?

Thanks,

Thomas

---
 package/directfb/directfb.mk |    1 +
 1 file changed, 1 insertion(+)

Index: buildroot/package/directfb/directfb.mk
===================================================================
--- buildroot.orig/package/directfb/directfb.mk
+++ buildroot/package/directfb/directfb.mk
@@ -38,6 +38,7 @@
 	(cd $(DIRECTFB_DIR); rm -f config.cache; \
 		$(TARGET_CONFIGURE_OPTS) \
 		$(TARGET_CONFIGURE_ARGS) \
+	LDFLAGS="$(TARGET_LDFLAGS)" \
 	ac_cv_header_linux_wm97xx_h=no \
 	ac_cv_header_linux_sisfb_h=no \
 	ac_cv_header_asm_page_h=no \

---
 package/libpng/libpng.mk |    1 +
 1 file changed, 1 insertion(+)

Index: buildroot/package/libpng/libpng.mk
===================================================================
--- buildroot.orig/package/libpng/libpng.mk
+++ buildroot/package/libpng/libpng.mk
@@ -42,6 +42,7 @@
 	(cd $(LIBPNG_DIR); rm -rf config.cache; \
 		$(TARGET_CONFIGURE_OPTS) \
 		$(TARGET_CONFIGURE_ARGS) \
+		LDFLAGS="$(TARGET_LDFLAGS)" \
 		ac_cv_have_decl_malloc=yes \
 		gl_cv_func_malloc_0_nonnull=yes \
 		ac_cv_func_malloc_0_nonnull=yes \

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

                 reply	other threads:[~2008-10-07  8:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20081007105440.05399a80@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 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.