G77/mountain lion/xcode 4.6 help

  • Thread starter Thread starter zfisher
  • Start date Start date
Click For Summary
SUMMARY

The discussion focuses on the challenges of compiling Fortran code using g77 on macOS Mountain Lion 10.8.4 with Xcode 4.6. The user, Zachary Fisher, reports receiving linker warnings related to the -macosx_version_min and PIE settings when attempting to compile with g77 version 3.4.0. Despite successfully compiling with gfortran 4.8.1, the need for g77 arises due to legacy code requirements from graduate students in the Geological Sciences department at UNC-CH. The community suggests using the full path to g77 to troubleshoot the "no match" error encountered during compilation.

PREREQUISITES
  • Understanding of macOS Mountain Lion 10.8.4 environment
  • Familiarity with Xcode 4.6 and its command-line tools
  • Basic knowledge of Fortran compilers, specifically g77 and gfortran
  • Experience with linker settings and compilation flags in Unix-like systems
NEXT STEPS
  • Research the differences between g77 and gfortran, focusing on compatibility issues
  • Learn how to configure linker settings in Xcode for legacy code compilation
  • Explore alternative methods for compiling Fortran code on macOS, such as using Homebrew
  • Investigate community forums for additional support on g77 and macOS compatibility
USEFUL FOR

This discussion is beneficial for systems administrators, Fortran developers, and academic researchers who need to compile legacy Fortran code on modern macOS systems, particularly those using older compilers like g77.

zfisher
Messages
1
Reaction score
0
First, let me state that I know g77 is no longer supported.

Second, I'm not a fortran developer, I'm simply trying to set up a lab for some grad students in the Geological Sciences department at UNC-CH.

I volunteered to help them set up there new lab with a brand new software image, including the following:

Mountain Lion 10.8.4
Xcode 4.6
Fink 0.35.1
gfortran 4.8.1 (downloaded from hpc.sourceforge.net)
g77 3.4.0 (also downloaded from hpc.sourceforge.net)
among others...

I can compile just fine with gfortran, but when I attempt to compile anything with g77 (even a simple hello.f) I receive the following error:

ld: warning: -macosx_version_min not specified, assuming 10.7
ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in __start from /usr/lib/crt1.o. To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie

I've done a fair amount a research, but most solutions are to "stop using g77". And while I agree that that would be the ideal solution, the PI and grad students are adamant they need g77 to compile some of their older code.

FWIW, if I run: g77 hello.f [-no_pie] I receive the following response:
g77: no match.

Any help would be very much appreciated. If there is another/better avenue to request support, I'd be happy to follow those recommendations as well. I can't be the only person trying to get g77 to compile on a freshly installed copy of mountain lion, right?

Thanks so much in advance,
Zachary Fisher
Systems Administrator, UNC-Chapel Hill
 
Technology news on Phys.org
no match??

I've neither experience with g77 nor Mountain Lion, so I might not be much help, but one thing is not clear: why do you get a g77 "no match"? What happens when you run g77 with the full path (ie, /dir/to/g77 hello.f [...])?
 
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K