Patchwork [2/2] distcc_2.18.3.bb: Fix compilation on uclibc

login
register
mail settings
Submitter Khem Raj
Date May 20, 2011, 11:19 p.m.
Message ID <63425ea09b30c9cca10c25bc559ed6f22022c4b6.1305933509.git.raj.khem@gmail.com>
Download mbox | patch
Permalink /patch/4563/
State New, archived
Headers show

Comments

Khem Raj - May 20, 2011, 11:19 p.m.
We enable gtk/gnome in distcc that code uses loadavg()
a function unimplemented in uclibc. Therefore for uclibc
we disable gnome and gtk+ features in distcc

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/distcc/distcc_2.18.3.bb |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)
Richard Purdie - May 20, 2011, 11:31 p.m.
On Fri, 2011-05-20 at 16:19 -0700, Khem Raj wrote:
> We enable gtk/gnome in distcc that code uses loadavg()
> a function unimplemented in uclibc. Therefore for uclibc
> we disable gnome and gtk+ features in distcc
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta/recipes-devtools/distcc/distcc_2.18.3.bb |   17 ++++++++++++-----
>  1 files changed, 12 insertions(+), 5 deletions(-)
> 
> diff --git a/meta/recipes-devtools/distcc/distcc_2.18.3.bb b/meta/recipes-devtools/distcc/distcc_2.18.3.bb
> index 1f5c2af..a15858c 100644
> --- a/meta/recipes-devtools/distcc/distcc_2.18.3.bb
> +++ b/meta/recipes-devtools/distcc/distcc_2.18.3.bb
> @@ -6,7 +6,10 @@ LICENSE = "GPLv2"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
>  PR = "r6"
>  
> -DEPENDS = "avahi gtk+"
> +DEPENDS = "avahi ${GTKDEP}"
> +GTKDEP-libc-uclibc = ""
> +GTKDEP = "gtk+"

return -ENOTTESTED;

;-)

Cheers,

Richard
Khem Raj - May 21, 2011, 12:43 a.m.
On (21/05/11 00:31), Richard Purdie wrote:
> On Fri, 2011-05-20 at 16:19 -0700, Khem Raj wrote:
> > We enable gtk/gnome in distcc that code uses loadavg()
> > a function unimplemented in uclibc. Therefore for uclibc
> > we disable gnome and gtk+ features in distcc
> > 
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > ---
> >  meta/recipes-devtools/distcc/distcc_2.18.3.bb |   17 ++++++++++++-----
> >  1 files changed, 12 insertions(+), 5 deletions(-)
> > 
> > diff --git a/meta/recipes-devtools/distcc/distcc_2.18.3.bb b/meta/recipes-devtools/distcc/distcc_2.18.3.bb
> > index 1f5c2af..a15858c 100644
> > --- a/meta/recipes-devtools/distcc/distcc_2.18.3.bb
> > +++ b/meta/recipes-devtools/distcc/distcc_2.18.3.bb
> > @@ -6,7 +6,10 @@ LICENSE = "GPLv2"
> >  LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
> >  PR = "r6"
> >  
> > -DEPENDS = "avahi gtk+"
> > +DEPENDS = "avahi ${GTKDEP}"
> > +GTKDEP-libc-uclibc = ""
> > +GTKDEP = "gtk+"
> 
> return -ENOTTESTED;

heh, I did infact rebuild on uclibc and eglibc but I should have removed dependencies just rebuilding
after bitbake -c cleanall is not enough
> 
> ;-)
> 
> Cheers,
> 
> Richard
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Khem Raj - May 21, 2011, 12:48 a.m.
On (21/05/11 00:31), Richard Purdie wrote:
> On Fri, 2011-05-20 at 16:19 -0700, Khem Raj wrote:
> > We enable gtk/gnome in distcc that code uses loadavg()
> > a function unimplemented in uclibc. Therefore for uclibc
> > we disable gnome and gtk+ features in distcc
> > 
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > ---
> >  meta/recipes-devtools/distcc/distcc_2.18.3.bb |   17 ++++++++++++-----
> >  1 files changed, 12 insertions(+), 5 deletions(-)
> > 
> > diff --git a/meta/recipes-devtools/distcc/distcc_2.18.3.bb b/meta/recipes-devtools/distcc/distcc_2.18.3.bb
> > index 1f5c2af..a15858c 100644
> > --- a/meta/recipes-devtools/distcc/distcc_2.18.3.bb
> > +++ b/meta/recipes-devtools/distcc/distcc_2.18.3.bb
> > @@ -6,7 +6,10 @@ LICENSE = "GPLv2"
> >  LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
> >  PR = "r6"
> >  
> > -DEPENDS = "avahi gtk+"
> > +DEPENDS = "avahi ${GTKDEP}"
> > +GTKDEP-libc-uclibc = ""
> > +GTKDEP = "gtk+"
> 
> return -ENOTTESTED;

OK I have refreshed it with typo fix in the pull request

