public inbox for gentoo-embedded@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-embedded] crosscompile bash
@ 2006-11-18  7:59 Corey
  2006-11-18  8:31 ` Corey
  2006-11-18 15:24 ` Daniel Glaser
  0 siblings, 2 replies; 8+ messages in thread
From: Corey @ 2006-11-18  7:59 UTC (permalink / raw
  To: gentoo-embedded


ROOT="/mnt/gentoo" CHOST="i686-pc-linux-uclibc" CBUILD="i686-pc-linux-gnu" emerge bash 

....

checking for alloca... (cached) yes
checking whether getpgrp requires zero arguments... yes
checking whether setvbuf arguments are reversed... configure: error: cannot run test program while cross compiling


How to fix this?  I've seen plenty of mention of this particular problem, but no solution...


Thanks,

Corey
-- 
gentoo-embedded@gentoo.org mailing list



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

* Re: [gentoo-embedded] crosscompile bash
  2006-11-18  7:59 [gentoo-embedded] crosscompile bash Corey
@ 2006-11-18  8:31 ` Corey
  2006-11-18 13:48   ` Vladimir Pouzanov
  2006-11-18 15:30   ` Daniel Glaser
  2006-11-18 15:24 ` Daniel Glaser
  1 sibling, 2 replies; 8+ messages in thread
From: Corey @ 2006-11-18  8:31 UTC (permalink / raw
  To: gentoo-embedded


Well, I tried cross-emerging bash-3.2_p5, and for whatever reason, did not suffer
the "cannot run test program while cross compiling" error that bash-3.1_p17 was
giving me; however now thing break later on with:

/usr/libexec/gcc/i686-pc-linux-uclibc/ld: cannot find -lcurses
collect2: ld returned 1 exit status
make: *** [bash] Error 1

...however ncurses has been installed, both in the host target and the build host...



On Saturday 18 November 2006 00:59, Corey wrote:
> 
> ROOT="/mnt/gentoo" CHOST="i686-pc-linux-uclibc" CBUILD="i686-pc-linux-gnu" emerge bash 
> 
> ....
> 
> checking for alloca... (cached) yes
> checking whether getpgrp requires zero arguments... yes
> checking whether setvbuf arguments are reversed... configure: error: cannot run test program while cross compiling
> 
> 
> How to fix this?  I've seen plenty of mention of this particular problem, but no solution...
> 
> 
> Thanks,
> 
> Corey
-- 
gentoo-embedded@gentoo.org mailing list



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

* Re: [gentoo-embedded] crosscompile bash
  2006-11-18  8:31 ` Corey
@ 2006-11-18 13:48   ` Vladimir Pouzanov
  2006-11-18 15:30   ` Daniel Glaser
  1 sibling, 0 replies; 8+ messages in thread
From: Vladimir Pouzanov @ 2006-11-18 13:48 UTC (permalink / raw
  To: gentoo-embedded

bash-3.2_p5 successfully merged on arm-softfloat-linux-gnueabi. IIRC,
older versions of bash had a bash-3.1_p17 (for sure) had a problem
with most of the cross-compilation targets. At least I have patched
bash-3.1_p17 ebuild in my overlay ;)

-- 
Sincerely,
Vladimir "Farcaller" Pouzanov
http://hackndev.com
-- 
gentoo-embedded@gentoo.org mailing list



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

* Re: [gentoo-embedded] crosscompile bash
  2006-11-18  7:59 [gentoo-embedded] crosscompile bash Corey
  2006-11-18  8:31 ` Corey
@ 2006-11-18 15:24 ` Daniel Glaser
  2006-11-18 18:13   ` Corey
  1 sibling, 1 reply; 8+ messages in thread
From: Daniel Glaser @ 2006-11-18 15:24 UTC (permalink / raw
  To: gentoo-embedded

Corey wrote:
> ROOT="/mnt/gentoo" CHOST="i686-pc-linux-uclibc" CBUILD="i686-pc-linux-gnu" emerge bash 
>
> ....
>
> checking for alloca... (cached) yes
> checking whether getpgrp requires zero arguments... yes
> checking whether setvbuf arguments are reversed... configure: error: cannot run test program while cross compiling
>
>
> How to fix this?  I've seen plenty of mention of this particular problem, but no solution...
>
>
> Thanks,
>
> Corey
>   

Try adding this to your $ROOT/etc/make.conf

bash_cv_have_mbstate_t=yes
ac_cv_func_setvbuf_reversed=no

Will work properly.

cu daniel
-- 
gentoo-embedded@gentoo.org mailing list



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

* Re: [gentoo-embedded] crosscompile bash
  2006-11-18  8:31 ` Corey
  2006-11-18 13:48   ` Vladimir Pouzanov
@ 2006-11-18 15:30   ` Daniel Glaser
  2006-11-18 22:00     ` Corey
  1 sibling, 1 reply; 8+ messages in thread
From: Daniel Glaser @ 2006-11-18 15:30 UTC (permalink / raw
  To: gentoo-embedded

Hi
> Well, I tried cross-emerging bash-3.2_p5, and for whatever reason, did not suffer
> the "cannot run test program while cross compiling" error that bash-3.1_p17 was
> giving me; however now thing break later on with:
>
> /usr/libexec/gcc/i686-pc-linux-uclibc/ld: cannot find -lcurses
> collect2: ld returned 1 exit status
> make: *** [bash] Error 1
>
> ...however ncurses has been installed, both in the host target and the build host...
>   

You have to merge every library to your cross-compile-root, means in 
your case to merge ncurses first to /usr/cross-... And then to your 
other root without the X-Toolchain.
This is, because the X-Compiler searches there for libraries and not in 
another $ROOT. So, the steps to go are:

ROOT="/usr/cross-SOMEXTOOLCHAIN" [ 
PORTAGE_CONFIGROOT="SOMEOTHERROOTWITHCONF"] emerge LIBPACKAGE
ROOT="YOUROTHERROOT" emerge PACKAGES

I always emerge everything first to the X-Toolchain root with making 
packages and then I emerge the packages without recompiling them to my 
development root.

-daniel
-- 
gentoo-embedded@gentoo.org mailing list



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

* Re: [gentoo-embedded] crosscompile bash
  2006-11-18 15:24 ` Daniel Glaser
@ 2006-11-18 18:13   ` Corey
  0 siblings, 0 replies; 8+ messages in thread
From: Corey @ 2006-11-18 18:13 UTC (permalink / raw
  To: gentoo-embedded

On Saturday 18 November 2006 08:24, Daniel Glaser wrote:
> Corey wrote:
> > ROOT="/mnt/gentoo" CHOST="i686-pc-linux-uclibc" CBUILD="i686-pc-linux-gnu" emerge bash 
> >
> > checking whether setvbuf arguments are reversed... configure: error: cannot run test program while cross compiling
> >
> > How to fix this?  I've seen plenty of mention of this particular problem, but no solution...
> >
> 
> Try adding this to your $ROOT/etc/make.conf
> 
> bash_cv_have_mbstate_t=yes
> ac_cv_func_setvbuf_reversed=no
> 


Many thanks!


-- 
gentoo-embedded@gentoo.org mailing list



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

* Re: [gentoo-embedded] crosscompile bash
  2006-11-18 15:30   ` Daniel Glaser
@ 2006-11-18 22:00     ` Corey
  2006-11-19 15:23       ` Daniel Glaser
  0 siblings, 1 reply; 8+ messages in thread
From: Corey @ 2006-11-18 22:00 UTC (permalink / raw
  To: gentoo-embedded

On Saturday 18 November 2006 08:30, Daniel Glaser wrote:
> You have to merge every library to your cross-compile-root, means in 
> your case to merge ncurses first to /usr/cross-... And then to your 
> other root without the X-Toolchain.
> This is, because the X-Compiler searches there for libraries and not in 
> another $ROOT. So, the steps to go are:
> 
> ROOT="/usr/cross-SOMEXTOOLCHAIN" [ 
> PORTAGE_CONFIGROOT="SOMEOTHERROOTWITHCONF"] emerge LIBPACKAGE
> ROOT="YOUROTHERROOT" emerge PACKAGES
> 
> I always emerge everything first to the X-Toolchain root with making 
> packages and then I emerge the packages without recompiling them to my 
> development root.
> 

Thanks a ton for the helpful clues!

I think I've almost got my mind wrapped around this stuff - but just to be
certain, I'd like to clarify one thing.

My goal is pretty simple right now: I just want to create a second gentoo
installation on a separate partition, which is built from the ground-up using
uclibc - I'm still using the same platform/architecture ( i686 ), so I'm not
trying to target some different embedded device or anything, and I _do_
want to have a complete toolchain ( including portage ) on this uclibc-based
gentoo partion. 

My intention/aim is to only cross-compile the minimal environment necessary 
to be able to chroot into this new partition and begin emerging the rest of the 
software I want, as per a normal/standard gentoo install. Restated, I'm simply
after a uclibc-based/built gentoo system.

With that said, do I still need to emerge the libraries into a separate "SOMEXTOOLCHAIN"
ROOT? Or am I able to somehow just install those same libraries directly into
"YOUROTHERROOT" ROOT ( i.e., my separate partition, where I want my uclibc-based
gentoo to reside? )


THanks!

-- 
gentoo-embedded@gentoo.org mailing list



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

* Re: [gentoo-embedded] crosscompile bash
  2006-11-18 22:00     ` Corey
@ 2006-11-19 15:23       ` Daniel Glaser
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Glaser @ 2006-11-19 15:23 UTC (permalink / raw
  To: gentoo-embedded

Hi Corey
> Thanks a ton for the helpful clues!
>
> I think I've almost got my mind wrapped around this stuff - but just to be
> certain, I'd like to clarify one thing.
>
> My goal is pretty simple right now: I just want to create a second gentoo
> installation on a separate partition, which is built from the ground-up using
> uclibc - I'm still using the same platform/architecture ( i686 ), so I'm not
> trying to target some different embedded device or anything, and I _do_
> want to have a complete toolchain ( including portage ) on this uclibc-based
> gentoo partion. 
>
> My intention/aim is to only cross-compile the minimal environment necessary 
> to be able to chroot into this new partition and begin emerging the rest of the 
> software I want, as per a normal/standard gentoo install. Restated, I'm simply
> after a uclibc-based/built gentoo system.
>
> With that said, do I still need to emerge the libraries into a separate "SOMEXTOOLCHAIN"
> ROOT? Or am I able to somehow just install those same libraries directly into
> "YOUROTHERROOT" ROOT ( i.e., my separate partition, where I want my uclibc-based
> gentoo to reside? )
>   

This depends mostly on your intentions and for sure on the packages 
options. If you have the choice, to statically compile the libs into the 
packages, then you don't need it in your minimal-root. This is an 
option, when the package has a static use flag. But if it has no option 
for static compiling, then the package needs to have the lib available 
because it uses the lib at runtime. For example, busybox supports static 
compiling and is able to run without any library, if you give it the 
static use flag. But be aware of other packages. Most of them don't 
support it.

-daniel
-- 
gentoo-embedded@gentoo.org mailing list



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

end of thread, other threads:[~2006-11-19 15:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-18  7:59 [gentoo-embedded] crosscompile bash Corey
2006-11-18  8:31 ` Corey
2006-11-18 13:48   ` Vladimir Pouzanov
2006-11-18 15:30   ` Daniel Glaser
2006-11-18 22:00     ` Corey
2006-11-19 15:23       ` Daniel Glaser
2006-11-18 15:24 ` Daniel Glaser
2006-11-18 18:13   ` Corey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox