Page 2 of 2

Posted: Wed Jun 04, 2008 3:15 pm
by Brynet-Inc
I made a change to the article which removes some irrelevant information, do you agree with how it is now AJ?

My reason for this was, none of the environment variables set in the cross-compiler article are required for the installation of GMP or MPFR.

It may also be a possibility to recommend using the host OS's package management functionality, ports/packages for OpenBSD, pkgsrc for NetBSD, RPM/DEB's for Linux, etc.

They'll just need to ensure --with-gmp/mpfr are pointing to the correct location..

Posted: Wed Jun 04, 2008 3:25 pm
by Brynet-Inc
I'm torn, jnc100's method removes the requirement of building GMP/MPFR separately (and/or installing them system wide..).

Personally, it's not a big deal.. they're fairly small packages, in the end, the decision is up to you guys.

Posted: Thu Jun 05, 2008 3:29 am
by AJ
Brynet-Inc wrote:I made a change to the article which removes some irrelevant information, do you agree with how it is now AJ?
Yes - I just made a small change to the numbering now one of the points has been removed, but otherwise, it looks good.
I'm torn, jnc100's method removes the requirement of building GMP/MPFR separately (and/or installing them system wide..).
Hmm...I suppose one disadvantage of this method is that GMP/MPFR have to be added to the GCC path each time you do this, whereas the first method makes them immediately available for when GCC 4.3.1+ is released (assuming that it doesn't require a later version of the other libraries, which IMHO is unlikely).

Perhaps an additional section could be added just before the links. Something like 'Alternative Method' (unless you feel this is promoting the first method and sidelining jnc100's way too much :wink: )

Cheers,
Adam

Posted: Fri Jun 06, 2008 10:39 am
by jnc100
AJ wrote:Something like 'Alternative Method'
I completely agree. The additional disadvantage with my method is that we cannot guarantee that the gcc build system will always support such a method. The compile-each-package-separately method is a much more standard way of doing things.

Regards,
John.

Re: Cross-Compiler Problem - GMP and MPFR

Posted: Sat Mar 21, 2009 9:33 am
by mastermemorex
Your solution almost work, but It seems that gcc is looking for the gmp headers at ../../gcc.4.3.3/gmp So I wrote

Code: Select all

cd /usr/src
tar zxf gcc-4.3.3.tar.gz
tar zxf mpfr-2.3.1.tar.gz
tar zxf gmp-4.2.2.tar.gz
cd gcc-4.3.0
ln -s ../mpfr-2.3.1 ./mpfr
ln -s ../gmp-4.2.2 ./gmp
cd ..

# the following as per cross compiler article
[color=#FF0000]mkdir build
cd build
mkdir gcc
cd gcc[/color]
export PATH=$PATH:$PREFIX/bin
../gcc-4.3.0/configure --target=$TARGET --prefix=$PREFIX --disable-nls --enable-languages=c,c++ --without-headers --with-newlib
make all-gcc
make install-gcc
And it works! You have saved me the afternoon. Thanks a lot. =D>
and... remember to install g++ before... :wink:

Re: Cross-Compiler Problem - GMP and MPFR

Posted: Sat Mar 21, 2009 4:58 pm
by pcmattman
Wouldn't it have been easier to use --with-gmp and --with-mpfr rather than creating the symlinks?