> 
> ;-)
> 
> Cheers,
> 
> Richard
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Koen Kooi - May 21, 2011, 6:23 a.m.
Op 21 mei 2011, om 01:19 heeft Khem Raj het volgende geschreven:
> 
> do_install_append() {
>     install -d ${D}${sysconfdir}/init.d/
>     install -d ${D}${sysconfdir}/default
>     install -m 0755 ${WORKDIR}/distcc ${D}${sysconfdir}/init.d/
>     install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/distcc
> +    ${DESKTOPINSTALL}
> +}
> +DESKTOPINSTALL = ""
> +DESKTOPINSTALL_libc-glibc () {
> +    install -d ${D}${datadir}/distcc/
>     install -m 0644 ${WORKDIR}/distccmon-gnome.desktop ${D}${datadir}/distcc/
> }
> -
> -PACKAGES += "distcc-distmon-gnome"
> +PACKAGES_append_libc-glibc = " distcc-distmon-gnome"

Are these parts really needed?
Phil Blundell - May 21, 2011, 6:34 a.m.
On Fri, 2011-05-20 at 16:19 -0700, Khem Raj wrote:
> -DEPENDS = "avahi gtk+"
> +DEPENDS = "avahi ${GTKDEP}"
> +GTKDEP-libc-uclibc = ""
> +GTKDEP = "gtk+"

Does that really work?  Surely it should be "GTKDEP_libc-uclibc".

> -EXTRA_OECONF = " --with-gtk "
> -
> +EXTRA_OECONF_libc-glibc = " --with-gtk "
> +EXTRA_OECONF_libc-uclibc = " --without-gtk --without-gnome "

Can you make this use the same logic as above?

> +DESKTOPINSTALL = ""
> +DESKTOPINSTALL_libc-glibc () {
> +    install -d ${D}${datadir}/distcc/
>      install -m 0644 ${WORKDIR}/distccmon-gnome.desktop ${D}${datadir}/distcc/
>  }

Likewise, or find some way to eliminate it entirely.

> -
> -PACKAGES += "distcc-distmon-gnome"
> +PACKAGES_append_libc-glibc = " distcc-distmon-gnome"

Is that needed?

p.
Khem Raj - May 21, 2011, 7:19 a.m.
-Khem

On May 20, 2011, at 11:34 PM, Phil Blundell <pb@pbcl.net> wrote:

> On Fri, 2011-05-20 at 16:19 -0700, Khem Raj wrote:
>> -DEPENDS = "avahi gtk+"
>> +DEPENDS = "avahi ${GTKDEP}"
>> +GTKDEP-libc-uclibc = ""
>> +GTKDEP = "gtk+"
> 
> Does that really work?  Surely it should be "GTKDEP_libc-uclibc".
> 

No it does not RP pointed it out earlier and I have since fixed it

>> -EXTRA_OECONF = " --with-gtk "
>> -
>> +EXTRA_OECONF_libc-glibc = " --with-gtk "
>> +EXTRA_OECONF_libc-uclibc = " --without-gtk --without-gnome "
> 
> Can you make this use the same logic as above?
> 

Is there a problem with this logic ?

>> +DESKTOPINSTALL = ""
>> +DESKTOPINSTALL_libc-glibc () {
>> +    install -d ${D}${datadir}/distcc/
>>     install -m 0644 ${WORKDIR}/distccmon-gnome.desktop ${D}${datadir}/distcc/
>> }
> 
> Likewise, or find some way to eliminate it entirely.
> 
>> -
>> -PACKAGES += "distcc-distmon-gnome"
>> +PACKAGES_append_libc-glibc = " distcc-distmon-gnome"
> 
> Is that needed?
> 

May be not it will just be empty in uclibc case
> p.
> 
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Phil Blundell - May 21, 2011, 7:45 a.m.
On Sat, 2011-05-21 at 00:19 -0700, Khem Raj wrote:
> >> -EXTRA_OECONF = " --with-gtk "
> >> -
> >> +EXTRA_OECONF_libc-glibc = " --with-gtk "
> >> +EXTRA_OECONF_libc-uclibc = " --without-gtk --without-gnome "
> > 
> > Can you make this use the same logic as above?
> > 
> 
> Is there a problem with this logic ?

Not functionally but, if the DEPENDS are expressed in terms of a default
and then an override for uclibc, it seems like it would be natural for
the corresponding EXTRA_OECONF to be written the same way.

p.
Koen Kooi - May 21, 2011, 7:17 p.m.
Op 21 mei 2011, om 09:19 heeft Khem Raj het volgende geschreven:

> 
> 
> -Khem
> 
> On May 20, 2011, at 11:34 PM, Phil Blundell <pb@pbcl.net> wrote:
> 
>> On Fri, 2011-05-20 at 16:19 -0700, Khem Raj wrote:
>>> -DEPENDS = "avahi gtk+"
>>> +DEPENDS = "avahi ${GTKDEP}"
>>> +GTKDEP-libc-uclibc = ""
>>> +GTKDEP = "gtk+"
>> 
>> Does that really work?  Surely it should be "GTKDEP_libc-uclibc".
>> 
> 
> No it does not RP pointed it out earlier and I have since fixed it
> 
>>> -EXTRA_OECONF = " --with-gtk "
>>> -
>>> +EXTRA_OECONF_libc-glibc = " --with-gtk "
>>> +EXTRA_OECONF_libc-uclibc = " --without-gtk --without-gnome "
>> 
>> Can you make this use the same logic as above?
>> 
> 
> Is there a problem with this logic ?
> 
>>> +DESKTOPINSTALL = ""
>>> +DESKTOPINSTALL_libc-glibc () {
>>> +    install -d ${D}${datadir}/distcc/
>>>   install -m 0644 ${WORKDIR}/distccmon-gnome.desktop ${D}${datadir}/distcc/
>>> }
>> 
>> Likewise, or find some way to eliminate it entirely.
>> 
>>> -
>>> -PACKAGES += "distcc-distmon-gnome"
>>> +PACKAGES_append_libc-glibc = " distcc-distmon-gnome"
>> 
>> Is that needed?
>> 
> 
> May be not it will just be empty in uclibc case

since ALLOW_EMPTY is not set, this change is unneeded.
Khem Raj - May 21, 2011, 11:03 p.m.
On Sat, May 21, 2011 at 12:17 PM, Koen Kooi <koen@dominion.thruhere.net> wrote:
>
> Op 21 mei 2011, om 09:19 heeft Khem Raj het volgende geschreven:
>
>>
>>
>> -Khem
>>
>> On May 20, 2011, at 11:34 PM, Phil Blundell <pb@pbcl.net> wrote:
>>
>>> On Fri, 2011-05-20 at 16:19 -0700, Khem Raj wrote:
>>>> -DEPENDS = "avahi gtk+"
>>>> +DEPENDS = "avahi ${GTKDEP}"
>>>> +GTKDEP-libc-uclibc = ""
>>>> +GTKDEP = "gtk+"
>>>
>>> Does that really work?  Surely it should be "GTKDEP_libc-uclibc".
>>>
>>
>> No it does not RP pointed it out earlier and I have since fixed it
>>
>>>> -EXTRA_OECONF = " --with-gtk "
>>>> -
>>>> +EXTRA_OECONF_libc-glibc = " --with-gtk "
>>>> +EXTRA_OECONF_libc-uclibc = " --without-gtk --without-gnome "
>>>
>>> Can you make this use the same logic as above?
>>>
>>
>> Is there a problem with this logic ?
>>
>>>> +DESKTOPINSTALL = ""
>>>> +DESKTOPINSTALL_libc-glibc () {
>>>> +    install -d ${D}${datadir}/distcc/
>>>>   install -m 0644 ${WORKDIR}/distccmon-gnome.desktop ${D}${datadir}/distcc/
>>>> }
>>>
>>> Likewise, or find some way to eliminate it entirely.
>>>
>>>> -
>>>> -PACKAGES += "distcc-distmon-gnome"
>>>> +PACKAGES_append_libc-glibc = " distcc-distmon-gnome"
>>>
>>> Is that needed?
>>>
>>
>> May be not it will just be empty in uclibc case
>
> since ALLOW_EMPTY is not set, this change is unneeded.

I have include these comments in the new version pushed to pull
branch. Hopefully this time its ok.


> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>

Patch

diff --git a/meta/recipes-devtools/distcc/distcc_2.18.3.bb b/meta/recipes-devtools/distcc/distcc_2.18.3.bb
index 1f5c2af..a15858c 100644
--- a/meta/recipes-devtools/distcc/distcc_2.18.3.bb
+++ b/meta/recipes-devtools/distcc/distcc_2.18.3.bb
@@ -6,7 +6,10 @@  LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
 PR = "r6"
 
-DEPENDS = "avahi gtk+"
+DEPENDS = "avahi ${GTKDEP}"
+GTKDEP-libc-uclibc = ""
+GTKDEP = "gtk+"
+
 RRECOMMENDS_${PN} = "avahi-daemon"
 
 # Upstream change this patch periodically so store locally
@@ -24,17 +27,21 @@  inherit autotools pkgconfig update-rc.d
 
 INITSCRIPT_NAME = "distcc"
 
-EXTRA_OECONF = " --with-gtk "
-
+EXTRA_OECONF_libc-glibc = " --with-gtk "
+EXTRA_OECONF_libc-uclibc = " --without-gtk --without-gnome "
 do_install_append() {
     install -d ${D}${sysconfdir}/init.d/
     install -d ${D}${sysconfdir}/default
     install -m 0755 ${WORKDIR}/distcc ${D}${sysconfdir}/init.d/
     install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/distcc
+    ${DESKTOPINSTALL}
+}
+DESKTOPINSTALL = ""
+DESKTOPINSTALL_libc-glibc () {
+    install -d ${D}${datadir}/distcc/
     install -m 0644 ${WORKDIR}/distccmon-gnome.desktop ${D}${datadir}/distcc/
 }
-
-PACKAGES += "distcc-distmon-gnome"
+PACKAGES_append_libc-glibc = " distcc-distmon-gnome"
 
 FILES_${PN} = " ${sysconfdir} \
 		${bindir}/distcc \