OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Apr 25, 2024 3:15 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Setting up a Cross Compiler
PostPosted: Sat May 24, 2008 3:10 pm 
Offline
User avatar

Joined: Tue May 20, 2008 4:52 pm
Posts: 20
Location: St Louis, Missouri, USA
I was following the cross compiler tutorial verbatim and ran into a roadblock when configuring gcc:

Code:
checking for correct version of gmp.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.


cygwin doesn't install libgmp and libmpfr by default so I had to hunt them down. I don't know if this would qualify as something wikiworthy, but while gcc-core, bison, flex, etc are listed under the DEVEL category in cygwin, libgmp and libmpfr are under the LIBS category.

edit: you might think to yourself, "well duh, libgmp is under LIBS because it's a lib, and gcc is under devel because it's a dev-tool, dummy" While that is true, it becomes confusing because there are also libs under devel and devel tools under libs.


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 25, 2008 4:21 pm 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9301
Location: On the balcony, where I can actually keep 1½m distance
I have tracked the source, and it comes down to a few things:
1) GCC 4.3.0 is only out for two months now
2) It is probably the first version of GCC that actually requires GMP. All the previous versions do not need it.
3) somebody filled in the data in the matrix without having exactly followed the tutorial (i.e. has installed more)

#1 is why you are the first to find out about it.
#3 is just bad, and I fixed the matrix correspondingly
#2 is the actual source of the problem, and it just looks like they added more unnecessary bloat to the compiler. (they provide arbitrary-precision maths, but it is beyond me why they can't just substitute from the C library's math.h when that's possible)

I also wonder whether this change is going to cause trouble for people going self-hosted, as they suddenly need to provide an additional library to compile GCC...


but thanks for pointing it out

Edit: typo fixed

_________________
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]


Last edited by Combuster on Mon May 26, 2008 5:22 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Mon May 26, 2008 5:11 pm 
Offline
Member
Member
User avatar

Joined: Tue Apr 10, 2007 4:42 pm
Posts: 224
Yeah, I experienced that problem the first time I tried to compile it on Cygwin (I got it 2 days after it came out, :shock: ) - I just installed the libraries and voila!

This might pose a problem for future self-hosters who want the 'latest and greatest' version of GCC, but I'm assuming/hoping these libraries are not OS-dependent...

I partially agree that there should be a wiki article for installing or porting these libraries, once this issue becomes 'significant' after a while...

PS: Don't you mean GCC 4.3.0?

_________________
"Sufficiently advanced stupidity is indistinguishable from malice."


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 75 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group