New gfortran builds available

UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE

The distribution now has Xcode plugins in it. There are two. One is for Xcode 3.0 and one is for Xcode 2.4. The 2.4 version is unsupported as I have no means to test or debug it. I tested the Xcode 3.0 version it works fine. An important note regarding the Xcode 3.0 plugin and alternate versions of gfortran:

if the compiler is installed at a different location (like /usr/local/gfortran-4.2/bin), let the plugin know it by running the following command in a shell :

defaults com.apple.Xcode DBGFortranBasePath /usr/local/gfortran-4.2

The link below has been updated to the new installer. And thanks to Damien Ballibot for developing the new plugin.

UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE

Gaurav Khanna has created new builds of gfortran for PPC and Intel Macs running Tiger and Leopard. You can download the binaries from his site. There is also an installer available here that will install or upgrade the appropriate distribution for your system. You can download that installer at the link below. The new installers do NOT include an Xcode plugin.

Jan 08 gfortran build

Previous version of gfortran can be downloaded from this page:

http://www.macresearch.org/xcode_gfortran_plugin_update

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Leopard, XCode 3, and this new gfortran build

Hi,
I haven't switched to Leopard yet. So far everything work still smoothly with Tiger - especially my current setup with gfortran in xcode.
I guess now I could use this plugin to install gfortran on leopard, right?
However, what does this sentence mean:
"The new installers do NOT include an Xcode plugin"
As I said, I don't have Leopard, and have never played on another machine with Xcode 3, so I am wondering if a similar setup as with the Tiger-plugin would be possible.
Is there a specific problem, why there is no Xcode 3 gfortran plugin?
Or could I setup Xcode 3 in a way so it would compile with gfortran, and I don't need a plugin?
Or is somebody working on a plugin?
Thanks for shedding some light into this,
Claus

Re:Leopard, XCode 3, and this new gfortran build

Hi Claus,

The plugin that was developed before only works with Xcode 2.4. Due to changes in the Xcode plugin spec, the reverse engineered plugin simply cannot and will not work in Xcode 3.0. Since I no longer have access to any machines running Tiger or Xcode 2.4 (at least ones I can use for compiling on), I have no way of testing or building a plugin for the newer releases of gfortran.

The above installer will install the latest gfortran for command line use only (I should have been more clear above). If you want, you can download the source to the plugin, make the appropriate changes to the gfortran path in the code, recompile and install it. But for me to do this blind would have caused more problems (for me) in terms of debugging user problems.

There currently is no ETA on a plugin that would work in Xcode 3 or higher.

Regards,

Dave

Universal binaries?

We switched to the gfortran from http://r.research.att.com/tools/ because it was able to build universal binary fortran executables (we were unable to do so with Gaurav's previous gfortran). Can anyone comment whether the new build can produce universal binaries?

Good point

No, this won't be able to build universal binaries, I'm pretty sure. I have tried to keep an architecture and OS specific distinction in my gfortran binaries, in part because the download size of these binaries is getting very large. Of course, here at MR now we have put all the binaries in one installer for convenience, which goes in the opposite direction! In addition, I didn't want people to accidently create executables for the wrong arch and end up running it on emulation ..

But this is a good point. Would folks prefer a universal gfortran and be able to create universal executables? Or is a distinction between archs preferred? I personally liek to use "lipo" for creating universal executables.

Thanks,
Gaurav

"Black holes are where God divided by zero." - Steven Wright

plugins explanation for people not using xcode?

Hello,

I am not using Xcode right now on Tiger, but plan on switching to Xcode as a dev environment when I upgrade to Leopard after 10.5.2/Xcode 3.1 (whenever that comes).

Could comeone please explain (or point to a link) that explains the benefits for a gfortran plugin for Xcode, as opposed to simply pointing Xcode towards the gfortran compiler installed from another source like macports?

Thanks!

Re: plugins explanation for people not using xcode?

Could comeone please explain (or point to a link) that explains the benefits for a gfortran plugin for Xcode, as opposed to simply pointing Xcode towards the gfortran compiler installed from another source like macports?

That is the exact purpose of a plugin. You can't just "point" Xcode to any gfortran compiler (or any compiler in general, Organizer aside) without an Xcode plugin for that compiler.

Regards.

Dave

So, I'm guessing the

So, I'm guessing the advantage of the plugin over using the Organizer is that you can compile non-Makefile based projects? Anything else?

