Patchwork jpeg-native: Do not use libtool-cross for native recipe

login
register
mail settings
Submitter Khem Raj
Date Sept. 24, 2012, 11:55 p.m.
Message ID <1348530910-9917-1-git-send-email-raj.khem@gmail.com>
Download mbox | patch
Permalink /patch/37153/
State New
Headers show

Comments

Khem Raj - Sept. 24, 2012, 11:55 p.m.
This fixes errors when building native recipes like below
Additionally fix some space issues.

 /work/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin/x86_64-linux-libtool:
line 981: /work/yocto/poky/build/tmp/sysroots/x86_64-linux//bin/sed: No
such file or directory
| x86_64-linux-libtool: compile: Failed to create `.libs'
| make[1]: *** [jaricom.lo] Error 1
| make[1]: *** Waiting for unfinished jobs....
|
/work/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin/x86_64-linux-libtool:
line 981: /work/yocto/poky/build/tmp/sysroots/x86_64-linux//bin/sed: No
such file or directory
|
/work/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin/x86_64-linux-libtool:
line 981: /work/yocto/poky/build/tmp/sysroots/x86_64-linux//bin/sed: No
such file or directory
| x86_64-linux-libtool: compile: Failed to create `.libs'
| x86_64-linux-libtool: compile: Failed to create `.libs'

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-core/jpeg/jpeg_8d.bb |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
Richard Purdie - Sept. 25, 2012, 8:14 a.m.
On Mon, 2012-09-24 at 16:55 -0700, Khem Raj wrote:
> This fixes errors when building native recipes like below
> Additionally fix some space issues.
> 
>  /work/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin/x86_64-linux-libtool:
> line 981: /work/yocto/poky/build/tmp/sysroots/x86_64-linux//bin/sed: No
> such file or directory
> | x86_64-linux-libtool: compile: Failed to create `.libs'
> | make[1]: *** [jaricom.lo] Error 1
> | make[1]: *** Waiting for unfinished jobs....
> |
> /work/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin/x86_64-linux-libtool:
> line 981: /work/yocto/poky/build/tmp/sysroots/x86_64-linux//bin/sed: No
> such file or directory
> |
> /work/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin/x86_64-linux-libtool:
> line 981: /work/yocto/poky/build/tmp/sysroots/x86_64-linux//bin/sed: No
> such file or directory
> | x86_64-linux-libtool: compile: Failed to create `.libs'
> | x86_64-linux-libtool: compile: Failed to create `.libs'

This wallpapers over cracks. Why is libtool-native/libtool-cross broken?
Shouldn't we fix whatever is breaking libtool?

Cheers,

Richard
Khem Raj - Sept. 25, 2012, 1:27 p.m.
On Tue, Sep 25, 2012 at 1:14 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> This wallpapers over cracks. Why is libtool-native/libtool-cross broken?
> Shouldn't we fix whatever is breaking libtool?
>

it is not broken. But we were ending up using cross-libtool for native
recipe that does not seem right.
Richard Purdie - Sept. 26, 2012, 1:59 p.m.
On Tue, 2012-09-25 at 06:27 -0700, Khem Raj wrote:
> On Tue, Sep 25, 2012 at 1:14 AM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > This wallpapers over cracks. Why is libtool-native/libtool-cross broken?
> > Shouldn't we fix whatever is breaking libtool?
> >
> 
> it is not broken. But we were ending up using cross-libtool for native
> recipe that does not seem right.

Looking at your original error message, it says:

 /work/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin/x86_64-linux-libtool

which is libtool-native. I appreciate that the OEMAKE line to use the
cross version is wrong but it looks like it still manages to find the
native libtool and that it isn't working.

Cheers,

Richard
Khem Raj - Sept. 27, 2012, 2:14 p.m.
On Wed, Sep 26, 2012 at 6:59 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Tue, 2012-09-25 at 06:27 -0700, Khem Raj wrote:
>> On Tue, Sep 25, 2012 at 1:14 AM, Richard Purdie
>> <richard.purdie@linuxfoundation.org> wrote:
>> > This wallpapers over cracks. Why is libtool-native/libtool-cross broken?
>> > Shouldn't we fix whatever is breaking libtool?
>> >
>>
>> it is not broken. But we were ending up using cross-libtool for native
>> recipe that does not seem right.
>
> Looking at your original error message, it says:
>
>  /work/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin/x86_64-linux-libtool
>
> which is libtool-native. I appreciate that the OEMAKE line to use the
> cross version is wrong but it looks like it still manages to find the
> native libtool and that it isn't working.

hmmm I tried and it worked fine when libtool-cross was staged. I guess
my problem was
that it was trying to find native sed in native sysroot. I cant
reproduce it. But I guess
the patch still makes sense. I can send it with commit message changed
if you are ok with that

>
> Cheers,
>
> Richard
>
>
Richard Purdie - Sept. 27, 2012, 3:16 p.m.
On Thu, 2012-09-27 at 07:14 -0700, Khem Raj wrote:
> On Wed, Sep 26, 2012 at 6:59 AM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > On Tue, 2012-09-25 at 06:27 -0700, Khem Raj wrote:
> >> On Tue, Sep 25, 2012 at 1:14 AM, Richard Purdie
> >> <richard.purdie@linuxfoundation.org> wrote:
> >> > This wallpapers over cracks. Why is libtool-native/libtool-cross broken?
> >> > Shouldn't we fix whatever is breaking libtool?
> >> >
> >>
> >> it is not broken. But we were ending up using cross-libtool for native
> >> recipe that does not seem right.
> >
> > Looking at your original error message, it says:
> >
> >  /work/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin/x86_64-linux-libtool
> >
> > which is libtool-native. I appreciate that the OEMAKE line to use the
> > cross version is wrong but it looks like it still manages to find the
> > native libtool and that it isn't working.
> 
> hmmm I tried and it worked fine when libtool-cross was staged. I guess
> my problem was
> that it was trying to find native sed in native sysroot. I cant
> reproduce it. But I guess
> the patch still makes sense. I can send it with commit message changed
> if you are ok with that

I'm not really. I'd like to understand what the problem is we're fixing
before I take patches. We don't understand what is wrong here.

Cheers,

Richard
Khem Raj - Sept. 27, 2012, 3:44 p.m.
On Thu, Sep 27, 2012 at 8:16 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Thu, 2012-09-27 at 07:14 -0700, Khem Raj wrote:
>> On Wed, Sep 26, 2012 at 6:59 AM, Richard Purdie
>> <richard.purdie@linuxfoundation.org> wrote:
>> > On Tue, 2012-09-25 at 06:27 -0700, Khem Raj wrote:
>> >> On Tue, Sep 25, 2012 at 1:14 AM, Richard Purdie
>> >> <richard.purdie@linuxfoundation.org> wrote:
>> >> > This wallpapers over cracks. Why is libtool-native/libtool-cross broken?
>> >> > Shouldn't we fix whatever is breaking libtool?
>> >> >
>> >>
>> >> it is not broken. But we were ending up using cross-libtool for native
>> >> recipe that does not seem right.
>> >
>> > Looking at your original error message, it says:
>> >
>> >  /work/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin/x86_64-linux-libtool
>> >
>> > which is libtool-native. I appreciate that the OEMAKE line to use the
>> > cross version is wrong but it looks like it still manages to find the
>> > native libtool and that it isn't working.
>>
>> hmmm I tried and it worked fine when libtool-cross was staged. I guess
>> my problem was
>> that it was trying to find native sed in native sysroot. I cant
>> reproduce it. But I guess
>> the patch still makes sense. I can send it with commit message changed
>> if you are ok with that
>
> I'm not really. I'd like to understand what the problem is we're fixing
> before I take patches. We don't understand what is wrong here.
>


yes it seems something else is going on since for native recipes
STAGING_BINDIR_CROSS=${STAGING_BINDIR_NATIVE}
which means it ends up sourcing the native libtool for jpeg-native

When I did bitbake jpeg-native from scratch it worked fine too.

It appeared on a build server so it could have some weird race condition show
up. I will keep an eye if it happens again then I would like to
understand and hopefully reproduce.

Let me withdraw this patch.

> Cheers,
>
> Richard
>

Patch

diff --git a/meta/recipes-core/jpeg/jpeg_8d.bb b/meta/recipes-core/jpeg/jpeg_8d.bb
index 6781619..1f6366b 100644
--- a/meta/recipes-core/jpeg/jpeg_8d.bb
+++ b/meta/recipes-core/jpeg/jpeg_8d.bb
@@ -11,7 +11,7 @@  SECTION = "libs"
 DEPENDS = "libtool-cross"
 DEPENDS_virtclass-native = "libtool-native"
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "http://www.ijg.org/files/jpegsrc.v${PV}.tar.gz \
 	   file://debian-libjpeg7_7-1.diff \
@@ -22,8 +22,10 @@  SRC_URI[sha256sum] = "00029b1473f0f0ea72fbca3230e8cb25797fbb27e58ae2e46bb8bf5a80
 
 inherit autotools 
 
-EXTRA_OECONF="--enable-static --enable-shared"
-EXTRA_OEMAKE='"LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"'
+EXTRA_OECONF = "--enable-static --enable-shared"
+EXTRA_OEMAKE = '"LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"'
+
+EXTRA_OEMAKE_class-native = ""
 
 CFLAGS_append = " -D_REENTRANT"