All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: "Cui, Dexuan" <dexuan.cui@intel.com>
Cc: 'Patches and discussions about the oe-core layer'
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 37/58] gnu-config-native: add dependency on perl-native
Date: Thu, 05 May 2011 23:34:11 +0100	[thread overview]
Message-ID: <1304634851.30391.54.camel@rex> (raw)
In-Reply-To: <1865303E0DED764181A9D882DEF65FB69334F4BD75@shsmsx502.ccr.corp.intel.com>

On Thu, 2011-05-05 at 22:18 +0800, Cui, Dexuan wrote:
> (Sorry for my delay for the task as I was working on other bugs...)
> Recently I have been looking into it and I've made some commits (the
> top 5 small commits) in
> http://git.pokylinux.org/cgit/cgit.cgi/poky-contrib/log/?h=dcui/master_perl-native 
> BTW: the work is not done completely as some recipes don't build
> with the changes. Please have a look anyway to see if I'm in the correct direction.
> 
> However, I've got some difficulties and hope to get your help:
> 1)  As you said, after we install perl-native into its own directory,
> any recipe not depending on perl-native doesn't see
> ${STAGING_BINDIR_NATIVE}/perl-native/perl unnecessarily.
> However, if we keep the current code, what's the bad consequence if
> the recipe not depending on perl-native does see perl of perl-native?
> looks no?

We have an assumption that perl is already on the system we're building
on. Perl is a relatively stable language with defined compatibility and
interoperability. Most recipes are therefore fine using perl from the
build system directly and don't need perl-native. I think we defined a
special name for the build system perl (perl-native-runtime?). Better
names are welcome but we should ensure we use the right dependency in
the right places.

The time to use perl-native instead of perl-native-runtime is where any
perl module is being built, perl itself is being built or anything that
has an explicit dependency on the perl version present.

> 2) In poky, I see many places hardcodedly use the system
> perl(i.e., /usr/bin/perl) explicitly or implicitly(e.g,
> meta/recipes-devtools/gnu-config/gnu-config/gnu-configize.in
> contains /usr/bin/perl; another example,  in perl-5.12.3's source
> code, Cross/generate_config_sh also contains #!/usr/bin/perl). Should
> we fix all of them?

Most of these should be generated locations and I think this is fine
since most of these are "perl-native-runtime" uses and its fine to use
the build system perl.

>    And what's the relationship between the system perl and
> perl-native? Since perl-native is not less functional than the system
> perl, will we eliminate the system perl as a prerequisite to bitbake
> in future?

No, I think you have this backwards. The intent is to have
"perl-native-runtime" denoting a requirement on the build system perl
and "perl-native" being a perl that exactly the same as the target perl
for cross purposes.

> 3) In gnu-config_20080123.bb's do_install, I don't understand this lines: here the "!=" should be "="?
>     if [ "${BUILD_ARCH}" != "${TARGET_ARCH}" ]; then
>         sed -i -e 's,/usr/bin/env,${bindir}/env,g' ${D}${bindir}/gnu-configize
>     fi

This means it only applies for non-native packages. (native has
BUILD_ARCH=TARGET_ARCH). The path to env is ${bindir} and this assists
with things like the nativesdk packages where bindir != "/usr/bin".

> e.g. when building gnu-config-native for MACHINE qemux86 on a 32-bit
> host,  BUILD_ARCH=TARGET_ARCH=i686-linux and the sed isn't invoked;
> when building gnu-config, the sed will be invoked, but bindir is
> just /usr/bin, so the replacement operation actually does nothing.

You can define a system where exec_prefix is "" and bindir is hence
"/bin" when it wouldn't do nothing.

> And for gnu-config-native, I think we need do a 
> sed -i -e 's,/usr/bin/perl,${STAGING_BINDIR_NATIVE}/perl-native/perl,g' ${D}${bindir}/gnu-configize
> Correct?

No, the whole point is to stop it seeing perl-native. Only perl itself
and modules should be using perl-native.

> 4) My last commit of the top 5 commits is a chaos... I'm trying to
> replace every "DEPENDS on perl-native" with "inherit perlnative".
> I'm now stuck in fixing the build issues for libxml-parser-perl and libxml-parser-perl-native.
> I don't know how to fix get_perl_version and perl_get_libdirs in
> cpan-base.bbclass -- for libxml-parser-perl-native, I have to manage
> to add a "/perl-native" into STAGING_LIBDIR and libdir, but for
> libxml-parser-perl, I can't change STAGING_LIBDIR and libdir. Can you
> please help me out?

I'd suggest splitting this into two steps:

a) Check through all perl-native references and correct the ones that 
   should be perl-native-runtime.
b) Replace all remaining perl-native references with the class 
   dependency.

In step a), gnu-config would have a dependency on perl-native-runtime so
wouldn't use the perlnative class.

