OS X - Development and Darwin Discussion and questions about development for Mac OS X.

installing g++-2.95 on snow leopard


Post Reply New Thread Subscribe

 
Thread Tools
lavanya

 
Member Since: May 30, 2011
Posts: 3
lavanya is on a distinguished road

lavanya is offline
Hi, I'm trying to compile some programs which need g++-2.95.
I've downloaded the source for gcc-2.95 (which includes g++-2.95, I think).

I don't know what the host option should be for configuring it.
Any ideas? (I'm using Snow Leopard, Mac OS X 10.6.7, Kernel Version: Darwin 10.7.3)

Thanks!!

What I tried so far ...
  1. I can't configure it with just
    Code:
    .\configure
    Config.guess failed to determine the host type.  You need to specify one.
    ...
    since it failed to recognize my host.
  2. So now I'm trying
    Code:
    ./configure --host=x86_64-apple-darwin10 --target=i686-apple-darwin10
    
    Invalid configuration `x86_64-apple-darwin10': machine `x86_64-apple' not recognized
    Invalid configuration `x86_64-apple-darwin10': machine `x86_64-apple' not recognized
    Unrecognized host system name x86_64-apple-darwin10.
    . I got those values from my already installed gcc-4.2.1
    Code:
    gcc -v
    
    Using built-in specs.
    Target: i686-apple-darwin10
    Configured with: /var/tmp/gcc/gcc-5664~38/src/configure --disable-checking --enable-werror 
    --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ 
    --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ 
    --with-slibdir=/usr/lib --build=i686-apple-darwin10 
    --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 
    --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1
    Thread model: posix
    gcc version 4.2.1 (Apple Inc. build 5664)
  3. Also I found that in my gcc source- gcc-2.95/config, there's a set of files with names that sound like host values (mh-solaris, mt-linux, but nothing that looks like i686-apple-darwin10 etc).
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Ottawa
Posts: 15,463
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
Darwin 10 probably doesn't work because Darwin 10 was released 8 years after GCC 2.95.3. Any particular reason you need such an old version of GCC?

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog :: M-F IRC Channel - Chats every Sunday at 8PM EST.
QUOTE Thanks
lavanya

 
Member Since: May 30, 2011
Posts: 3
lavanya is on a distinguished road

lavanya is offline
Thanks for your quick reply!

The software I'm compiling needs "C++ compiler g++-2.95 o g++-2.96." When I try using the default g++ (4.2), it gives a bunch of errors.

Now I'm wondering- are there any options I could use for g++ (like -ansi) that might help?


Code:
make
/usr/bin/g++ -c  relax.cc -I/usr/local/leda-4.2/incl -Wall


In file included from relax.cc:1:
estruc.hh:21: error: ISO C++ forbids declaration of ‘istream’ with no type
estruc.hh:21: error: ‘istream’ is neither function nor member function; cannot be declared friend
estruc.hh:21: error: expected ‘;’ before ‘&’ token
estruc.hh:22: error: ISO C++ forbids declaration of ‘ostream’ with no type
estruc.hh:22: error: ‘ostream’ is neither function nor member function; cannot be declared friend
...
QUOTE Thanks
Raz0rEdge

 
Raz0rEdge's Avatar
 
Member Since: Jul 17, 2009
Location: MA
Posts: 6,075
Raz0rEdge has much to be proud ofRaz0rEdge has much to be proud ofRaz0rEdge has much to be proud ofRaz0rEdge has much to be proud ofRaz0rEdge has much to be proud ofRaz0rEdge has much to be proud ofRaz0rEdge has much to be proud ofRaz0rEdge has much to be proud ofRaz0rEdge has much to be proud of
Mac Specs: 27" i7 iMac with 16GB RAM and 1TB HDD, iPhone 3G & 4, iPod Nano 16GB, iPod Shuffle, iPad 2 16GB WiFi

Raz0rEdge is offline
You don't need G++ 2.95 for this..you probably need to fix the code you are compiling..

You most likely need to add
Code:
using namespace std;
in your header file that'll make all of it work..or start prefixing all of the things in the 'std' namesake with 'std::'..like..'std::istream', 'std:stream' and so on..

--
Regards
...Ashwin



Be sure to read the Community Guidelines | The more information you provide, the better answers you get, remember GIGO.
QUOTE Thanks
lavanya

 
Member Since: May 30, 2011
Posts: 3
lavanya is on a distinguished road

lavanya is offline
Thanks, I'll just tweak the code so it compiles with what I have.
QUOTE Thanks

Post Reply New Thread Subscribe


« NSOpenGLConext and upate | Problem with times() function »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
After Installing Snow Leopard Keypad Not Working / Responding DJ MixxTress Apple Notebooks 5 06-05-2011 04:23 PM
Issues installing snow leopard kanly123 OS X - Operating System 6 05-22-2011 05:02 PM
Problems with iMac after installing Snow Leopard Hforth OS X - Operating System 2 10-22-2010 09:05 AM
installing snow leopard while on tiger willschw Apple Notebooks 3 12-28-2009 05:39 PM
Installing OS X (Snow) Leopard on a Windows-based laptop iMacWhack OS X - Operating System 1 09-04-2009 04:05 AM

All times are GMT -4. The time now is 08:13 AM.

Powered by vBulletin
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?