I downloaded the latest version of GCC (6.2.0) using homebrew. It works great from the command line (you have to make sure you really use it and not the g++ override that XCODE does)
If I try to tell XCODE to use this version of GCC as the compiler, it says it is incompatible.
Did I download the wrong thing? Is this just because it's so new?
Related
Can I use GCC for e.g GCC4.0.3 without installation
In my macOS I have installed Clang xcode , and GCC from Homebrew
In my Linux they are installed as well
But I want to use GCC (Specially older version) besides most updated version
Like NVM that manage Node version and it lets you install many nodejs with different version on your system
I want to use GCC4 specially for science and compiling Old FORTRAN to make my Source codes run and see the results
In new OS both macOS and Linux when you install gcc it will install most updated and that is not useful for old fortran or old codes.
So In my solution i think its better to use gcc without install or even install gcc to custom directory folder and copy the codes in that directory and compile them but not to install as wide system and make incompatibility with default GCC and CLANG on system
Thanks in advance
I am trying to install dph-examples in mac os x version 10.7.2 and I got this error. How ever on ghci , I can see
ghci>import Data.Array.Parallel.
Data.Array.Parallel.Base Data.Array.Parallel.Base.DTrace Data.Array.Parallel.Base.TracePrim Data.Array.Parallel.Stream
but not Data.Array.Parallel , Data.Array.Parallel.Prelude and Data.Array.Parallel.Prelude.Double. I copied the example ( it uses these libraries ) given on Data-Parallel-Haskell and its working fine. My program is compiling and running so my question is, why i am not able to see these library at ghci prompt. Also i am not able to find the reference for sumP function at the Data-Array-Parallel. I am using ghc-7.2.1.
GHC depends on Xcode 3.2:
The package requires Xcode 3.2 (in particular, the "Unix Development Support") to be already installed.
— GHC 7.2.1 download page
Xcode 3.2 should already come with LLVM, so if it's not already installed, installing it should fix things. If you already have it installed, then your installation might be broken somehow; you could try reinstalling it to make sure. I think Xcode 4 isn't fully supported by GHC yet, so if you have it installed, that might be the problem; you could try uninstalling it and installing 3.2 instead.
Warning: Couldn't figure out LLVM version!
Make sure you have installed LLVM
Perhaps you didn't install LLVM? Go install LLVM.
on my new macbook pro with osx lion and XCode 4.1 I have some problems with gcc.
In /usr/bin I cannot find gcc-4.2
I only have the following versions:
i686-apple-darwin11-llvm-gcc-4.2
llvm-gcc
llvm-gcc-4.2
As a result when I try to select gcc42 by means of port select --set gcc gcc42 it returns me the following error:
Selecting 'gcc42' for 'gcc' failed: could not create new link "/opt/local/bin/gcc": target "/usr/bin/gcc-4.2" doesn't exist
However port select gcc returns me the following versions:
apple-gcc42
gcc42
llvm-gcc42 (active)
mp-gcc44
How can I fix this problem?
Thanks!
I could manage to solve this issue in Mountain Lion with a symbolic link:
sudo ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/gcc-4.2
Hope this help someone
There should be a /usr/bin/gcc-4.2 with Xcode 4.1 installed. However, with the recent Xcode 4.2 update, Apple has finally removed their modified standard gcc-4.2. What remains is either llvm-gcc42 (also symlinked to gcc) and clang, the newer non-gcc C compiler. Apple is making the transition to clang; the first step is using the hybrid llvm-gcc42. There have been some reported problems using either of the new compilers. You should be using this time to figure out if you have problems with them and, if so, fix your code and report bugs to Apple. In the meantime, if you absolutely have to have the old gcc-4.2, it is possible to build one similar to the previous Apple-modified one via MacPorts:
port install apple-gcc42
but you'll be swimming against the tide.
With Xcode 4.3, you need to install the Command Line Tools separately. XCode -> Preferences -> Downloads, Click the Components button, and then click Install next to the "Command Line Tools" option.
I had the same issue.
I fixed it by doing a symlink.
Like this :
cd /usr/bin
then :
sudo ln -s llvm-gcc-4.2 gcc-4.2
You might consider compiling a newer GCC (e.g. 4.6.2) from its source code. Apple does not care much any more about GCC, but GCC has made significant progress since 4.2
And you probably could use your llvm-gcc42 as a GCC compiler.
I tampered with the innards of the makefile and found out that one invoked option provided an argument too many; replaced the variable with the actual result of the function called on my machine (removing the excess argument) and did run make again it worked.
First of all I know that the title is general, but i presume that is the correct way of asking questions.
Specifics are: I'm trying to get boost 1.46 and gcc 4.6 using ppa(ubuntu toolchain for gcc and boost latest for libboost). I can do it on 10.10, but it seems impossible on 11.04. So is there an official way of using the latest version of gcc and libbbost. I know that default versions for ubuntu arent the newest ones, but i need some 1.44+ boost stuff and gcc 4.6 for some nice :) c++11 features. So what is the best way to do it? PPA?
This works on every distribution on almost any operating system:
Go to gcc.gnu.org, download the sources, unpack, have a look at the README, do a
./configure
make -j4
make install (as root)
which will install gcc in the /usr/local prefix (your current compiler will be untouched).
If you want to use the compiler, you need to make your toolchain aware of it, you can use some environment variables (CC, PATH) or configure your project manually.
Repeat for boost.
I have installed the developer tools. I can compile code via Xcode and according to the docs /usr/bin/gcc & /usr/bin/cc should point to /usr/bin/gcc-4.0. Neither the symlinks or gcc-4.0 exist on my system (Snow Leopard). All I wish to do is compile some C on the terminal! I'm amazed by how complicated this task is. The command GCC is unsurprisingly returning "gcc: command not found".
Can anyone shed some light on this?
No! Reinstalling is the wrong answer!
Newer versions of XCode require you to install the command-line versions of the tools separately. In XCode, go to Preferences | Downloads, check the Components tab, and install them from there:
These binaries should be there after installing xcode. Check your path settings, and if you still don't have these reinstall xcode
Command line tools are no longer included with the latest XCode (even as an add on). Now you can download them here:
https://developer.apple.com/downloads/index.action
Did you install the latest Xcode after installing Snow Leopard, or is this the version of Xcode from a previous OS installation?
On my system with a clean Snow Leopard install the default compiler (and the one symlinked from cc and gcc) is gcc-4.2
I do have gcc-4.0 too, although it's not the default.