Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Compiling RATS

Compiling RATS
Thread Tools
Nerozwei
Forum Regular
Join Date: Dec 2002
Status: Offline
Reply With Quote
Feb 8, 2004, 05:47 PM
 
I'd like to try out RATS, but have problems in getting it to work. I installed GCC from the dev tools disc, but the installer script complains that there's no GCC. I noticed the compiler is GCC2.

Any chances of getting it to work? If anyone knows, please let me know. I'm new with this stuff, so please hold my hand and walk me through the process
     
Moonray
Mac Elite
Join Date: May 2001
Status: Offline
Reply With Quote
Feb 8, 2004, 07:39 PM
 
There should be a gcc too. Do a which gcc, it should reply "/usr/bin/gcc". If not there's something wrong with your Developer Tools installation.

-
     
kvm_mkdb
Mac Elite
Join Date: Oct 2000
Location: Caracas, Bolivarian Republic Of Venezuela
Status: Offline
Reply With Quote
Feb 8, 2004, 08:01 PM
 
Originally posted by Nerozwei:
I'd like to try out RATS, but have problems in getting it to work. I installed GCC from the dev tools disc, but the installer script complains that there's no GCC. I noticed the compiler is GCC2.

Any chances of getting it to work? If anyone knows, please let me know. I'm new with this stuff, so please hold my hand and walk me through the process
You should install the recommended XCode Tools. The compiler alone will likely not be enough for OSS projects like RATS.

Contra a barbárie, o estudo; Contra o individualismo, a solidariedade!
     
Moonray
Mac Elite
Join Date: May 2001
Status: Offline
Reply With Quote
Feb 8, 2004, 08:29 PM
 
Originally posted by kvm_mkdb:
You should install the recommended XCode Tools. The compiler alone will likely not be enough for OSS projects like RATS.
Okay, mr. lounge poster, would you mind telling us where it says that you would need Xcode to compile that?
Depending on which version of the DevTools you install, Xcode or Projectbuilder will be installed anyway, but it's absolutely not needed to compile any unix open source software.
I suggest you keep posting in the Political/War Lounge where 99.5% of your posts go.

-
     
Earth Mk. II
Mac Elite
Join Date: Feb 2001
Location: Washington, DC
Status: Offline
Reply With Quote
Feb 8, 2004, 09:09 PM
 
first, try which gcc. If that fails (says "gcc not found"), and you're on 10.2, run sudo gcc_select 3 or and if you're on 10.3, sudo gcc_select 3.3. You might want to go to http://connect.apple.com/ sign up for a free web account if you don't already have one, and make sure you have the most recent dev. tools compatible with your system.

Now, assuming your gcc is working (stop me if you know this already, but I don't know how much experience you have with this):[list=1][*]to install RATS, you need libexpat. OS X doesn't have this by default, so you need to install it. go to http://expat.sourceforge.net/ or install it from within fink.[*]go to your RATS source dir, type ./configure.[*]if you installed expat from fink, and the configure script failed, try: ./configure --with-expat-lib=/sw/lib --with-expat-include=/sw/include[*]when the configure script completes successfully, run make then sudo make install[/list=1]
/Earth\ Mk\.\ I{2}/
     
Nerozwei  (op)
Forum Regular
Join Date: Dec 2002
Status: Offline
Reply With Quote
Feb 10, 2004, 03:52 PM
 
Thanks for your support. I'm still out of luck, though. I guess there's something weird about the GCC installation. Here's some log of what I get (I'm on 10.3.2):

madeleine:~/Desktop/downloads/rats-2.2 miiaj$ which gcc
no gcc in /usr/local/mysql/bin /bin /sbin /usr/bin /usr/sbin
madeleine:~/Desktop/downloads/rats-2.2 miiaj$ which cc
/usr/bin/cc
madeleine:~/Desktop/downloads/rats-2.2 miiaj$ ./configure --with-expat-lib=/sw/lib --with-expat-include=/sw/include
checking for gcc... no
checking for cc... cc
checking for C compiler default output... configure: error: C compiler cannot create executables
madeleine:~/Desktop/downloads/rats-2.2 miiaj$ sudo gcc_select 3.3
sudo: gcc_select: command not found
madeleine:~/Desktop/downloads/rats-2.2 miiaj$ cc --version
2.95.2
madeleine:~/Desktop/downloads/rats-2.2 miiaj$