My concern is that I would prefer to be able to upgrade gfortran at my whim, rather than relying on a 3rd party to compile gfortran and write a plugin. Maybe I should look into the effort required to write a plugin. A plugin that simply pointed towards a macports installed gfortran would be great!

Re:

1) The whole point of why Apple developed Organizer is that you can't make your own plugins. The plugins provided here are reverse engineered and are not supported by Apple in any way. They can break the spec at any time and the plugins will simply stop working.

2) If you read the updated post above, it tells you explicitly how to set the plugin to point to a different version of gfortran. However, this only applies to the Xcode 3.0 version of the plugin. For version 2.4 you have to download the source, modify it and build and install the plugin on your own.

3) If you want fortran support in Xcode as part of an Xcode project the only supported and blessed by Apple way is to buy the Intel Fortran compilers. This will install an Xcode plugin for their compilers that will work within Xcode directly.

Dave

Re:

Thanks. Is there a place to download the gfortran Xcode 3.0 plugin on its own, or the plugin source? As of now, the only place I see it available is bundled within the 88 meg gfortran 4.3 installer. Damien Bobillot's webpages indicate that he has Xcode 3.0 plugins, but the fortran pages and the sourceforge downloads have not been updated since last september:
http://maxao.free.fr/xcode-fortran-plugin/
http://sourceforge.net/project/showfiles.php?group_id=184878&package_id=218594

Inspecting the package contents of gfortran-4.3-Jan08.mpkg reveals the plugins.pkg to be the Xcode 3.0 fortran plugin. This pkg is only 68k in size. :)

Thanks Gaurav

This is the first fortran on mac that has compiled a very old batch of fortran routines into an executable image, without endless tinkering. What a great way to break in a new MacPro.

Many thanks

Fortran-only projects with gfortran-XCode-Leopard

I have some old Fortran-only projects that were originally developed under UNIX. I successfully ported them to the Mac under Tiger and XCode 2.4 using Damien Bobillot's gfortran plugin. All worked well thanks to that very useful plugin.

Then I upgraded to Leopard and XCode 3.0 where the plugin would no longer work. But now I was happy to see that Damien updated the plugin so I installed the Jan 08 gfortran build downloaded from this page.

Then I basically follow the procedure described in http://macresearch.org/xcode_tutorial_fortran_only_projects. In step 3, when creating a new Fortran main file, the options are somewhat different: There's no Gfortran category like in the example, only Fortran, so I choose untitled, edit the source code with a 'hello world' program, and compile. But the build fails as listed below. Any ideas what goes wrong there?

Thanks for any help,

ruedi

*******
Building target “test” of project “test” with configuration “Release”

Checking Dependencies

FortranCompile test.f
cd /Users/vsteiger/desktop/test
/usr/local/bin/gfortran -pipe -x f95 -c -gdwarf-2 -Os -o /Users/vsteiger/desktop/test/build/test.build/Release/test.build/Objects-normal/i386/test.o /Users/vsteiger/desktop/test/test.f

Ld /Users/vsteiger/desktop/test/build/Release/test normal i386
cd /Users/vsteiger/desktop/test
/Developer/usr/bin/gcc-4.0 -o /Users/vsteiger/desktop/test/build/Release/test -L/Users/vsteiger/desktop/test/build/Release -F/Users/vsteiger/desktop/test/build/Release -filelist /Users/vsteiger/desktop/test/build/test.build/Release/test.build/Objects-normal/i386/test.LinkFileList -arch i386 -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk
Undefined symbols:
"_main", referenced from:
start in crt1.10.5.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

The test.f program is simply

program test
write(*,*) 'hello world'
return
end
*******

Xcode 3.0 with Fortran plugin

Hello vsteiger and all the others!

I have the same problem than you. 10.5.2 with Xcode 3.0 compiles well if Fortran source code is a subroutine. As soon as I want to have it a stand alone application the following error occurs:

Line Location Tool:0: collect2: ld returned 1 exit status
Line Location Tool:0: symbol(s) not found
Line Location Tool:0: start in crt1.10.5.o
Line Location Tool:0: "_main", referenced from:

Any help kindly appreciated.

Regards virk

Unable to open installer

I'm using Tiger with Xcode 2.4.1

I downloaded the Jan 08 build but when I double click on the mpkg (after unzipping) Installer says “couldn’t open “gfortran-4.3-Jan08.mpkg””

I've deleted the file and re-downloaded it and I get the same problem.

Has anyone else encountered this?

Thanks

Jack Snape