Opened 12 years ago
Closed 12 years ago
#35380 closed defect (fixed)
mp-gcc fails to work on Mountain Lion
Reported by: | rosssmith@… | Owned by: | mww@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.2 |
Keywords: | mountainlion | Cc: | maehne (Torsten Maehne), ryandesign (Ryan Carsten Schmidt), mparchet@…, mdanger007@… |
Port: | gcc47 |
Description
I've just upgraded to Mountain Lion. I didn't try to update Macports; I just uninstalled the whole thing and reinstalled from scratch. Also installed Xcode, installed the command line tools, and went through the xcodebuild license thing.
$ sudo port install gcc47 ... installs without any errors ... $ port select gcc Available versions for gcc: mp-gcc47 none (active) $ sudo port select gcc mp-gcc47 Selecting 'mp-gcc47' for 'gcc' succeeded. 'mp-gcc47' is now active. $ gcc -v gcc-mp-4.7: error trying to exec '/opt/local/bin/i686-apple-darwin11-llvm-gcc-4.2': execvp: No such file or directory
I don't know what's going wrong here, or whether it's a bug in gcc_select or the gcc47 installer or what. I tried again with gcc46 and got the same result.
Change History (11)
comment:1 Changed 12 years ago by maehne (Torsten Maehne)
Cc: | Torsten.Maehne@… added |
---|
comment:2 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|---|
Keywords: | mountainlion added |
Owner: | changed from macports-tickets@… to mww@… |
Port: | gcc47 added |
It works correctly for me with Xcode 4.4 on Mountain Lion.
Are you sure you correctly/completely uninstalled your old ports? On Mountain Lion (a.k.a Darwin 12) you should not be seeing a path containing "darwin11". Try cleaning and then rebuilding gcc47 again.
comment:3 Changed 12 years ago by rosssmith@…
Are you sure gcc_select has been u[dated to work with ML? Looking at the portfile (browser:trunk/dports/sysutils/gcc_select/Portfile) shows the last update was 5 months ago, and its list of OS versions only goes up to darwin 11.
comment:4 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Indeed the port should be updated for Mountain Lion, however the only thing that has to do with is whether you're able to select compilers that came with Xcode. This bug report is about selecting gcc47 that came from MacPorts.
Does the problem also occur when you run "gcc-mp-4.7 -v"?
comment:5 Changed 12 years ago by rosssmith@…
OK, this seems to have been solved. I uninstalled everything (to the extent of deleted /opt completely), reinstalled the xcode tools, macports, and gcc47, and now it works. As far as I can tell I didn't do anything differently from last time.
However, I think I may have found a Clue. On Apple's download page (https://developer.apple.com/downloads/index.action?name=for%20Xcode%20-), the command line tools are dated July 28, while all the other tools for Mountain Lion are dated July 26. I originally installed the CL tools a couple of days ago, so the July 28 ones wouldn't have been there then; presumably I used an earlier version from July 26 that has since been replaced. So I suspect there was a bug in Apple's CL tools installeer that somehow broke macport's gcc select, at least for some people, and got fixed by Apple in the couple of days between my first attempt and today.
comment:6 Changed 12 years ago by mdanger007@…
With mountain lion, you're gonna need to manually install a fortran compiler. i'm using g77.
- install g77
- install xcode + command line tools
- install gcc
comment:7 follow-up: 11 Changed 12 years ago by mparchet@…
Hello,
I'm looking for to use gcc47 in xcode to compile a c project but I can't select gcc47 in the compilator menu. I can only select the apple compile old version.
When I select other in the compile menu I have a line sutch as
com.apple.compilers.llvmgcc4.2
but I don't know the line for gcc47
How can I select gcc47 in xcode ?
Tanks for your help
Best regards
mparchet
comment:11 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | mdanger007@… added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Replying to ryandesign@…:
Indeed the port should be updated for Mountain Lion, however the only thing that has to do with is whether you're able to select compilers that came with Xcode.
Done in r96842 (maintainer timeout).
Replying to rosssmith@…:
I suspect there was a bug in Apple's CL tools installeer that somehow broke macport's gcc select, at least for some people, and got fixed by Apple in the couple of days between my first attempt and today.
There were indeed some problems with Apple's command line tools installer for Xcode 4.4 as initially released, but these should by now have been resolved. Ensure you've updated to Xcode 4.4.1 and gone back to Xcode's Preferences window's Downloads section to update your command line tools to the latest version.
Replying to mdanger007@…:
With mountain lion, you're gonna need to manually install a fortran compiler. i'm using g77.
We would not recommend installing a standalone fortran compiler; it might interfere with MacPorts. Instead, install a gcc port, like gcc47, and use its fortran compiler.
Replying to mparchet@…:
I'm looking for to use gcc47 in xcode to compile a c project but I can't select gcc47 in the compilator menu. I can only select the apple compile old version.
This question is not related to this ticket.
Cc Me!