Any ideas? Some files missing? Wrong path?
     
Earth Mk. II
Mac Elite
Join Date: Feb 2001
Location: Washington, DC
Status: Offline
Reply With Quote
Feb 10, 2004, 04:05 PM
 
if you could, type ls -al /usr/bin/*cc /usr/bin/gcc* into terminal and paste the output here.

it should look something like this:
lrwxr-xr-x 1 root wheel 7 Oct 27 21:53 /usr/bin/cc -> gcc-3.3
-rwxr-xr-x 1 root wheel 69992 Dec 9 23:55 /usr/bin/distcc
lrwxr-xr-x 1 root wheel 7 Oct 27 21:53 /usr/bin/gcc -> gcc-3.3
lrwxr-xr-x 1 root wheel 7 Oct 27 21:53 /usr/bin/gcc -> gcc-3.3
-r-xr-xr-x 1 root wheel 131720 Sep 24 02:38 /usr/bin/gcc-3.3
-r-xr-xr-x 1 root wheel 117980 Sep 24 02:35 /usr/bin/gcc2
-r-xr-xr-x 1 root wheel 135828 Sep 24 02:37 /usr/bin/gcc3
-rwxr-xr-x 1 root wheel 17851 Sep 12 23:06 /usr/bin/perlcc
-r-xr-xr-x 1 root wheel 84764 Sep 24 02:42 /usr/bin/yacc
You could also go ahead and try to reinstall the dev tools.... it couldn't hurt.
/Earth\ Mk\.\ I{2}/
     
Nerozwei  (op)
Forum Regular
Join Date: Dec 2002
Status: Offline
Reply With Quote
Feb 11, 2004, 03:07 PM
 
Originally posted by Earth Mk. II:
if you could, type ls -al /usr/bin/*cc /usr/bin/gcc* into terminal and paste the output here.

it should look something like this:


You could also go ahead and try to reinstall the dev tools.... it couldn't hurt.
Thanks Earth,

I typed the command, here's the output:

madeleine:~ miiaj$ ls -al /usr/bin/*cc /usr/bin/gcc*
-rwxrwxrwx 1 root wheel 117980 8 Feb 23:38 /usr/bin/cc
-r-xr-xr-x 1 root wheel 117980 24 Sep 09:35 /usr/bin/gcc2
-rwxr-xr-x 1 root wheel 17851 13 Sep 06:06 /usr/bin/perlcc

/usr/bin/gcc:
total 0
drwxr-xr-x 3 root wheel 102 9 Feb 21:55 .
drwxr-xr-x 520 root wheel 17680 9 Feb 21:55 ..
drwxr-xr-x 3 root wheel 102 9 Feb 21:55 darwin

/usr/bin/gcc:
total 0
drwxr-xr-x 3 root wheel 102 9 Feb 21:55 .
drwxr-xr-x 520 root wheel 17680 9 Feb 21:55 ..
drwxr-xr-x 3 root wheel 102 9 Feb 21:55 darwin
madeleine:~ miiaj$

-----------

I also tried reinstalling (before I sent the post, actually), but the installer only gave me the option to upgrade. I did that, but it didn't do anything.

Any ideas? How to uninstall GCC to reinstall it without getting the update option?
     
Earth Mk. II
Mac Elite
Join Date: Feb 2001
Location: Washington, DC
Status: Offline
Reply With Quote
Feb 11, 2004, 04:16 PM
 
wow... um, looks like you might have an old version of the dev tools installed.

If you're using an old version of gcc (i.e. the version shipped with the 10.2 or 10.1 dev tools) the object files may not properly link on Panther. Are you installing off a "Developer Tools" CD, or an "XCode" CD?

you need XCode to properly compile stuff on Panther.
(it should have shipped with your 10.3 install CD's or you can download it with a free ADC Online membership.)
/Earth\ Mk\.\ I{2}/
     
   
 
Forum Links
Forum 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
Top
Privacy Policy
All times are GMT -4. The time now is 12:51 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,