News:

Latest versions:
Server plugin: 0.5.1
MVP dongle: 0.5.2
Raspberry Pi client: 0.5.2
Windows client: 0.5.2-1

Main Menu

Problem with build environment for VOMP on x86_64

Started by sirwio, September 06, 2006, 10:21:26

Previous topic - Next topic

sirwio

Hi,

I got one of these new H3 mediamvp's. In an effort to sort out the problems with this hardware I thought a good start would be to set up a development environment for vomp. I'm on a gentoo x86_64 system and the crosstool build fails. Everything works fine until configure is executed in the gcc folder...

I'm writing this from work so I don't have the exact message at hand but its something about x86_64 beeing an unknown host. I can supply the error later today.

I have also tried crosstool-0.42 downloaded from http://kegel.com/crosstool/
A build of crosstool for the powerpc-405 cpu with gcc-2.95.3 and glibc-2.2.5 fails with the same error as indicated in the Crosstool build result matrix - http://kegel.com/crosstool/crosstool-0.42/buildlogs/

Anyone know of a solution other than performing the crosstool builds on a non x86_64 machine?

- Magnus

MarkC

OK, quick stab in the dark here...

Try setting an extra environment variable in the dev. env. build script:

export RESULT_TOP=${CROSSTOOL_TARGET}
export GCC_BUILD=i686-pc-linux-gnu
eval `cat powerpc-405.dat` `cat gcc-2.95.3-glibc-2.2.5-ppc405.dat` sh all.sh --notest

(The middle line is the new one).

You might also need to add
export CC="gcc -m32"

I really don't know... I'd be amazed if this works, but it's worth a try. It's just guesswork :)
Someone who actually has a 64-bit box might be more help than me!

sirwio

Hi,

I tried the suggested changes but to no avail...

Well I guess its time to fire up a xen host domain with a 32 bit kernel to use for my vomp development.

- Magnus

sirwio

Hi again,

I took another shoot on my x86_64 machine last night and had some success. Its a hack and someone better in "crosstooling" could suggest the correct solution or provide an approriate patch to the crosstool suite.

I manually edited crosstool.sh on line 88 where the HOST variable is set from :

84 # Set HOST to something almost, but not completely, identical to BUILD
85 # This strange operation causes gcc to always generate a cross-compiler
86 # even if the build machine is the same kind as the host.
87 BUILD=`$GCC_DIR/config.guess`
88 HOST=`echo $BUILD | sed s/-/-host_/`

to:
88 HOST='echo i686-unknown-linux-gnu | sed s/-/-host_/'

This single change made the crosstool suite to complete on my box. I guess that a ./configure --host=i686-unknown-linux-gnu in the gcc directory would have the same result. Perhaps theres a way to tweak this into the dev. env. build script?

I haven't actually been able to run any code yet on the target so that I can confirm if the crosscompile actually works but everything builds.

Now its time to tackle the H3 hardware problems...

- Magnus

MarkC

#4
Quote
I manually edited crosstool.sh on line 88 where the HOST variable is set from :

84 # Set HOST to something almost, but not completely, identical to BUILD
85 # This strange operation causes gcc to always generate a cross-compiler
86 # even if the build machine is the same kind as the host.
87 BUILD=`$GCC_DIR/config.guess`
88 HOST=`echo $BUILD | sed s/-/-host_/`

to:
88 HOST='echo i686-unknown-linux-gnu | sed s/-/-host_/'

Hmm, that's what I was trying to achieve. It seemed that crosstool.sh initially set BUILD to GCC_BUILD, when I had a quick look.
I'll investigate it further tonight... perhaps 'unknown' is required instead of 'pc'... or perhaps setting BUILD to i686 hurts something else.

Well done for getting it to work... and good luck with the H3!

[Edit: as it turns out, I was looking at the wrong version of crosstool myself (0.39), so I'm even less surprised that my suggestion failed >:( )