All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] crosstool/buildroot ldconfig failure in "target-finalize" during build using Fedora 13
@ 2010-08-06 15:49 Darcy Watkins
  2010-08-06 16:08 ` Darcy Watkins
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Darcy Watkins @ 2010-08-06 15:49 UTC (permalink / raw)
  To: buildroot

Hello,

After upgrading my build machine from Fedora 10 to Fedora 13 it appears
that the host's "ldconfig" command is no longer usable for cross build
application.  The build thus fails when it attempts to execute
/sbin/ldconfig during the "target-finalize" stage.

When building using the internal toolchain generated by buildroot, I do
not see an issue.  When using an external toolchain such as crosstool-ng
it shows up.

To work around the issue I pulled in the July 26th changeset to the
Makefile to check for and use a $(TARGET_CROSS)ldconfig and then I
modified my copy of crosstool (version 1.7.2) so that it would install
the cross ldconfig along with its cross ldd.  That gets me working fine
for uclibc builds.

When I tried a glibc build, there is no cross ldconfig available.

I also notice that in crosstool 1.8.0 the cross ldd is replaced by a
script so the cross ldconfig may not even be available (I don't know for
sure since so far I have only seen the notes in the changelog and
haven't actually tried crosstool 1.8.0 yet).

It appears to me that the assumption an external toolchain will provide
a cross ldconfig is not valid and the assumption that the host ldconfig
is usable as a cross tool in the absence of this is no longer valid.

Since it is the buildroot "target-finalize" that needs a usable ldconfig
I figure it is appropriate to raise this matter here for discussion
first.

Anyone have suggestions as to how best to approach this?


Regards,

Darcy

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] crosstool/buildroot ldconfig failure in "target-finalize" during build using Fedora 13
  2010-08-06 15:49 [Buildroot] crosstool/buildroot ldconfig failure in "target-finalize" during build using Fedora 13 Darcy Watkins
@ 2010-08-06 16:08 ` Darcy Watkins
  2010-08-06 17:48 ` Darcy Watkins
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Darcy Watkins @ 2010-08-06 16:08 UTC (permalink / raw)
  To: buildroot

On Fri, 2010-08-06 at 08:49 -0700, Darcy Watkins wrote:
> Hello,
> 
> After upgrading my build machine from Fedora 10 to Fedora 13 it appears
> that the host's "ldconfig" command is no longer usable for cross build
> application.  The build thus fails when it attempts to execute
> /sbin/ldconfig during the "target-finalize" stage.
> 
> When building using the internal toolchain generated by buildroot, I do
> not see an issue.  When using an external toolchain such as crosstool-ng
> it shows up.
> 
> To work around the issue I pulled in the July 26th changeset to the
> Makefile to check for and use a $(TARGET_CROSS)ldconfig and then I
> modified my copy of crosstool (version 1.7.2) so that it would install
> the cross ldconfig along with its cross ldd.  That gets me working fine
> for uclibc builds.
> 

FYI - the change I applied to crosstool-ng 1.7.2 is...

--- a/scripts/build/libc/uClibc.sh
+++ b/scripts/build/libc/uClibc.sh
@@ -176,8 +176,9 @@ do_libc() {
              ${CT_LIBC_UCLIBC_VERBOSITY}    \
              -C utils hostutils

-        CT_DoLog EXTRA "Installing C library cross-ldd"
+        CT_DoLog EXTRA "Installing C library cross-ldd (and cross-ldconfig)"
         CT_DoExecLog ALL install -m 0755 utils/ldd.host "${CT_PREFIX_DIR}/bin/${CT_TARGET}-ldd"
+        CT_DoExecLog ALL install -m 0755 utils/ldconfig.host "${CT_PREFIX_DIR}/bin/${CT_TARGET}-ldconfig"
     fi

     CT_EndStep


... and the change from July 26 I applied is at ...

http://lists.busybox.net/pipermail/buildroot/2010-July/036400.html

I only used the change to Makefile since I never applied the earlier
related changes that are being undone in package/Makefile.in.

Regards,

Darcy


> When I tried a glibc build, there is no cross ldconfig available.
> 
> I also notice that in crosstool 1.8.0 the cross ldd is replaced by a
> script so the cross ldconfig may not even be available (I don't know for
> sure since so far I have only seen the notes in the changelog and
> haven't actually tried crosstool 1.8.0 yet).
> 
> It appears to me that the assumption an external toolchain will provide
> a cross ldconfig is not valid and the assumption that the host ldconfig
> is usable as a cross tool in the absence of this is no longer valid.
> 
> Since it is the buildroot "target-finalize" that needs a usable ldconfig
> I figure it is appropriate to raise this matter here for discussion
> first.
> 
> Anyone have suggestions as to how best to approach this?
> 
> 
> Regards,
> 
> Darcy
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] crosstool/buildroot ldconfig failure in "target-finalize" during build using Fedora 13
  2010-08-06 15:49 [Buildroot] crosstool/buildroot ldconfig failure in "target-finalize" during build using Fedora 13 Darcy Watkins
  2010-08-06 16:08 ` Darcy Watkins
