Mike Frysinger | 4 May 14:42
Picon
Favicon
Gravatar

Re: openrc-0.2.3 failed to cross-compile

On Wednesday 30 April 2008, Siong-Ui Te wrote:
> The cross-toolchain is built using the following command:
> USE="-*" UCLIBC_CPU=ARM920T crossdev -t arm-softfloat-linux-uclibc --g
> 3.4.6-r2 --k 2.6.17-r2
>
> I am trying to cross-compile openrc, and got the following error message:
> ---
> In file included from rc.c:53:
> /usr/arm-softfloat-linux-uclibc/usr/include/asm/setup.h:23: error: syntax
> error before "__u32"

this is a problem with the kernel headers, not openrc.  it seems to be fixed 
in 2.6.25.  no idea about older 2.6.x headers as we cull them over time.
-mike
Mike Frysinger | 4 May 14:46
Picon
Favicon
Gravatar

Re: Emerging into SYSROOT causes packages to install in host system

On Monday 28 April 2008, Dave Bender wrote:
>   That is currently the solution I use for x86. The drawbacks are
> slower compilation performance (cross compilers running on 64 bit
> empirically seem faster) and other overhead caused by chrooting. The
> approach also does not extend to other architectures like ARM.
> Essentially this approach is a lightweight emulation; taken to its
> fullest extent you would be running QEMU to build for these other
> architectures.

you could distcc with the host system.  i dont know about "other overhead 
caused by chrooting" though ... being in a chroot really adds no overhead at 
all.  while you can argue the non-native point if you were targeting 
something non-native, Matthijs point is pretty clear: since you can easily do 
native, you probably should as over all it will be a much smoother 
development cycle.
-mike
Alon Bar-Lev | 4 May 15:31
Picon
Favicon

Re: Emerging into SYSROOT causes packages to install in host system

This is:
http://bugs.gentoo.org/show_bug.cgi?id=201499

Alon.

On 4/28/08, Dave Bender <codehero@...> wrote:
> Dear list,
>   I am attempting to cross compile x86 packages on an x86_64 host. In particular,
>   when I attempt to emerge baselayout-2 into my SYSROOT path, emerge wants to
>   emerge baselayout-2 into my host system. PORTAGE_CONFIGROOT is also set to the
>  SYSROOT, so I do not understand why for example, package.mask on my host system
>  is taken into account at all when emerge determines dependencies.
>  I am following the instructions in Chapter 5 of the Embedded Gentoo Handbook
>  to the letter and do not understand why this behaviour is occurring.
>
>  Thanks
>  Dave
>
>
>  --
>  gentoo-embedded@... mailing list
>
>
Dave Bender | 4 May 16:35
Picon

Re: Emerging into SYSROOT causes packages to install in host system

On Sun, May 4, 2008 at 8:46 AM, Mike Frysinger <vapier@...> wrote:
> On Monday 28 April 2008, Dave Bender wrote:
>>   That is currently the solution I use for x86. The drawbacks are
>> slower compilation performance (cross compilers running on 64 bit
>> empirically seem faster) and other overhead caused by chrooting. The
>> approach also does not extend to other architectures like ARM.
>> Essentially this approach is a lightweight emulation; taken to its
>> fullest extent you would be running QEMU to build for these other
>> architectures.
>
> you could distcc with the host system.  i dont know about "other overhead

That's an interesting suggestion, I'll look into it.

> caused by chrooting" though ... being in a chroot really adds no overhead at
> all.  while you can argue the non-native point if you were targeting

When I use 32bit chroots, some factor slows down file I/O a great
deal. For example I notice that  emerge -uDN takes much
longer to do in a 32bit chroot. I use mount bind to share the
/usr/portage directory with the chroot, so I don't think its that
mechanism.
All I know is that updating inside the chroot is much slower.

> something non-native, Matthijs point is pretty clear: since you can easily do
> native, you probably should as over all it will be a much smoother
> development cycle.

Of course working natively always presents the fewest headaches. What
bugs me is that it seems so easy from the Embedded Handbook...
(Continue reading)

Gareth McClean | 4 May 22:03
Picon

RE: Emerging into SYSROOT causes packages to install in host system

>When I use 32bit chroots, some factor slows down file I/O a great
>deal. For example I notice that  emerge -uDN takes much
>longer to do in a 32bit chroot. I use mount bind to share the
>/usr/portage directory with the chroot, so I don't think its that
>mechanism.
>All I know is that updating inside the chroot is much slower.

Do you also mount /proc and /dev to your chroot using the --bind option?

-----Original Message-----
From: Dave Bender [mailto:codehero@...] 
Sent: 04 May 2008 15:35
To: Mike Frysinger
Cc: gentoo-embedded@...
Subject: Re: [gentoo-embedded] Emerging into SYSROOT causes packages to
install in host system

<snip>

Dave Bender | 4 May 23:46
Picon

Re: Emerging into SYSROOT causes packages to install in host system

I mount bind to /dev; I just mount proc and sysfs normally (which I
think is OK, because they are not block devices)

