FIx libpng, directfb, dbus, fontconfig, etc. builds
PATCH 1/1 FIx libpng, directfb, dbus, fontconfig, etc. builds
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.
--- package/Makefile.in | 1 + 1 file changed, 1 insertion(+)
package/Makefile.in +1 -0
@@ -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)" \
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers and embedded Linux development, consulting, training and support. http://free-electrons.com
[Buildroot] Feedback ?
Le Wed, 15 Oct 2008 16:47:37 +0200,
Thomas Petazzoni <[email protected]> a ?crit :
Quoted 14 lines
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 :
Quoted 6 lines
/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.
May I have some feedback on this patch ? Without this, Buildroot is just unusable here.
Thanks,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers and embedded Linux development, consulting, training and support. http://free-electrons.com
[Buildroot] Feedback ?
I would like this patch as I have a number of packages that have this change added also (but on a package by package patch).
I am slightly afraid to just throw it into buildroot.
If anyone has any feedback on this, that would be appreciated before I submit the change into buildroot as I think this is a good change.
Many thanks
Daniel Laird
-----Original Message-----
From: [email protected] [mailto:buildroot-bounces at uclibc.org] On Behalf Of Thomas Petazzoni
Sent: 2008 Oct 20 14:48
To: buildroot at uclibc.org
Subject: [Buildroot] Feedback ?
Le Wed, 15 Oct 2008 16:47:37 +0200,
Thomas Petazzoni <[email protected]> a ?crit :
Quoted 14 lines
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 :
Quoted 6 lines
/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.
May I have some feedback on this patch ? Without this, Buildroot is just unusable here.
Thanks,
Thomas
Signature · 8 lines
Thomas Petazzoni, Free Electrons Kernel, drivers and embedded Linux development, consulting, training and support. http://free-electrons.com _______________________________________________ buildroot mailing list buildroot at uclibc.org http://busybox.net/mailman/listinfo/buildroot
[Buildroot] Feedback ?
In reply to Thomas PetazzoniQuoted 21 lines · Thomas Petazzoni
Le Wed, 15 Oct 2008 16:47:37 +0200,
Thomas Petazzoni <[email protected]> a ?crit :Quoted 18 lines
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)
Quoted 5 lines
Quoted 2 lines
this is due to the fact that ld is not able to find the other already installed shared libraries.
May I have some feedback on this patch ? Without this, Buildroot is just unusable here.
FWIW, this patch looks good to me, but I'm far from the most knowledgable person to comment.
g.