using gcc to compile

Joined
Sep 5, 2010
Messages
6
Reaction score
0
Points
1
Location
NZ
Your Mac's Specs
MacBook Pro 13.3" Intel Core 2 Duo: 2.53 GHz, Memory: 4 GB, NVIDIA GeForce 9400M, 250Gb HDD
Hey,

so I'm trying to build bandwidth monitor -NG from open source.

I cd to bmw and run ./configure in terminal

Code:
Brad-MacBook-Pro:bwm brad$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking for style of include used by make... none
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
Brad-MacBook-Pro:bwm brad$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
Brad-MacBook-Pro:bwm brad$

I've just installed Xcode off my osx disk and "which gcc" returns nothing
Code:
Brad-MacBook-Pro:~ brad$ which gcc
Brad-MacBook-Pro:~ brad$

Also running ls -l /usr/bin/gcc* simply returns this
Code:
Brad-MacBook-Pro:~ brad$ ls -l /usr/bin/gcc*
ls: /usr/bin/gcc*: No such file or directory

can anyone help? if more info is needed just ask and i'll try to find it
I'm new to macs'

I just did find . -name gcc* -print
Code:
Brad-MacBook-Pro:~ brad$ find . -name gcc* -print
and it didn't return anything.

i can find gcc in finder under /Developer/usr/bin

thanks ahead of time if anyone can help or offer any kind of solution.
 
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
gcc should be in /usr/bin. What do you get when you type : echo $PATH?
 
OP
inflames
Joined
Sep 5, 2010
Messages
6
Reaction score
0
Points
1
Location
NZ
Your Mac's Specs
MacBook Pro 13.3" Intel Core 2 Duo: 2.53 GHz, Memory: 4 GB, NVIDIA GeForce 9400M, 250Gb HDD
echo $PATH

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
 
OP
inflames
Joined
Sep 5, 2010
Messages
6
Reaction score
0
Points
1
Location
NZ
Your Mac's Specs
MacBook Pro 13.3" Intel Core 2 Duo: 2.53 GHz, Memory: 4 GB, NVIDIA GeForce 9400M, 250Gb HDD
running a 'find . -name gcc* -print' in the developer dir gives the following results.

Code:
Brad-MacBook-Pro:Developer brad$ find . -name gcc* -print
./Documentation/DocSets/com.apple.ADC_Reference_Library.CoreReference.docset/Contents/Resources/Documents/documentation/DeveloperTools/gcc-4.2.1
./Documentation/DocSets/com.apple.ADC_Reference_Library.DeveloperTools.docset/Contents/Resources/Documents/documentation/DeveloperTools/gcc-4.0.1
./Documentation/DocSets/com.apple.ADC_Reference_Library.DeveloperTools.docset/Contents/Resources/Documents/documentation/DeveloperTools/gcc-4.0.1/gcc
./Documentation/DocSets/com.apple.ADC_Reference_Library.DeveloperTools.docset/Contents/Resources/Documents/documentation/DeveloperTools/gcc-4.0.1/gccinstall
./Documentation/DocSets/com.apple.ADC_Reference_Library.DeveloperTools.docset/Contents/Resources/Documents/documentation/DeveloperTools/gcc-4.0.1/gccint
./Documentation/DocSets/com.apple.ADC_Reference_Library.DeveloperTools.docset/Contents/Resources/Documents/documentation/DeveloperTools/gcc-4.0.1/gccint/gcc-Directory.html
./Documentation/DocSets/com.apple.ADC_Reference_Library.DeveloperTools.docset/Contents/Resources/Documents/documentation/DeveloperTools/gcc-4.2.1
./Documentation/DocSets/com.apple.ADC_Reference_Library.DeveloperTools.docset/Contents/Resources/Documents/documentation/DeveloperTools/gcc-4.2.1/gcc
./Documentation/DocSets/com.apple.ADC_Reference_Library.DeveloperTools.docset/Contents/Resources/Documents/documentation/DeveloperTools/gcc-4.2.1/gccinstall
./Documentation/DocSets/com.apple.ADC_Reference_Library.DeveloperTools.docset/Contents/Resources/Documents/documentation/DeveloperTools/gcc-4.2.1/gccint
./Documentation/DocSets/com.apple.ADC_Reference_Library.DeveloperTools.docset/Contents/Resources/Documents/documentation/DeveloperTools/gcc-4.2.1/gccint/gcc-Directory.html
./SDKs/MacOSX10.4u.sdk/usr/include/gcc
./SDKs/MacOSX10.4u.sdk/usr/lib/gcc
./SDKs/MacOSX10.5.sdk/Developer/usr/llvm-gcc-4.2/include/gcc
./SDKs/MacOSX10.5.sdk/Developer/usr/llvm-gcc-4.2/lib/gcc
./SDKs/MacOSX10.5.sdk/usr/include/gcc
./SDKs/MacOSX10.5.sdk/usr/lib/gcc
./usr/bin/gcc
./usr/bin/gcc-4.0
./usr/bin/gcc-4.2
./usr/gcc-4.2
./usr/include/gcc
./usr/lib/gcc
./usr/lib/gcc/i686-apple-darwin9/4.0.1/include/gcc
./usr/lib/gcc/i686-apple-darwin9/4.2.1/include/gcc
./usr/lib/gcc/powerpc-apple-darwin9/4.0.1/include/gcc
./usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/gcc
./usr/libexec/gcc
./usr/llvm-gcc-4.2/include/gcc
./usr/llvm-gcc-4.2/lib/gcc
./usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin9/4.2.1/include/gcc
./usr/llvm-gcc-4.2/lib/gcc/powerpc-apple-darwin9/4.2.1/include/gcc
./usr/llvm-gcc-4.2/libexec/gcc
./usr/share/man/man1/gcc-4.0.1
./usr/share/man/man1/gcc-4.2.1
./usr/share/man/man1/gcc.1

not sure if thats useful or not?
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
On my machine, /usr/bin/gcc is a symlink to /usr/bin/gcc-4.2. Do you have /usr/bin/gcc-4.2? If so and you don't have the gcc symlink, make it:
Code:
sudo ln -s /usr/bin/gcc-4.2 /usr/bin/gcc
This should have been done for you but it's possible something prevented this from happening.
 
OP
inflames
Joined
Sep 5, 2010
Messages
6
Reaction score
0
Points
1
Location
NZ
Your Mac's Specs
MacBook Pro 13.3" Intel Core 2 Duo: 2.53 GHz, Memory: 4 GB, NVIDIA GeForce 9400M, 250Gb HDD
Heya, thanks for replying,

I ran the ln cmd, worked from what i can tell but alas still no 'which gcc' returns in terminal. uploaded a ss of dev/usr/bin as you can see both gcc-4.0 and gcc4.2 are there and yet the ./configure still wont recognize it, it's not just this ./configure script either.

thanks

Screen gcc.png
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top