On Sun, May 4, 2008 at 4:03 PM, Gareth McClean <disneysw@...> wrote:
>>When I use 32bit chroots, some factor slows down file I/O a great
>>deal. For example I notice that  emerge -uDN takes much
>>longer to do in a 32bit chroot. I use mount bind to share the
>>/usr/portage directory with the chroot, so I don't think its that
>>mechanism.
>>All I know is that updating inside the chroot is much slower.
>
>
>
> Do you also mount /proc and /dev to your chroot using the --bind option?
>
>
>
> -----Original Message-----
> From: Dave Bender [mailto:codehero@...]
> Sent: 04 May 2008 15:35
> To: Mike Frysinger
> Cc: gentoo-embedded@...
> Subject: Re: [gentoo-embedded] Emerging into SYSROOT causes packages to
> install in host system
>
> <snip>
>
>
> --
> gentoo-embedded@... mailing list
(Continue reading)

Favicon

GCC 4.3 fails on mpfr

Hi,
I am trying to build a cross compiler toolchain using 'crossdev 'and the
gcc source version is gcc-4.3.0 

I am getting following errors while configuring gcc-stage1, 
{{
checking for correct version of gmp.h... yes
checking for correct version of mpfr.h... no
configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+.
Try the --with-gmp and/or --with-mpfr options to specify their
locations.
Copies of these libraries' source code can be found at their respective
hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
See also http://gcc.gnu.org/install/prerequisites.html for additional
info.
If you obtained GMP and/or MPFR from a vendor distribution package, make
sure that you have installed both the libraries and the header files.
They may be located in separate packages.

!!! ERROR: cross-sh4-unknown-linux-gnu/gcc-4.3.0 failed.
Call stack:
}}

I understand the pre-requisite for gcc-4.3 is mpfr 4.1+ but I am not
sure how to pass '--with-mpfr' configure options to gcc.

Any help will be highly appreciated 

With kind regards,
Dilip  
(Continue reading)

Mike Frysinger | 6 May 14:30
Picon
Favicon
Gravatar

Re: GCC 4.3 fails on mpfr

On Tuesday 06 May 2008, Dilip Malinur Ramesh wrote:
> I am trying to build a cross compiler toolchain using 'crossdev 'and the
> gcc source version is gcc-4.3.0
>
> I am getting following errors while configuring gcc-stage1,
> {{
> checking for correct version of gmp.h... yes
> checking for correct version of mpfr.h... no
> configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+.
> Try the --with-gmp and/or --with-mpfr options to specify their
> locations.
> Copies of these libraries' source code can be found at their respective
> hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
> See also http://gcc.gnu.org/install/prerequisites.html for additional
> info.
> If you obtained GMP and/or MPFR from a vendor distribution package, make
> sure that you have installed both the libraries and the header files.
> They may be located in separate packages.
>
> !!! ERROR: cross-sh4-unknown-linux-gnu/gcc-4.3.0 failed.
> Call stack:
> }}
>
> I understand the pre-requisite for gcc-4.3 is mpfr 4.1+ but I am not
> sure how to pass '--with-mpfr' configure options to gcc.

do you have mpfr and gmp already installed ?

qlist -I -v mpfr gmp
-mike
(Continue reading)

Christopher Friedt | 6 May 21:01

Re: GCC 4.3 fails on mpfr

This is a 'chicken / egg' problem. In order to build a cross compiler 
for arch X you need mpfr compiled for arch X. In order to build mpfr for 
arch X you need a toolchain for arch X.

Try building the cross-compiler without mpfr first, then build libmpfr, 
and then rebuild the cross compiler.

I can't say whether or not that will work with crossdev, but that's the 
way things Should(TM) work.

Chris

Dilip Malinur Ramesh wrote:
> Hi,
> I am trying to build a cross compiler toolchain using 'crossdev 'and the
> gcc source version is gcc-4.3.0 
> 
> I am getting following errors while configuring gcc-stage1, 
> {{
> checking for correct version of gmp.h... yes
> checking for correct version of mpfr.h... no
> configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+.
> Try the --with-gmp and/or --with-mpfr options to specify their
> locations.
> Copies of these libraries' source code can be found at their respective
> hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
> See also http://gcc.gnu.org/install/prerequisites.html for additional
> info.
> If you obtained GMP and/or MPFR from a vendor distribution package, make
> sure that you have installed both the libraries and the header files.
(Continue reading)

Mike Frysinger | 6 May 23:24
Picon
Favicon
Gravatar

Re: GCC 4.3 fails on mpfr

On Tuesday 06 May 2008, Christopher Friedt wrote:
> This is a 'chicken / egg' problem. In order to build a cross compiler
> for arch X you need mpfr compiled for arch X. In order to build mpfr for
> arch X you need a toolchain for arch X.
>
> Try building the cross-compiler without mpfr first, then build libmpfr,
> and then rebuild the cross compiler.

you cant build gcc-4.3 without gmp and mpfr.  they're hard requirements.  but 
they're requirements that the host system has it, not that they are 
cross-compiled for the target.
-mike

Gmane