gfortran for Leopard
By khanna at Thu, Nov 1 2007 7:45pm |
I have gfortran and gcc 4.3 binaries ready for Leopard using current snapshot GCC sources. Dave has created an installer package for the gfortran binary. This includes separate PowerPC and Intel binaries. Note that this installer does NOT include the XCode plug-in for gfortran.
You can get it from here: MacResearch gfortran Installer
You can also get the gfortran tarball and the gcc 4.3 tarball for Leopard, from my website: hpc.sf.net. Please leave any comments/problems with these binaries here.



Comments
What is the state of the testsuite?
Thanks for the new package. I imagine that, after building the compiler, you've run the testsuite, and it would be really nice if you could post your results (there's a script for that, named contrib/gcc_update, in the GCC codebase) to the gcc-testresults mailing-list. It enables us (gfortran developers) to check on possible regressions (or ameliorations) and fix them, even if we don't have access to a Leopard machine.
In particular: in previous gfortran versions, there were a few Apple bugs (in libc) that impacted corner cases (like, I/O of denormal numbers). I received mails from the Apple radar saying that they were fixed, but I'd really like to make sure: they'd show up as XPASS on a testsuite.
I'll certainly do so ...
Thanks for the interest.
Best,
Gaurav
Leopard and XCode plug-in for gfortran
What are the plans for the future of the XCode plugin? The organizer does seem to take care of some of the issues that the plug-in was created to address but is there any plans to increase some of the functionality? I personally think the organizer is a step in the right direction but it still is just not quite there for me to give up my cherished command line.
Two questions on possible gfortran misconfiguration
Two questions (yes, I am still a novice at using gFortran).
1) When I compile my code using the -arch i386 flag and then look at the Get Info window of the resulting executable it is listed as a PowerPPC Unix executable file. This has been true for a while.
2) Suddenly today, when running my compile script (from the terminal) I am getting the following messages for the compilation of each sub file in my project:
dyld: shared cached file is corrupt: /var/db/dyld/dyld_shared_cache_ppc
When I look in /var/db/dyld/ I see that there is no file (or directory) calleddyld_shared_cache_pp. There is one called dyld_shared_cache_i386.
In face here is the contents of that directory
-rw-r--r-- 1 root wheel 130781184 Nov 6 16:45 dyld_shared_cache_i386
-rw-r--r-- 1 root wheel 39508 Nov 6 16:45 dyld_shared_cache_i386.map
-rw-r--r-- 1 root wheel 157724672 Oct 27 20:53 dyld_shared_cache_i386.tmp1146
-rw-r--r-- 1 root wheel 145911808 Nov 6 16:42 dyld_shared_cache_i386.tmp462
-rw-r--r-- 1 root wheel 161030472 Nov 6 16:51 dyld_shared_cache_rosetta
-rw-r--r-- 1 root wheel 33574 Nov 6 16:51 dyld_shared_cache_rosetta.map
drwxr-xr-x 7 root wheel 238 Sep 23 22:09 shared_region_roots
The result of compiling my project (in spite of these messages) is an executable that works fine.
Both of the issues that I noted here are present if I do a reinstall of gFortran.
...any gems of insight for this non-Fortran person would be kindly appreciated...
Thanks,
David
David Reiss
http://Scientificarts.com/worklife
Re: Two questions on possible gfortran misconfiguration
Hi David,
I haven't seen this particular problem with the latest gfortran build on my Mac Pro. Regarding the listing of the file as being PPC can you do the following in terminal:
cd /path/to/executable
file
Obviously where executable name is the name of the program you compiled. It should return something like this:
macpro:source gohara$ file a.out
a.out: Mach-O universal binary with 4 architectures
a.out (for architecture i386): Mach-O dynamically linked shared library i386
Thanks,
Dave
Re: Re: Two questions on possible gfortran misconfiguration
dreiss 3% file samm2grid
samm2grid: Mach-O executable ppc
So, at least it is consistent with itself (!).
And for completeness, here is the simple shell script that is doing the compilation and linking (again, as I am a novice at this, it was written for me by a friend and is meant to simply do its job, not be clever; but, that doesn't mean it isn't wrong!):
#!/bin/csh -f
#
# script to do a compile in the current working directory
# caveat: all files must participate
#
foreach file ( *.f *.f90 )
gfortran -c $file
end
gfortran -arch i386 -o samm2grid *.o
What is peculiar is that the issue with the dyld_shared_cache_ppc file only appeared today, which suggests that for some reason that file was deleted or whatever manages that file is not doing its job (I am grasping at straws here...). I will try to create such a file with the appropriate permissions and see whether the problem goes away (or whether if fries my computer [MacBook Pro]) .
David Reiss
http://Scientificarts.com/worklife
Re; Re: Re: Two questions on possible gfortran misconfiguration
Are you sure you installed the Intel version and not the PPC version of gfortran (or that both weren't selected during the install process)? I don't see anything wrong with what you are doing.
I'd check in /usr/local/lib/gcc (do an ls in that directory and post the contents) it'll be apparaent quickly if the wrong one is installed. If you see a subfolder called powerpc-something then the PPC version got installed.
Let me know,
Dave
RRe; Re: Re: Two questions on possible gfortran misconfiguration
Thanks Dave....
I went to /usr/local/lib/gcc and in there there were four items. Two each of the i386 and the ppc directories with each type the recent and the previous version. So I deleted them all and reran the gFortran installer, selecting only the i386 choice.
Now both of the problems that I originally reported have been resolved. And, voila,
dreiss 21% file samm2grid
samm2grid: Mach-O executable i386
Thank you very much for your hand-holding. I appreciate it very much...
David Reiss
http://Scientificarts.com/worklife
gdb warning list
This really isn't critical to using the gfortran binary but whenever gdb starts up it gives a list of warnings of the following flavor:
warning: Could not find object file "/Users/admin/build/i386-apple-darwin9.0.0/libgcc/emutls_s.o" - no debug information available for "../../../gcc-4.3-20071026/libgcc/../gcc/emutls.c
I would post all of them but it's a long list and they are all along these lines. Is there a path that is not being set? This results from the gfortran tarball from the hpc site.
Fortran plug-in
Hello !
I'm completly lost. I would like to install gfortran compiler on my new MacBook pro which I just bought.
I really don't understand what to do :(
I installed so many things from here or there and it doesn't want to work.
It works using the terminal : gfortran -o executable source.f90.
What should I do to install fortran for Xcode 3.0 ?
What did I miss ?
Thank you
kabouly
Gfortran and Xcode
Unfortunately the Xcode plugins no longer work with Xcode 3.0. But Apple have introduced a tool in Xcode 3.0 called 'Organiser' that allows you to build fortran projects.
There was a article on MR about Organiser a week or so ago.
Drew
---------------------------
Drew McCormack
http://www.maccoremac.com
http://www.macanics.net
http://www.macresearch.org
Nonconforming tab with new compiler
I recently updated to Leopard. I just installed the gfortran version for Leopard. When I compiled my fortran 95 code, that was written in Xcode 2.4.1, I got 554 error messages of the type:
Warning: Nonconforming tab character at (1)
These error messages didn't show up when I used the Tiger version of gfortran that I downloaded from this site. What can I do about this?
GDB?
Have you been able to get gdb to work on Leopard with the latest (jan. 08) binaries from G.Khana? I'm on a macbook (intel) and am getting the warnings about not found objects.
gdb problem
I'm running into the same gdb problem. When I load any executable using gfortran in gdb, I see about 20 pages of this:
warning: Could not find object file "/Users/admin/build/i386-apple-darwin9.0.0/libgfortran/.libs/_atan2_r10.o" - no debug information available for "../../../gcc-4.3-20071026/libgfortran/generated/_atan2_r10.F90".
warning: Could not find object file "/Users/admin/build/i386-apple-darwin9.0.0/libgfortran/.libs/_mod_i4.o" - no debug information available for "../../../gcc-4.3-20071026/libgfortran/generated/_mod_i4.F90".
warning: Could not find object file "/Users/admin/build/i386-apple-darwin9.0.0/libgfortran/.libs/_mod_i8.o" - no debug information available for "../../../gcc-4.3-20071026/libgfortran/generated/_mod_i8.F90".
warning: Could not find object file "/Users/admin/build/i386-apple-darwin9.0.0/libgfortran/.libs/_mod_r4.o" - no debug information available for "../../../gcc-4.3-20071026/libgfortran/generated/_mod_r4.F90".
warning: Could not find object file "/Users/admin/build/i386-apple-darwin9.0.0/libgfortran/.libs/_mod_r8.o" - no debug information available for "../../../gcc-4.3-20071026/libgfortran/generated/_mod_r8.F90".
warning: Could not find object file "/Users/admin/build/i386-apple-darwin9.0.0/libgfortran/.libs/_mod_r10.o" - no debug information available for "../../../gcc-4.3-20071026/libgfortran/generated/_mod_r10.F90".
warning: Could not find object file "/Users/admin/build/i386-apple-darwin9.0.0/libgfortran/.libs/misc_specifics.o" - no debug information available for "../../../gcc-4.3-20071026/libgfortran/generated/misc_specifics.F90".
warning: Could not find object file "/Users/admin/build/i386-apple-darwin9.0.0/libgfortran/.libs/dprod_r8.o" - no debug information available for "../../../gcc-4.3-20071026/libgfortran/intrinsics/dprod_r8.f90".
This is definitely an issue with this gfortran, as I don't see this issue using other platforms with different gfortran versions.
Any help would be appreciated.
No man entry for this gfortran binary?
I really appreciated this post for the two links to the snow-leopard gfortran binary.
My only question is, why doesn't this binary include a man entry ( or does it?). I know this is not a big deal but it is quite convenient to just type "man gfortran" when figuring something new out. I have followed all installation instructions given at hpc.sf.net as well as installing the package given by MacResearch. Please let me know if im doing something wrong or if it is just not included?
Thanks you!
cannot find object files
Did the previous question about gdb warnings: could not find object file...
get resolved? I am running into the same problem.
I'm using gdb ver 6.3.50 on a Mac Intel, ver. 10-5.8. do I need to update
my gdb version perhaps?
Thanks, Paquita Zuidema
Rosenstiel School of Marine and Atmospheric Science
Miami, FL
gfortran
This has worked well for me on OS X 10.5.8. Will it work 10.6 (Snow Leopard) or will the binaries be different?
GFortran and the NetBeans IDE
Hi There,
Many thanks for putting up this useful GNU fortran package. I do have one small problem that I am unsure how to resolve.
I use the NetBeans IDE which is currently working well with the GNU C/C++ compilers bundled with XCode. NetBeans can utilise the same functionality provided by a fortran compiler but because GCC is currently in
/usr/binand GFortran installs to/usr/local/binI cannot get them to work together because they are in different base directories.Is there a method for merging the GFortran installation made by this package with the existing GCC compiler located in
/usr/bin?Cheers,
Phil