@ 2010-08-06 17:48 ` Darcy Watkins
  2010-08-06 19:53 ` Thomas Petazzoni
  2010-08-08  5:11 ` Baruch Siach
  3 siblings, 0 replies; 6+ messages in thread
From: Darcy Watkins @ 2010-08-06 17:48 UTC (permalink / raw)
  To: buildroot

On Fri, 2010-08-06 at 08:49 -0700, Darcy Watkins wrote:
> Hello,
> 
> After upgrading my build machine from Fedora 10 to Fedora 13 it appears
> that the host's "ldconfig" command is no longer usable for cross build
> application.  The build thus fails when it attempts to execute
> /sbin/ldconfig during the "target-finalize" stage.
> 
> When building using the internal toolchain generated by buildroot, I do
> not see an issue.  When using an external toolchain such as crosstool-ng
> it shows up.
> 
> To work around the issue I pulled in the July 26th changeset to the
> Makefile to check for and use a $(TARGET_CROSS)ldconfig and then I
> modified my copy of crosstool (version 1.7.2) so that it would install
> the cross ldconfig along with its cross ldd.  That gets me working fine
> for uclibc builds.
> 
> When I tried a glibc build, there is no cross ldconfig available.
> 
> I also notice that in crosstool 1.8.0 the cross ldd is replaced by a
> script so the cross ldconfig may not even be available (I don't know for
> sure since so far I have only seen the notes in the changelog and
> haven't actually tried crosstool 1.8.0 yet).
> 
> It appears to me that the assumption an external toolchain will provide
> a cross ldconfig is not valid and the assumption that the host ldconfig
> is usable as a cross tool in the absence of this is no longer valid.
> 
> Since it is the buildroot "target-finalize" that needs a usable ldconfig
> I figure it is appropriate to raise this matter here for discussion
> first.
> 
> Anyone have suggestions as to how best to approach this?

Hello,

On further investigation, it appears that the host's ldconfig will run
without an error message if the $(TARGET_DIR)/var/cache/ldconfig
directory is created before running ldconfig.

So now I think that the ldconfig (version 2.12) has become more strict
than earlier versions.  Eventually (with package updates, etc) this will
make its way into our cross ldconfig as well, so I suggest first
ensuring that the directory is created before running the tool for any
case.

After running the make on buildroot, there is a binary file:
$(TARGET_DIR)/var/cache/ldconfig/aux-cache

One question that comes to my mind, could there be endianess issues with
respect to that file?  A colleague of mine suggested that we may want to
use the "-N" option to not generate cache (so it would only generate
symlinks).  Any thoughts?

Regards,

Darcy


> 
> 
> Regards,
> 
> Darcy
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] crosstool/buildroot ldconfig failure in "target-finalize" during build using Fedora 13
  2010-08-06 15:49 [Buildroot] crosstool/buildroot ldconfig failure in "target-finalize" during build using Fedora 13 Darcy Watkins
  2010-08-06 16:08 ` Darcy Watkins
  2010-08-06 17:48 ` Darcy Watkins
@ 2010-08-06 19:53 ` Thomas Petazzoni
  2010-08-08  5:11 ` Baruch Siach
  3 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2010-08-06 19:53 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 6 Aug 2010 08:49:39 -0700
"Darcy Watkins" <DWatkins@tranzeo.com> wrote:

> After upgrading my build machine from Fedora 10 to Fedora 13 it
> appears that the host's "ldconfig" command is no longer usable for
> cross build application.  The build thus fails when it attempts to
> execute /sbin/ldconfig during the "target-finalize" stage.
> 
> When building using the internal toolchain generated by buildroot, I
> do not see an issue.  When using an external toolchain such as
> crosstool-ng it shows up.
> 
> To work around the issue I pulled in the July 26th changeset to the
> Makefile to check for and use a $(TARGET_CROSS)ldconfig and then I
> modified my copy of crosstool (version 1.7.2) so that it would install
> the cross ldconfig along with its cross ldd.  That gets me working
> fine for uclibc builds.
> 
> When I tried a glibc build, there is no cross ldconfig available.
> 
> I also notice that in crosstool 1.8.0 the cross ldd is replaced by a
> script so the cross ldconfig may not even be available (I don't know
> for sure since so far I have only seen the notes in the changelog and
> haven't actually tried crosstool 1.8.0 yet).
> 
> It appears to me that the assumption an external toolchain will
> provide a cross ldconfig is not valid and the assumption that the
> host ldconfig is usable as a cross tool in the absence of this is no
> longer valid.
> 
> Since it is the buildroot "target-finalize" that needs a usable
> ldconfig I figure it is appropriate to raise this matter here for
> discussion first.
> 
> Anyone have suggestions as to how best to approach this?

I never had the opportunity to study in detail this cross-ldconfig
problem, and I also wasn't very convinced by the recent change in
Buildroot regarding this.

In order to make some progress, we'd need to understand :

 * Whether ldconfig and the generated ld.so.cache is a glibc-only
   feature, or whether it also applies to uClibc ;

 * Whether the ld.so.cache generated by ldconfig is
   architecture-independent or not ;

 * What is the difference between the host ldconfig and the
   cross ldconfig, and why the ldconfig of your Fedora 10 was working
   and not the one of your Fedora 13.

Once we have a good understanding of the issue, we'll try to see what's
the best approach to solve it. So if you have any knowledge/pointers
about this, feel free to share them.

Thanks,

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] crosstool/buildroot ldconfig failure in "target-finalize" during build using Fedora 13
  2010-08-06 15:49 [Buildroot] crosstool/buildroot ldconfig failure in "target-finalize" during build using Fedora 13 Darcy Watkins
                   ` (2 preceding siblings ...)
  2010-08-06 19:53 ` Thomas Petazzoni
@ 2010-08-08  5:11 ` Baruch Siach
  2010-08-09 15:38   ` Darcy Watkins
  3 siblings, 1 reply; 6+ messages in thread
From: Baruch Siach @ 2010-08-08  5:11 UTC (permalink / raw)
  To: buildroot

Hi Darcy,

On Fri, Aug 06, 2010 at 08:49:39AM -0700, Darcy Watkins wrote:
> After upgrading my build machine from Fedora 10 to Fedora 13 it appears
> that the host's "ldconfig" command is no longer usable for cross build
> application.  The build thus fails when it attempts to execute
> /sbin/ldconfig during the "target-finalize" stage.
> 
> When building using the internal toolchain generated by buildroot, I do
> not see an issue.  When using an external toolchain such as crosstool-ng
> it shows up.
> 
> To work around the issue I pulled in the July 26th changeset to the
> Makefile to check for and use a $(TARGET_CROSS)ldconfig and then I
> modified my copy of crosstool (version 1.7.2) so that it would install
> the cross ldconfig along with its cross ldd.  That gets me working fine
> for uclibc builds.
> 
> When I tried a glibc build, there is no cross ldconfig available.
> 
> I also notice that in crosstool 1.8.0 the cross ldd is replaced by a
> script so the cross ldconfig may not even be available (I don't know for
> sure since so far I have only seen the notes in the changelog and
> haven't actually tried crosstool 1.8.0 yet).
> 
> It appears to me that the assumption an external toolchain will provide
> a cross ldconfig is not valid and the assumption that the host ldconfig
> is usable as a cross tool in the absence of this is no longer valid.
> 
> Since it is the buildroot "target-finalize" that needs a usable ldconfig
> I figure it is appropriate to raise this matter here for discussion
> first.
> 
> Anyone have suggestions as to how best to approach this?

See http://article.gmane.org/gmane.comp.lib.uclibc.buildroot/23058. I have 
also encountered this problem after upgrading glibc on my Debian machine.

baruch

-- 
                                                     ~. .~   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] 6+ messages in thread

* [Buildroot] crosstool/buildroot ldconfig failure in "target-finalize" during build using Fedora 13
  2010-08-08  5:11 ` Baruch Siach
