* [Buildroot] [PATCH] fix ldconfig at target-finalize @ 2010-06-16 13:43 Baruch Siach 2010-06-28 7:16 ` Andy Gibbs 0 siblings, 1 reply; 4+ messages in thread From: Baruch Siach @ 2010-06-16 13:43 UTC (permalink / raw) To: buildroot Host ldconfig fails when the directory of the aux-cache file (/var/cache/ldconfig, by default) does not exist. Make sure this directory exists before calling ldconfig. Signed-off-by: Baruch Siach <baruch@tkos.co.il> --- Makefile | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makefile index 794a298..1415e30 100644 --- a/Makefile +++ b/Makefile @@ -402,6 +402,7 @@ ifneq ($(BR2_HAVE_DOCUMENTATION),y) rm -rf $(TARGET_DIR)/usr/share/gtk-doc endif find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIPCMD) 2>/dev/null || true + mkdir -p $(TARGET_DIR)/var/cache/ldconfig $(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null mkdir -p $(TARGET_DIR)/etc -- 1.7.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] fix ldconfig at target-finalize 2010-06-16 13:43 [Buildroot] [PATCH] fix ldconfig at target-finalize Baruch Siach @ 2010-06-28 7:16 ` Andy Gibbs 2010-06-28 7:22 ` Baruch Siach 0 siblings, 1 reply; 4+ messages in thread From: Andy Gibbs @ 2010-06-28 7:16 UTC (permalink / raw) To: buildroot On Wednesday, June 16, 2010 3:43 PM, Baruch Siach wrote: > Host ldconfig fails when the directory of the aux-cache file > (/var/cache/ldconfig, by default) does not exist. Make sure this directory > exists before calling ldconfig. > Also would be good to do a "touch $(TARGET_DIR)/etc/ld.so.conf" too, along with your mkdir. Then you get rid of both errors... /sbin/ldconfig: Can't open configuration file (...)/target-dir/etc/ld.so.conf: No such file or directory /sbin/ldconfig: Can't open cache file /var/cache/ldconfig/aux-cache : No such file or directory Do you need me to provide a patch file to do this? Cheers Andy > Signed-off-by: Baruch Siach > <baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org> > --- > Makefile | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/Makefile b/Makefile > index 794a298..1415e30 100644 > --- a/Makefile > +++ b/Makefile > @@ -402,6 +402,7 @@ ifneq ($(BR2_HAVE_DOCUMENTATION),y) > rm -rf $(TARGET_DIR)/usr/share/gtk-doc > endif > find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIPCMD) 2>/dev/null || > true > + mkdir -p $(TARGET_DIR)/var/cache/ldconfig > $(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null > > mkdir -p $(TARGET_DIR)/etc > -- > 1.7.1 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] fix ldconfig at target-finalize 2010-06-28 7:16 ` Andy Gibbs @ 2010-06-28 7:22 ` Baruch Siach 2010-06-28 8:31 ` Andy Gibbs 0 siblings, 1 reply; 4+ messages in thread From: Baruch Siach @ 2010-06-28 7:22 UTC (permalink / raw) To: buildroot Hi Andy, On Mon, Jun 28, 2010 at 09:16:09AM +0200, Andy Gibbs wrote: > On Wednesday, June 16, 2010 3:43 PM, Baruch Siach wrote: > >Host ldconfig fails when the directory of the aux-cache file > >(/var/cache/ldconfig, by default) does not exist. Make sure this directory > >exists before calling ldconfig. > > > > Also would be good to do a "touch $(TARGET_DIR)/etc/ld.so.conf" too, > along with your mkdir. > > Then you get rid of both errors... > > /sbin/ldconfig: Can't open configuration file > (...)/target-dir/etc/ld.so.conf: No such file or directory > /sbin/ldconfig: Can't open cache file /var/cache/ldconfig/aux-cache > : No such file or directory > > Do you need me to provide a patch file to do this? This patch fixes both problems for me. Do you still encounter failure after applying this patch? baruch > >Signed-off-by: Baruch Siach > ><baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org> > >--- > >Makefile | 1 + > >1 files changed, 1 insertions(+), 0 deletions(-) > > > >diff --git a/Makefile b/Makefile > >index 794a298..1415e30 100644 > >--- a/Makefile > >+++ b/Makefile > >@@ -402,6 +402,7 @@ ifneq ($(BR2_HAVE_DOCUMENTATION),y) > > rm -rf $(TARGET_DIR)/usr/share/gtk-doc > >endif > > find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIPCMD) > >2>/dev/null || true > >+ mkdir -p $(TARGET_DIR)/var/cache/ldconfig > > $(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null > > > > mkdir -p $(TARGET_DIR)/etc -- ~. .~ Tk Open Systems =}------------------------------------------------ooO--U--Ooo------------{= - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il - ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] fix ldconfig at target-finalize 2010-06-28 7:22 ` Baruch Siach @ 2010-06-28 8:31 ` Andy Gibbs 0 siblings, 0 replies; 4+ messages in thread From: Andy Gibbs @ 2010-06-28 8:31 UTC (permalink / raw) To: buildroot On Monday, June 28, 2010 9:22 AM, Baruch Siach wrote: > Hi Andy, > > On Mon, Jun 28, 2010 at 09:16:09AM +0200, Andy Gibbs wrote: >> On Wednesday, June 16, 2010 3:43 PM, Baruch Siach wrote: >> >Host ldconfig fails when the directory of the aux-cache file >> >(/var/cache/ldconfig, by default) does not exist. Make sure this >> >directory >> >exists before calling ldconfig. >> > >> >> Also would be good to do a "touch $(TARGET_DIR)/etc/ld.so.conf" too, >> along with your mkdir. >> >> Then you get rid of both errors... >> >> /sbin/ldconfig: Can't open configuration file >> (...)/target-dir/etc/ld.so.conf: No such file or directory >> /sbin/ldconfig: Can't open cache file /var/cache/ldconfig/aux-cache >> : No such file or directory >> >> Do you need me to provide a patch file to do this? > > This patch fixes both problems for me. Do you still encounter failure > after > applying this patch? > I'm afraid I did. I am running buildroot with a toolchain created by crosstool-ng for powerpc. Since crosstool doesn't generate a cross-ldconfig, buildroot is picking up the one on my PC at /sbin. I believe in contrast uclibc *does* generate a cross-ldconfig. Up until the end of last week I never got an error, but then I upgraded eglibc on my PC from 2.9 to 2.11.1 and then this error happened. Searching the web found your post, and helped me find the solution to my own problem - so I am very grateful! However, I am wondering whether it is better simply to remove the ldconfig step in my case, since it doesn't actually do anything useful, and I need to run it on the target anyway to correctly initialise the ld cache. So, I then thought about patching Makefile to make the line in question become: ifneq ($(BR2_TOOLCHAIN_EXTERNAL),y) $(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null endif Or alternatively, disabling it via a change to 'package/Makefile.in' changing the block around line 140: ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) TARGET_LDCONFIG=$(TARGET_CROSS)ldconfig else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) TARGET_LDCONFIG=/sbin/ldconfig endif to: ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) TARGET_LDCONFIG=$(TARGET_CROSS)ldconfig else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) TARGET_LDCONFIG=/bin/true endif But this may not really be appropriate for an upstream patch, since I do not know the rationale that set the TARGET_LDCONFIG variable to be /sbin/ldconfig when an external toolchain is used. Maybe a better approach would be an additional setting inside buildroot that enables the ldconfig line to be disabled. Also then it could disable its use in other places where its used during the build. Unfortunately, however, I don't think such a patch is within my grasp to write! But I will happily test it if someone else feels that they want to do it. Cheers Andy ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-06-28 8:31 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-06-16 13:43 [Buildroot] [PATCH] fix ldconfig at target-finalize Baruch Siach 2010-06-28 7:16 ` Andy Gibbs 2010-06-28 7:22 ` Baruch Siach 2010-06-28 8:31 ` Andy Gibbs
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox