All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [RFC][PATCH] autotools: don't specify --target when configuring gmp
@ 2010-10-13 16:42 Ben Gardiner
  2010-10-13 19:50 ` Chris Larson
  0 siblings, 1 reply; 9+ messages in thread
From: Ben Gardiner @ 2010-10-13 16:42 UTC (permalink / raw)
  To: openembedded-devel

When trying to build angstrom-2008.1 from
f58a5d59b755bdb725497f574a8059529c134c27 of master or from
b78fc95424b5f0fb28246e8c61bb8b4d6a9d733a of stable/2009 the builds failed on
gmp-native (then later gmp). The error was that "--target is not appropriate
for GMP".

This patch adds an exception to the packages for which --target will be passed
to configure. The do_configure stage of the autotools class is modified to not
pass --target if the package is "gmp" or "gmp-native".

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>

---

A similar change was needed also for the stable/2009 branch -- but this patch
is not applicable to that branch as-is.

Checking the PN for a blacklist of names seems very ugly -- I am open to
suggestions on how this might be better accomplished. Also, I think that the
supressing --target may be applicable to anything that is not a cross-development
tool in general [1]; this is the minimum to get a build without errors so far.

[1] http://sourceware.org/autobook/autobook/autobook_259.html#SEC259
---
 classes/autotools.bbclass |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass
index b2de2b1..d9c1d70 100644
--- a/classes/autotools.bbclass
+++ b/classes/autotools.bbclass
@@ -61,7 +61,6 @@ def autotools_set_crosscompiling(d):
 
 CONFIGUREOPTS = " --build=${BUILD_SYS} \
 		  --host=${HOST_SYS} \
-		  --target=${TARGET_SYS} \
 		  --prefix=${prefix} \
 		  --exec_prefix=${exec_prefix} \
 		  --bindir=${bindir} \
@@ -79,7 +78,11 @@ CONFIGUREOPTS = " --build=${BUILD_SYS} \
 
 oe_runconf () {
 	if [ -x ${S}/configure ] ; then
-		${S}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@"
+		if [ "${PN}" != "gmp" ] && [ "${PN}" != "gmp-native" ]; then
+			CONFIGURETARGETOPTS="--target=${TARGET_SYS}"
+		fi
+
+		${S}/configure ${CONFIGURETARGETOPTS} ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@"
 	else
 		oefatal "no configure script found"
 	fi
-- 
1.7.0.4




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

* Re: [PATCH] [RFC][PATCH] autotools: don't specify --target when configuring gmp
  2010-10-13 16:42 [PATCH] [RFC][PATCH] autotools: don't specify --target when configuring gmp Ben Gardiner
@ 2010-10-13 19:50 ` Chris Larson
  2010-10-13 21:06   ` [RFC, PATCH] gmp: assign --target to --host to avoid configure error Ben Gardiner
  2010-10-14 14:24   ` [RFC, PATCH, resend] " Ben Gardiner
  0 siblings, 2 replies; 9+ messages in thread
From: Chris Larson @ 2010-10-13 19:50 UTC (permalink / raw)
  To: openembedded-devel

On Wed, Oct 13, 2010 at 9:42 AM, Ben Gardiner <bengardiner@nanometrics.ca>wrote:

> When trying to build angstrom-2008.1 from
> f58a5d59b755bdb725497f574a8059529c134c27 of master or from
> b78fc95424b5f0fb28246e8c61bb8b4d6a9d733a of stable/2009 the builds failed
> on
> gmp-native (then later gmp). The error was that "--target is not
> appropriate
> for GMP".
>

Why not fix gmp instead?  This patch is a terrible hack, and clutters up the
class.  NACK.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics


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

* [RFC, PATCH] gmp: assign --target to --host to avoid configure error
  2010-10-13 19:50 ` Chris Larson
@ 2010-10-13 21:06   ` Ben Gardiner
  2010-10-14 14:24   ` [RFC, PATCH, resend] " Ben Gardiner
  1 sibling, 0 replies; 9+ messages in thread
From: Ben Gardiner @ 2010-10-13 21:06 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Christopher Larson

When trying to build angstrom-2008.1 from
f58a5d59b755bdb725497f574a8059529c134c27 of master or from
b78fc95424b5f0fb28246e8c61bb8b4d6a9d733a of stable/2009 the builds failed on
gmp-native (then later gmp). The error was that "--target is not appropriate
for GMP".

To avoid the error printed by the following code snippet from configure.in:

configure.in:
=============
if test -n "$target_alias" && test "$target_alias" != "$host_alias"; then
  AC_MSG_ERROR([--target is not appropriate for GMP
Use --build=CPU-VENDOR-OS if you need to specify your CPU and/or system
explicitly.  Use --host if cross-compiling (see "Installing GMP" in the
manual for more on this).])
fi
============

this patch assigns the value of the '--target' argument to the value of the
'--host' argument.

Tested by 'bitbake gmp' and 'bitbake gmp-native'

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
CC: Christopher Larson <clarson@kergoth.com>

---

This patch will change the argument passed in --target for all versions of
gmp. Would it be better to restrict the change to newer versions only?

---
 recipes/gmp/gmp.inc |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/recipes/gmp/gmp.inc b/recipes/gmp/gmp.inc
index 522189d..8ffeb91 100644
--- a/recipes/gmp/gmp.inc
+++ b/recipes/gmp/gmp.inc
@@ -8,6 +8,8 @@ SRC_URI = "${GNU_MIRROR}/gmp/gmp-${PV}.tar.bz2;name=gmp \
 	   file://configure.patch \
 	   file://amd64.patch"
 
+TARGET_SYS = "${HOST_SYS}"
+
 inherit autotools 
 
 ARM_INSTRUCTION_SET = "arm"
-- 
1.7.0.4




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

* [RFC, PATCH, resend] gmp: assign --target to --host to avoid configure error
  2010-10-13 19:50 ` Chris Larson
  2010-10-13 21:06   ` [RFC, PATCH] gmp: assign --target to --host to avoid configure error Ben Gardiner
@ 2010-10-14 14:24   ` Ben Gardiner
  2010-10-15 15:00     ` Paul Menzel
  1 sibling, 1 reply; 9+ messages in thread
From: Ben Gardiner @ 2010-10-14 14:24 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Christopher Larson

When trying to build angstrom-2008.1 from
f58a5d59b755bdb725497f574a8059529c134c27 of master or from
b78fc95424b5f0fb28246e8c61bb8b4d6a9d733a of stable/2009 the builds failed on
gmp-native (then later gmp). The error was that "--target is not appropriate
for GMP".

To avoid the error printed by the following code snippet from configure.in:

configure.in:
"
if test -n "$target_alias" && test "$target_alias" != "$host_alias"; then
  AC_MSG_ERROR([--target is not appropriate for GMP
Use --build=CPU-VENDOR-OS if you need to specify your CPU and/or system
explicitly.  Use --host if cross-compiling (see "Installing GMP" in the
manual for more on this).])
fi
"

this patch assigns the value of the '--target' argument to the value of the
'--host' argument.

Tested by 'bitbake gmp' and 'bitbake gmp-native'

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
CC: Christopher Larson <clarson@kergoth.com>

---

This patch will change the argument passed in --target for all versions of
gmp. Would it be better to restrict the change to newer versions only?

I resent this patch to the list since I did not see it show up in the
patchwork system 17hrs later.

---
 recipes/gmp/gmp.inc |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/recipes/gmp/gmp.inc b/recipes/gmp/gmp.inc
index 522189d..8ffeb91 100644
--- a/recipes/gmp/gmp.inc
+++ b/recipes/gmp/gmp.inc
@@ -8,6 +8,8 @@ SRC_URI = "${GNU_MIRROR}/gmp/gmp-${PV}.tar.bz2;name=gmp \
 	   file://configure.patch \
 	   file://amd64.patch"
 
+TARGET_SYS = "${HOST_SYS}"
+
 inherit autotools 
 
 ARM_INSTRUCTION_SET = "arm"
-- 
1.7.0.4




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

* Re: [RFC, PATCH, resend] gmp: assign --target to --host to avoid configure error
  2010-10-14 14:24   ` [RFC, PATCH, resend] " Ben Gardiner
@ 2010-10-15 15:00     ` Paul Menzel
  2010-10-16  9:16       ` Paul Menzel
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Menzel @ 2010-10-15 15:00 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 1168 bytes --]

Am Donnerstag, den 14.10.2010, 10:24 -0400 schrieb Ben Gardiner:
> When trying to build angstrom-2008.1 from
> f58a5d59b755bdb725497f574a8059529c134c27 of master or from
> b78fc95424b5f0fb28246e8c61bb8b4d6a9d733a of stable/2009 the builds failed on
> gmp-native (then later gmp). The error was that "--target is not appropriate
> for GMP".
> 
> To avoid the error printed by the following code snippet from configure.in:
> 
> configure.in:
> "
> if test -n "$target_alias" && test "$target_alias" != "$host_alias"; then
>   AC_MSG_ERROR([--target is not appropriate for GMP
> Use --build=CPU-VENDOR-OS if you need to specify your CPU and/or system
> explicitly.  Use --host if cross-compiling (see "Installing GMP" in the
> manual for more on this).])
> fi
> "
> 
> this patch assigns the value of the '--target' argument to the value of the
> '--host' argument.
> 
> Tested by 'bitbake gmp' and 'bitbake gmp-native'

I tried to build `gmp-native` without your patch and it worked for me
with `minimal` (eglibc) for `MACHINE = "beagleboard"`. Is there a
difference how things are handled between distributions?

[…]


Thanks,

Paul

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

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

* Re: [RFC, PATCH, resend] gmp: assign --target to --host to avoid configure error
  2010-10-15 15:00     ` Paul Menzel
@ 2010-10-16  9:16       ` Paul Menzel
  2010-10-16 10:41         ` Paul Menzel
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Menzel @ 2010-10-16  9:16 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 1344 bytes --]

Am Freitag, den 15.10.2010, 17:00 +0200 schrieb Paul Menzel:
> Am Donnerstag, den 14.10.2010, 10:24 -0400 schrieb Ben Gardiner:
> > When trying to build angstrom-2008.1 from
> > f58a5d59b755bdb725497f574a8059529c134c27 of master or from
> > b78fc95424b5f0fb28246e8c61bb8b4d6a9d733a of stable/2009 the builds failed on
> > gmp-native (then later gmp). The error was that "--target is not appropriate
> > for GMP".
> > 
> > To avoid the error printed by the following code snippet from configure.in:
> > 
> > configure.in:
> > "
> > if test -n "$target_alias" && test "$target_alias" != "$host_alias"; then
> >   AC_MSG_ERROR([--target is not appropriate for GMP
> > Use --build=CPU-VENDOR-OS if you need to specify your CPU and/or system
> > explicitly.  Use --host if cross-compiling (see "Installing GMP" in the
> > manual for more on this).])
> > fi
> > "
> > 
> > this patch assigns the value of the '--target' argument to the value of the
> > '--host' argument.
> > 
> > Tested by 'bitbake gmp' and 'bitbake gmp-native'
> 
> I tried to build `gmp-native` without your patch and it worked for me
> with `minimal` (eglibc) for `MACHINE = "beagleboard"`. Is there a
> difference how things are handled between distributions?

It also built without problems with `angstrom-2010.x`.

> […]


Thanks,

Paul

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

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

* Re: [RFC, PATCH, resend] gmp: assign --target to --host to avoid configure error
  2010-10-16  9:16       ` Paul Menzel
@ 2010-10-16 10:41         ` Paul Menzel
  2010-10-18 12:33           ` Ben Gardiner
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Menzel @ 2010-10-16 10:41 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 1525 bytes --]

Am Samstag, den 16.10.2010, 11:16 +0200 schrieb Paul Menzel:
> Am Freitag, den 15.10.2010, 17:00 +0200 schrieb Paul Menzel:
> > Am Donnerstag, den 14.10.2010, 10:24 -0400 schrieb Ben Gardiner:
> > > When trying to build angstrom-2008.1 from
> > > f58a5d59b755bdb725497f574a8059529c134c27 of master or from
> > > b78fc95424b5f0fb28246e8c61bb8b4d6a9d733a of stable/2009 the builds failed on
> > > gmp-native (then later gmp). The error was that "--target is not appropriate
> > > for GMP".
> > > 
> > > To avoid the error printed by the following code snippet from configure.in:
> > > 
> > > configure.in:
> > > "
> > > if test -n "$target_alias" && test "$target_alias" != "$host_alias"; then
> > >   AC_MSG_ERROR([--target is not appropriate for GMP
> > > Use --build=CPU-VENDOR-OS if you need to specify your CPU and/or system
> > > explicitly.  Use --host if cross-compiling (see "Installing GMP" in the
> > > manual for more on this).])
> > > fi
> > > "
> > > 
> > > this patch assigns the value of the '--target' argument to the value of the
> > > '--host' argument.
> > > 
> > > Tested by 'bitbake gmp' and 'bitbake gmp-native'
> > 
> > I tried to build `gmp-native` without your patch and it worked for me
> > with `minimal` (eglibc) for `MACHINE = "beagleboard"`. Is there a
> > difference how things are handled between distributions?
> 
> It also built without problems with `angstrom-2010.x`.

… and `angstrom-2008.1`, `minimal-{uclibc,libc}`.

> > […]


Thanks,

Paul


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

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

* Re: [RFC, PATCH, resend] gmp: assign --target to --host to avoid configure error
  2010-10-16 10:41         ` Paul Menzel
@ 2010-10-18 12:33           ` Ben Gardiner
  2010-10-18 16:24             ` Ben Gardiner
  0 siblings, 1 reply; 9+ messages in thread
From: Ben Gardiner @ 2010-10-18 12:33 UTC (permalink / raw)
  To: openembedded-devel

HI Paul,

Thank you for all your testing of gmp builds.

On Sat, Oct 16, 2010 at 6:41 AM, Paul Menzel
<paulepanter@users.sourceforge.net> wrote:
[...]
> Am Samstag, den 16.10.2010, 11:16 +0200 schrieb Paul Menzel:
> > Am Freitag, den 15.10.2010, 17:00 +0200 schrieb Paul Menzel:
> > > I tried to build `gmp-native` without your patch and it worked for me
> > > with `minimal` (eglibc) for `MACHINE = "beagleboard"`. Is there a
> > > difference how things are handled between distributions?
> >
> > It also built without problems with `angstrom-2010.x`.
>
> … and `angstrom-2008.1`, `minimal-{uclibc,libc}`.

So that's a positive result for 'angstrom-200{8.1,0.x}' , {uclibc,libc}...

I guess the culprit must be my use of external CSL toolchain. I will
try a build of gmp in 'angstrom-2008.1' 'libc' from
f58a5d59b755bdb725497f574a8059529c134c27 of master without external
toolchain and post the results.

Best Regards,
Ben Gardiner

---
Nanometrics Inc.
http://www.nanometrics.ca



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

* Re: [RFC, PATCH, resend] gmp: assign --target to --host to avoid configure error
  2010-10-18 12:33           ` Ben Gardiner
@ 2010-10-18 16:24             ` Ben Gardiner
  0 siblings, 0 replies; 9+ messages in thread
From: Ben Gardiner @ 2010-10-18 16:24 UTC (permalink / raw)
  To: openembedded-devel

On Mon, Oct 18, 2010 at 8:33 AM, Ben Gardiner
<bengardiner@nanometrics.ca> wrote:
> HI Paul,
>
> Thank you for all your testing of gmp builds.
>
> On Sat, Oct 16, 2010 at 6:41 AM, Paul Menzel
> <paulepanter@users.sourceforge.net> wrote:
> [...]
>> Am Samstag, den 16.10.2010, 11:16 +0200 schrieb Paul Menzel:
>> > Am Freitag, den 15.10.2010, 17:00 +0200 schrieb Paul Menzel:
>> > > I tried to build `gmp-native` without your patch and it worked for me
>> > > with `minimal` (eglibc) for `MACHINE = "beagleboard"`. Is there a
>> > > difference how things are handled between distributions?
>> >
>> > It also built without problems with `angstrom-2010.x`.
>>
>> … and `angstrom-2008.1`, `minimal-{uclibc,libc}`.
>
> So that's a positive result for 'angstrom-200{8.1,0.x}' , {uclibc,libc}...
>
> I guess the culprit must be my use of external CSL toolchain. I will
> try a build of gmp in 'angstrom-2008.1' 'libc' from
> f58a5d59b755bdb725497f574a8059529c134c27 of master without external
> toolchain and post the results.

In 'angstrom-2008.1' 'libc' from
f58a5d59b755bdb725497f574a8059529c134c27 and without any external
toolchain specified: gmp and gmp-native built OK

In 'angstrom-2008.1' 'libc' from
f58a5d59b755bdb725497f574a8059529c134c27 plus "[PATCH] distro,
toolchain-external: override TARGET_VENDOR with TOOLCHAIN_VENDOR" [1]
and with external CSL 2009q1 toolchain specified: gmp and gmp-native
built OK

In 'angstrom-2008.1' 'libc' from
f58a5d59b755bdb725497f574a8059529c134c27 and with external CSL 2009q1
toolchain specified: gmp and gmp-native fail:

NOTE: Running task 160 of 171 (ID: 93,
[...]/oe/recipes/libtool/libtool-native_2.2.6b.bb, do_package_stage)
ERROR: function do_configure failed
ERROR: log data follows
([...]/tmp/work/x86_64-linux/gmp-native-5.0.1-r1.1/temp/log.do_configure.15901)
[...]
| configure: error: --target is not appropriate for GMP
| Use --build=CPU-VENDOR-OS if you need to specify your CPU and/or system
| explicitly.  Use --host if cross-compiling (see "Installing GMP" in the
| manual for more on this).

I think I know what's happening.

Without "[PATCH] distro, toolchain-external: override TARGET_VENDOR
with TOOLCHAIN_VENDOR" [1] applied, TARGET_SYS =
"arm-none-linux-gnueabi" must be set to avoid lots of
"arm-angstrom-linux-gnueabi not found" errors. With the patch applied
I don't have to which must make the --target and --host arguments
match again.

I'm sorry for the noise, I'll withdraw this patch from consideration.

Best Regards,
Ben Gardiner

[1] http://patchwork.openembedded.org/patch/3240/

---
Nanometrics Inc.
http://www.nanometrics.ca



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

end of thread, other threads:[~2010-10-18 16:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-13 16:42 [PATCH] [RFC][PATCH] autotools: don't specify --target when configuring gmp Ben Gardiner
2010-10-13 19:50 ` Chris Larson
2010-10-13 21:06   ` [RFC, PATCH] gmp: assign --target to --host to avoid configure error Ben Gardiner
2010-10-14 14:24   ` [RFC, PATCH, resend] " Ben Gardiner
2010-10-15 15:00     ` Paul Menzel
2010-10-16  9:16       ` Paul Menzel
2010-10-16 10:41         ` Paul Menzel
2010-10-18 12:33           ` Ben Gardiner
2010-10-18 16:24             ` Ben Gardiner

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.