Patchwork libtasn: fixed cross build issue

login
register
mail settings
Submitter Enrico Scholz
Date May 30, 2012, 3:17 p.m.
Message ID <1338391023-31189-1-git-send-email-enrico.scholz@sigma-chemnitz.de>
Download mbox | patch
Permalink /patch/28947/
State New
Headers show

Comments

Enrico Scholz - May 30, 2012, 3:17 p.m.
Fixes

| /bin/sh ../libtasn1-2.12-r1/libtasn1-2.12/build-aux/missing --run help2man --info-page libtasn1 \
|       --name="ASN.1 DER encoder" \
|       --output=asn1Coding.1 ../src/asn1Coding
| help2man: can't get `--help' info from ../src/asn1Coding
| Try `--no-discard-stderr' if option outputs to stderr
| make[3]: *** [asn1Coding.1] Error 1

which was caused by touching configure.ac which is a dependency of the
generated man pages.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
---
 meta/recipes-support/gnutls/libtasn1_2.12.bb |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
Richard Purdie - May 30, 2012, 3:44 p.m.
On Wed, 2012-05-30 at 17:17 +0200, Enrico Scholz wrote:
> Fixes
> 
> | /bin/sh ../libtasn1-2.12-r1/libtasn1-2.12/build-aux/missing --run help2man --info-page libtasn1 \
> |       --name="ASN.1 DER encoder" \
> |       --output=asn1Coding.1 ../src/asn1Coding
> | help2man: can't get `--help' info from ../src/asn1Coding
> | Try `--no-discard-stderr' if option outputs to stderr
> | make[3]: *** [asn1Coding.1] Error 1
> 
> which was caused by touching configure.ac which is a dependency of the
> generated man pages.
> 
> Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
> ---
>  meta/recipes-support/gnutls/libtasn1_2.12.bb |   10 +++++++++-
>  1 files changed, 9 insertions(+), 1 deletions(-)

This is just a workaround, I thought we'd found a better way to handle
this.

I think a reproducer for the above is:

"bitbake help2man-native; bitbake libtasn1 -c cleansstate; bitbake libtasn1"

and the real fix will be to reorder PATH so the scripts directory comes
before the native sysroot...

Cheers,

Richard
Enrico Scholz - May 30, 2012, 4:07 p.m.
Richard Purdie <richard.purdie@linuxfoundation.org> writes:

>> | /bin/sh ../libtasn1-2.12-r1/libtasn1-2.12/build-aux/missing --run help2man --info-page libtasn1 \
>> |       --name="ASN.1 DER encoder" \
>> |       --output=asn1Coding.1 ../src/asn1Coding
>> | help2man: can't get `--help' info from ../src/asn1Coding
>> | Try `--no-discard-stderr' if option outputs to stderr
>> | make[3]: *** [asn1Coding.1] Error 1
>> 
>> which was caused by touching configure.ac which is a dependency of the
>> generated man pages.
>> 
>> Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
>> ---
>>  meta/recipes-support/gnutls/libtasn1_2.12.bb |   10 +++++++++-
>>  1 files changed, 9 insertions(+), 1 deletions(-)
>
> This is just a workaround, I thought we'd found a better way to handle
> this.

setting HELP2MAN environment to 'true' for cross-builds might be a
general solution.... But this does not seem to be implemented...


Enrico
Richard Purdie - May 30, 2012, 4:47 p.m.
On Wed, 2012-05-30 at 18:07 +0200, Enrico Scholz wrote:
> Richard Purdie <richard.purdie@linuxfoundation.org> writes:
> 
> >> | /bin/sh ../libtasn1-2.12-r1/libtasn1-2.12/build-aux/missing --run help2man --info-page libtasn1 \
> >> |       --name="ASN.1 DER encoder" \
> >> |       --output=asn1Coding.1 ../src/asn1Coding
> >> | help2man: can't get `--help' info from ../src/asn1Coding
> >> | Try `--no-discard-stderr' if option outputs to stderr
> >> | make[3]: *** [asn1Coding.1] Error 1
> >> 
> >> which was caused by touching configure.ac which is a dependency of the
> >> generated man pages.
> >> 
> >> Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
> >> ---
> >>  meta/recipes-support/gnutls/libtasn1_2.12.bb |   10 +++++++++-
> >>  1 files changed, 9 insertions(+), 1 deletions(-)
> >
> > This is just a workaround, I thought we'd found a better way to handle
> > this.
> 
> setting HELP2MAN environment to 'true' for cross-builds might be a
> general solution.... But this does not seem to be implemented...

Right, I remember looking into this and its hard to disable. I've pushed
a PATH change to address this problem...

Cheers,

Richard
Enrico Scholz - May 30, 2012, 4:54 p.m.
Richard Purdie <richard.purdie@linuxfoundation.org> writes:

>> setting HELP2MAN environment to 'true' for cross-builds might be a
>> general solution.... But this does not seem to be implemented...
>
> Right, I remember looking into this and its hard to disable. I've pushed
> a PATH change to address this problem...

But this makes 'help2man' completely unavailable which might break
man-page generation for -native (where 'help2man' works) or for every
package which requires a working 'help2man' tool.


Enrico
Richard Purdie - May 30, 2012, 5:07 p.m.
On Wed, 2012-05-30 at 18:54 +0200, Enrico Scholz wrote:
> Richard Purdie <richard.purdie@linuxfoundation.org> writes:
> 
> >> setting HELP2MAN environment to 'true' for cross-builds might be a
> >> general solution.... But this does not seem to be implemented...
> >
> > Right, I remember looking into this and its hard to disable. I've pushed
> > a PATH change to address this problem...
> 
> But this makes 'help2man' completely unavailable which might break
> man-page generation for -native (where 'help2man' works) or for every
> package which requires a working 'help2man' tool.

help2man is *totally* useless in any cross situation. We also don't
need/want man-pages for native tools so I can't see a case where this is
a problem...

Cheers,

Richard
Khem Raj - May 30, 2012, 5:09 p.m.
On Wednesday, May 30, 2012, Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
wrote:
> Richard Purdie <richard.purdie@linuxfoundation.org> writes:
>
>>> setting HELP2MAN environment to 'true' for cross-builds might be a
>>> general solution.... But this does not seem to be implemented...
>>
>> Right, I remember looking into this and its hard to disable. I've pushed
>> a PATH change to address this problem...
>
> But this makes 'help2man' completely unavailable which might break
> man-page generation for -native (where 'help2man' works) or for every
> package which requires a working 'help2man' tool.

Can you use class overrides to control that

>
>
> Enrico
>
> _______________________________________________
> 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-support/gnutls/libtasn1_2.12.bb b/meta/recipes-support/gnutls/libtasn1_2.12.bb
index d0b4191..dcc58a2 100644
--- a/meta/recipes-support/gnutls/libtasn1_2.12.bb
+++ b/meta/recipes-support/gnutls/libtasn1_2.12.bb
@@ -8,7 +8,7 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
                     file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
                     file://README;endline=8;md5=c3803a3e8ca5ab5eb1e5912faa405351"
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "${GNU_MIRROR}/libtasn1/libtasn1-${PV}.tar.gz \
            file://libtasn1_fix_for_automake_1.12.patch \
@@ -20,3 +20,11 @@  SRC_URI[sha256sum] = "0e257a8a01c80e464f73262e13c226e04a15165c2ad087a340f5390228
 inherit autotools binconfig lib_package
 
 BBCLASSEXTEND = "native"
+
+do_configure_prepend() {
+    # these autogenerated man pages depend on configure.ac which was
+    # modified by SRC_URI patches. Regenerating them fails because
+    # 'help2man' tries to execute the corresponding, cross-compiled
+    # binary with the '--help' option
+    touch doc/asn1Parser.1 doc/asn1Coding.1 doc/asn1Decoding.1
+}