Just for reference, using perl-native-runtime means that someone can
remove it from ASSUME_PROVIDED and provide a version of it themselves if
they so wish (using perl-native or otherwise).

I suspect you'll still have the libxml-parser-perl problem but lets take
this one step at a time! :)

Cheers,

Richard




  reply	other threads:[~2011-05-05 22:37 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-16  6:53 [PATCH 00/58] Consolidated Updates and Bug Fixes Saul Wold
2011-04-16  6:53 ` [PATCH 01/58] gstreamer: upgrade to vesion 0.10.32 Saul Wold
2011-04-16  6:53 ` [PATCH 02/58] gst-plugins-base: upgrade to version 0.10.32 Saul Wold
2011-04-16  6:53 ` [PATCH 03/58] gst-plugins-good: upgrade to version 0.10.28 Saul Wold
2011-04-16  6:53 ` [PATCH 04/58] gst-plugins-bad: upgrade to version 0.10.21 Saul Wold
2011-04-16  6:53 ` [PATCH 05/58] gst-plugins-ugly: upgrade to version 0.10.17 Saul Wold
2011-04-16  6:53 ` [PATCH 06/58] ofono: upgrade to version 0.45 Saul Wold
2011-04-16  6:53 ` [PATCH 07/58] alsa-lib: upgrade to version 1.0.24.1 Saul Wold
2011-04-16  6:53 ` [PATCH 08/58] telepathy-glib: upgrade to version 0.14.3 Saul Wold
2011-04-16  6:53 ` [PATCH 09/58] telepathy-idle: upgrade to version 0.1.8 Saul Wold
2011-04-16  6:53 ` [PATCH 10/58] telepathy-mission-control: upgrade to version 5.7.9 Saul Wold
2011-04-16  6:53 ` [PATCH 11/58] gssdp: upgrade to version 0.10.0 Saul Wold
2011-04-16  6:53 ` [PATCH 12/58] gupnp: upgrade to version 0.16.0 Saul Wold
2011-04-16  6:53 ` [PATCH 13/58] distro_tracking_fields: update for gstreamer, gupnp, telepathy-glib, etc Saul Wold
2011-04-16  6:53 ` [PATCH 14/58] documentation/adt-manual/adt-eclipse.xml: Fixed link to autotools Saul Wold
2011-04-16  6:53 ` [PATCH 15/58] libsoup-2.4: Upgrade to 2.32.2 (from 2.32.1) Saul Wold
2011-04-16  6:53 ` [PATCH 16/58] x11perf: Upgrade to 1.5.3 (from 1.5.2) Saul Wold
2011-04-16  6:53 ` [PATCH 17/58] libcanberry: Upgrade to 0.28 (from 0.26) Saul Wold
2011-04-16  6:53 ` [PATCH 18/58] xz: Upgrade to 5.0.2 (from 5.0.0) Saul Wold
2011-04-16  6:53 ` [PATCH 19/58] polkit-gnome: Upgrade to 0.101 (from 0.99) Saul Wold
2011-04-16  6:54 ` [PATCH 20/58] oprofileui: upgrade to latest git version Saul Wold
2011-04-16  6:54 ` [PATCH 21/58] libxt: update from 1.0.9 to the latest version 1.1.1 Saul Wold
2011-04-16  6:54 ` [PATCH 22/58] libxi: upgrade from 1.4.0 to the latest version 1.4.2 Saul Wold
2011-04-16  6:54 ` [PATCH 23/58] fixesproto: upgrade from 4.1.2 to the latest version 5.0 Saul Wold
2011-04-16  6:54 ` [PATCH 24/58] xproto: upgrade from 7.0.20 to the latest version 7.0.21 Saul Wold
2011-04-16  6:54 ` [PATCH 25/58] gnome-doc-utils: upgrade from 0.20.4 to the latest version 0.20.5 Saul Wold
2011-04-16  6:54 ` [PATCH 26/58] xextproto: upgrade from 7.1.2 to the latest version 7.2.0 Saul Wold
2011-04-16  6:54 ` [PATCH 27/58] libpciaccess: upgrade from 0.12.0 to the latest version 0.12.1 Saul Wold
2011-04-16  6:54 ` [PATCH 28/58] cronie: upgrade from 1.4.6 to the latest version 1.4.7 Saul Wold
2011-04-16  6:54 ` [PATCH 29/58] preferred-xorg-versions.inc: update libxt, libxi, fixesproto, xproto, xextproto and libpciaccess Saul Wold
2011-04-16  6:54 ` [PATCH 30/58] distro_tracking_fields.inc: update the info for the following recipes Saul Wold
2011-04-16  6:54 ` [PATCH 31/58] xf86-input-synaptics: upgrade from 1.3.0 to 1.4.0 Saul Wold
2011-04-16  6:54 ` [PATCH 32/58] xf86-input-vmmouse: upgrade from 12.6.10 to 12.7.0 Saul Wold
2011-04-16  6:54 ` [PATCH 33/58] evieext: upgrade from 1.1.0 to 1.1.1 Saul Wold
2011-04-16  6:54 ` [PATCH 34/58] xf86-input-keyboard: upgrade from 1.5.0 to 1.6.0 Saul Wold
2011-04-16  6:54 ` [PATCH 35/58] xkbcomp: upgrade from 1.2.0 to 1.2.1 Saul Wold
2011-04-16  6:54 ` [PATCH 36/58] clutter-1.6: fix tarball md5sum and add json-glib to dependencies Saul Wold
2011-04-16  6:54 ` [PATCH 37/58] gnu-config-native: add dependency on perl-native Saul Wold
2011-04-18  4:53   ` Richard Purdie
2011-04-18  5:43     ` Cui, Dexuan
2011-04-18  6:54       ` Richard Purdie
2011-04-18 14:18         ` Cui, Dexuan
2011-05-05 14:18         ` Cui, Dexuan
2011-05-05 22:34           ` Richard Purdie [this message]
2011-05-06  8:52             ` Cui, Dexuan
2011-05-06 11:31               ` Richard Purdie
2011-05-06 12:02                 ` Koen Kooi
2011-05-10 14:02                 ` Cui, Dexuan
2011-05-10 14:10                   ` Richard Purdie
2011-05-10 14:20                     ` Cui, Dexuan
2011-05-11  0:50                       ` Saul Wold
2011-05-11  1:00                         ` Cui, Dexuan
2011-05-06 14:27             ` Tom Rini
2011-05-10 14:09               ` Cui, Dexuan
2011-05-10 14:10                 ` Tom Rini
2011-04-16  6:54 ` [PATCH 38/58] libnewt: fix parallel-make issue Saul Wold
2011-04-16  6:54 ` [PATCH 39/58] libdrm: upgrade from 2.4.23 to 2.4.25 Saul Wold
2011-04-16  6:54 ` [PATCH 40/58] mesa: upgrade to 7.10.2 Saul Wold
2011-04-16  6:55 ` [PATCH 41/58] xf86-input-mouse: upgrade from 1.6 to 1.7 Saul Wold
2011-04-16  6:55 ` [PATCH 42/58] pango: upgrade from 1.28.3 to 1.28.4 Saul Wold
2011-04-16  6:55 ` [PATCH 43/58] qemu: Fix the qemu GL application start failure Saul Wold
2011-04-16  6:55 ` [PATCH 44/58] task-poky-lsb.bb:Add locale resoures which is needed by LSB Test Suite Saul Wold
2011-04-16  6:55 ` [PATCH 45/58] gcc: Add "--enable-clocale=gnu" option for LSB Saul Wold
2011-04-16  6:55 ` [PATCH 46/58] poky-lsb: Add "largefile" feature for LSB distro Saul Wold
2011-04-16  6:55 ` [PATCH 47/58] setuptools: Make options for setup.py more flexible Saul Wold
2011-04-16 12:11   ` Koen Kooi
2011-04-16 19:46     ` Koen Kooi
2011-04-16 21:43       ` Saul Wold
2011-04-17 13:26         ` Gary Thomas
2011-04-17 17:02           ` Koen Kooi
2011-04-16  6:55 ` [PATCH 48/58] libexif: upgrade to 0.6.20 Saul Wold
2011-04-16  6:55 ` [PATCH 49/58] libxml2: upgrade to version 2.7.8 Saul Wold
2011-04-16  6:55 ` [PATCH 50/58] openssl: upgrade to version 0.9.8r Saul Wold
2011-04-16  6:55 ` [PATCH 51/58] rsync: upgrade to version 3.0.8 Saul Wold
2011-04-16  6:55 ` [PATCH 52/58] documentation/adt-manual/adt-prepare.xml: Fixed URL for nightly builds Saul Wold
2011-04-16  6:55 ` [PATCH 53/58] documentation/adt-manual/adt-eclipse.xml: Fixed URL with pokylinux.org Saul Wold
2011-04-16  6:55 ` [PATCH 54/58] documentation/kernel-manual/kernel-how-to.xml: replaced 'pokylinux' with 'yoctoproject' Saul Wold
2011-04-16  6:55 ` [PATCH 55/58] netbase: automatically bring up eth0 Saul Wold
2011-04-16  6:55 ` [PATCH 56/58] netbase: add /etc/network/interfaces file for qemumips & qemuppc Saul Wold
2011-04-16  6:55 ` [PATCH 57/58] slang: Update to 2.2.4 Saul Wold
2011-04-16  6:56 ` [PATCH 58/58] jpeg: add link libjpeg.so.62 for LSB library test Saul Wold
2011-04-18  4:54 ` [PATCH 00/58] Consolidated Updates and Bug Fixes Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1304634851.30391.54.camel@rex \
    --to=richard.purdie@linuxfoundation.org \
    --cc=dexuan.cui@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.