Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

taKevin

macrumors newbie
Original poster
Feb 21, 2012
4
0
Columbus
I'm trying to use the program GNUplot to fit data, but I just updated to Lion and naturally had to update GNUplot. However, when I try to configure in Terminal it states that I do not have a C compiler, but I already installed Xcode 4 so I know that the GCC and GNU compilers were downloaded. I'm completely lost so any help would be great!
 
Can you post the last few lines from config.log? Also on terminal what is the output of following commands -

Code:
gcc -v

and

Code:
g++ -v
 
It just says -bash: gcc: command not found and the same for g++.

I'm trying to install readline, and the config.log says:

"configure:2059: checking whether make sets $(MAKE)
configure:2085: result: no
configure:2138: checking for gcc
configure:2168: result: no
configure:2231: checking for cc
configure:2278: result: no
configure:2334: checking for cl.exe
configure:2364: result: no
configure:2388: error: in `/Users/ks/readline-6.2':
configure:2391: error: no acceptable C compiler found in $PATH
See `config.log' for more details."
 
Ok, so either Xcode is not installed (you need to actually run the Install XCode.app and complete the installation after downloading from App Store) OR the gcc and g++ commands are not in PATH for some reason.

If

Code:
clang -v

and
Code:
clang++ -v

show valid output then doing this on the terminal before running configure might help -
Code:
export CC=clang
export CXX=clang++

Or even try this
Code:
export CPP='llvm-gcc-4.2'
export CC='llvm-gcc-4.2'
export CXX='llvm-g++
 
The most recent version of Xcode (4.3, released a few days ago) is distributed as a standalone application rather than an installation package. It no longer provides command line tools by default. To install the command line tools, you need to open Xcode's preferences, go to the “Downloads” tab, and install them from there.
 
(you need to actually run the Install XCode.app and complete the installation after downloading from App Store)

That is not true with the XCode currently in the App Store. With release 4.3, XCode is a self-contained app bundle and doesn't require installation anymore.

However, it also doesn't install command line tools either, those are a seperate download.
 
That is not true with the XCode currently in the App Store. With release 4.3, XCode is a self-contained app bundle and doesn't require installation anymore.

However, it also doesn't install command line tools either, those are a seperate download.

Oh - that probably was OP's problem. I stopped playing Xcode download/update games with last version - it is incredibly buggy and slow (I wasn't even able to git clone a repo without crashes). Going forward I think I will be much better off with just Vim and Command Line Tools.
 
The most recent version of Xcode (4.3, released a few days ago) is distributed as a standalone application rather than an installation package. It no longer provides command line tools by default. To install the command line tools, you need to open Xcode's preferences, go to the “Downloads” tab, and install them from there.

Thanks, I didn't realize there was a new version.

Which gcc version do they provide.

A different question... is python part of Xcode or does it come with the OS?
 
GCC is no longer included with Xcode

Did you read the rest of this thread?

Apparently Xcode 4.3 includes gcc again, however not as part of the standard installation! This is the reason I asked which gcc version was provided if I ask Xcode to install the "console tools" using the preferences menu.
 
The basic python interpreter is part of the OS install. To find out which version, use the Terminal command-line:
Code:
python -V

The reason I can't find out myself is that I have both Xcode and the enthought python distribution installed... I just didn't remember whether a basic python installation was part of OSX.

I have python 2.7.2 from enthought.
 
Did you read the rest of this thread?

Apparently Xcode 4.3 includes gcc again, however not as part of the standard installation! This is the reason I asked which gcc version was provided if I ask Xcode to install the "console tools" using the preferences menu.

Well of course! I just don't don't think of the following as gcc.


iMacCore2Duo:~ lloyd$ ls -alF `whereis gcc`
lrwxr-xr-x 1 root wheel 12 Feb 20 12:16 /usr/bin/gcc@ -> llvm-gcc-4.2

iMacCore2Duo:~ lloyd$ ls -alF `whereis llvm-gcc-4.2`
lrwxr-xr-x 1 root wheel 32 Feb 20 12:16 /usr/bin/llvm-gcc-4.2@ -> ../llvm-gcc-4.2/bin/llvm-gcc-4.2
 
Well of course! I just don't don't think of the following as gcc.


iMacCore2Duo:~ lloyd$ ls -alF `whereis gcc`
lrwxr-xr-x 1 root wheel 12 Feb 20 12:16 /usr/bin/gcc@ -> llvm-gcc-4.2

iMacCore2Duo:~ lloyd$ ls -alF `whereis llvm-gcc-4.2`
lrwxr-xr-x 1 root wheel 32 Feb 20 12:16 /usr/bin/llvm-gcc-4.2@ -> ../llvm-gcc-4.2/bin/llvm-gcc-4.2

Ok, so this answers my question. It's not the gnu c compiler suite, they just add a symlink to their own C compiler.

GSL, the gnu scientific library, is at this point not compatible with llvm... it compiles, but some of the tests fail. I don't know about other stuff.
 
Ok, so this answers my question. It's not the gnu c compiler suite, they just add a symlink to their own C compiler.

GSL, the gnu scientific library, is at this point not compatible with llvm... it compiles, but some of the tests fail. I don't know about other stuff.

That's right - back at response 5.
 
Guys, new issue. I've got gcc and got gnuplot downloaded and running...kind of. But now every time I try to use gnuplot through Terminal, I tell it to plot a basic function and get the following error:

gnuplot> plot sin(x)
gnuplot(21992) malloc: *** error for object 0x7000000074697865: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6

What does all this mean and what can I do to fix it?
 
Guys, new issue. I've got gcc and got gnuplot downloaded and running...kind of. But now every time I try to use gnuplot through Terminal, I tell it to plot a basic function and get the following error:

gnuplot> plot sin(x)
gnuplot(21992) malloc: *** error for object 0x7000000074697865: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6

What does all this mean and what can I do to fix it?
Did you install all dependencies for gnuplot?

maybe this helps:
http://www.leancrew.com/all-this/2012/02/fixing-gnuplot-on-os-x-10-7-3/

I usually go through macports to install linux software. But gnuplot seems to be standalone, as long as you have gcc... not sure what is going wrong.
 
The most recent version of Xcode (4.3, released a few days ago) is distributed as a standalone application rather than an installation package. It no longer provides command line tools by default. To install the command line tools, you need to open Xcode's preferences, go to the “Downloads” tab, and install them from there.

I had already figured that out, but am running into two different problems: I would like to have the GNU autotools (autoconf, automake, libtool) and an OpenMPI environment (mpicc, mpirun, ...) for shell compilation. These used to be included in the XCode Developer Tools, but they don't seem to be anymore with version 4.3.

Is there any official way to install them (like another command-line-like package to download)? Or do I need to go the GNU-route with Macports or compiling them myself?

Maybe someone already found out... thanks!
 
Is there any official way to install them (like another command-line-like package to download)? Or do I need to go the GNU-route with Macports or compiling them myself?

Did you give the download section a look in the ADC portal or in XCode's preferences by any chance or did you just ask the question before looking ? ;)
 
Did you give the download section a look in the ADC portal or in XCode's preferences by any chance or did you just ask the question before looking ? ;)

Sorry, I should have elaborated...

I did check the Preferences Download tab. And I searched not only the ADC portal but did an extensive internet search if there were any packages available. I did not find anything. (except threads that complained about the autotools being dropped out of XCode)

Still, I searched for solutions to the "missing gcc" error (that this thread already solved) for quite a while before I noticed the "command line tools" package, simply because I searched for the wrong words and did not know there was a package by that name.

If you are implying that there is a very simple solution that I just overlooked, please enlighten me.

Background to what I've been using so far: I worked on an older laptop that I upgraded through several XCode versions, that's why even with the newest, I still had a working MPI compiler and autotools on the system. But my laptop crashed and burned and I decided to start freshly with the new one, installing a plain XCode 4.3. That's when my troubles began.
I did have Macports installed for some more GNU utilities, but would like to avoid it for most parts, since upgrades take forever when you base everything on the Macports gcc (Compiling a compiler takes time...).

Maybe someone had a similar problem, and I've had very good experiences in the MacRumors forums (mostly in the Digital Video section).
 
Sorry, I should have elaborated...

I did check the Preferences Download tab. And I searched not only the ADC portal but did an extensive internet search if there were any packages available. I did not find anything.

Did not look very hard did you ?

Log in to ADC, then go to the Mac dev center :

https://developer.apple.com/devcenter/mac/index.action

On the bottom, there's a big Blue Arrow in a section titled "Additional Downloads" and there's a "View All Downloads" on the right of it.

After clicking that, there's no way you can miss the label displayed in a HUGE font saying "Command Line Tools for Xcode - February 2012".
 
Did not look very hard did you ?

Wait, I think we're not talking about the same thing...

I WAS looking for the command line tools, because I was surprised they were gone. I DID find the package (after some search though...). And it helped me a lot in so far as I have a gcc again and git and many other helpful tools on the command line.

However, OpenMPI and autoconf and everything I mentioned are no longer included in XCode (also not in the command line tools, which are basically just adding the XCode contents to the shell environment). And I would love to find a _second_ package that contains just this, but I did not.

Maybe I should start a new thread for this...

----------

Sorry, I just re-read my first post and it is really unclear... I hope the last one cleared things up a bit. So again:

I happily installed the command line tools and have my gcc and make back.

I am however still missing my mpicc and automake, which were included in earlier version of XCode but were apparently dropped. I was hoping there might be a _second_ package much like the command line tools that I overlooked.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.