@ 2010-08-09 15:38   ` Darcy Watkins
  0 siblings, 0 replies; 6+ messages in thread
From: Darcy Watkins @ 2010-08-09 15:38 UTC (permalink / raw)
  To: buildroot

Hi Baruch,

I presently workaround this using a patch like the one on the referenced
archive.  The only problem with this is that it results in the
"ldconfig" directory really being created under /tmp since /var/cache is
a symlink.  Since /tmp is a mount point, the ldconfig (and anything
under it) will be masked away by the tmpfs mount.

So I think we will need to create the dir so we can run the utility, and
then clean it up afterwards (and either suppress generating the
aux-cache, or blow it away afterwards during cleanup).

Thanks for the link.


Regards,

Darcy


-----Original Message-----
From: Baruch Siach [mailto:baruch at tkos.co.il] 
--snip!--

Hi Darcy,

On Fri, Aug 06, 2010 at 08:49:39AM -0700, Darcy Watkins wrote:
> After upgrading my build machine from Fedora 10 to Fedora 13 it
appears
> that the host's "ldconfig" command is no longer usable for cross build
> application.  The build thus fails when it attempts to execute
> /sbin/ldconfig during the "target-finalize" stage.
> 
--snip!--

See http://article.gmane.org/gmane.comp.lib.uclibc.buildroot/23058. I
have 
also encountered this problem after upgrading glibc on my Debian
machine.

baruch

-- 
                                                     ~. .~   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] 6+ messages in thread

end of thread, other threads:[~2010-08-09 15:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-06 15:49 [Buildroot] crosstool/buildroot ldconfig failure in "target-finalize" during build using Fedora 13 Darcy Watkins
2010-08-06 16:08 ` Darcy Watkins
2010-08-06 17:48 ` Darcy Watkins
2010-08-06 19:53 ` Thomas Petazzoni
2010-08-08  5:11 ` Baruch Siach
2010-08-09 15:38   ` Darcy Watkins

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.