Instructions for older versions of Mac OS X (10.6 - 10.10) Instructions for installing the GNU compilers for older versions of Mac OS X (10.6 - 10.10) have been moved and are available on another page. Tips & Warnings. I mention all but the last of these tips and warnings in the text above, but it doesn't hurt to list them a second time. Inspired by the classic 8-bit game Elite, it features many similar aspects of gameplay. You can travel to different planetary systems, encounter challenges and embark on missions in a quest for wealth and glory. Oolite runs on Mac OS X (10.6 or later), Windows (XP or later), and Linux, and does not require the latest hardware except for certain. An IDE or Integrated Development Environment is a way of having at your fingertips the resources to develop an application using MPW Macintosh Programmers Workshop as well as C or C compiler, Debugger, RESEdit (resource editor) and additional no.
Operating System : Mac OS* X 10.7 aka 'Lion' Support Status: July 19, 2011 Intel Fortran Composer XE 2011 for Mac OS* X and the Intel C++ Composer XE 2011 for Mac OS* X do not officially support use under Mac OS* X 10.7 'Lion'. This also applies to official support for integration into Xcode 4.1 - this configuration is not supported at this time. At this time Intel does not officially support use under Mac OS* X 10.7 and/or integration into Xcode* 4.1. Compilers versions 11.1 and older are known to NOT work under Lion, and these older compilers will not be updated to work for Lion. A future update of the 12.x compiler will support Lion, but the currently released 12.0 Update 4 also does NOT support Lion. Do not upgrade to Lion if you need a working Intel compiler until we officially support Lion. Official Intel compiler support for Lion will occur sometime after official release of Lion by Apple, whenever that may be. Typically, Intel attempts to have a compiler update or release to support a major Mac OS* X release within 3 months or less of official launch. Intel will alert customers to official support in the Release Notes of a compiler update or major release along with notices on our User Forums: C++ User Forum: /en-us/forums/intel-c-compiler/ Fortran Linux/Mac User Forum: /en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/ While official support is currently not available, users may find that their existing Intel compilers for Mac OS X may or may not work as expected in this environment. We do begin early testing during beta phases of Lion and will attempt to make our compilers compatible as soon as possible after official release. Official support will follow official release of Lion and sufficient time to qualify our compilers under the officially released OS, and must synchronize with our internal release schedules for the compilers. Again, typically this is 3 months or less after official OS release. Fortran Note: The Intel Fortran compiler integration into Xcode is a 'Limited Feature', meaning that not all functionality within Xcode is available to Fortran users. In particular, module dependencies are not detected and not respected: a user must manually compile modules in dependency sequence. Also, the built-in Xcode debugger is not Fortran language aware, making debug rudimentary and problematic. These and other current 'Limited Feature' Fortran integrations into Xcode are also expected in the integration into Xcode 4.1. This does not apply to users of Intel C++ for Mac OS X. ADDITIONAL INFORMATION: For a complete list of support resources, Forum, Downloads, Licensing, and other resources for Intel Fortran Compiler for Mac OS* X, visit our Knowledge Base here: /en-us/articles/intel-fortran-compiler-for-mac-os-x-kb-home For a complete list of support resources, Forum, Downloads, Licensing, and other resources for Intel C/C++ Compiler for Mac OS* X, visit our Knowledge Base here: /en-us/articles/intel-c-compiler-for-mac-os-x-kb-home [DISCLAIMER: The information on this web site is intended for hardware system manufacturers and software developers. Intel does not warrant the accuracy, completeness or utility of any information on this site. Intel may make changes to the information or the site at any time without notice. Intel makes no commitment to update the information at this site. ALL INFORMATION PROVIDED ON THIS WEBSITE IS PROVIDED 'as is' without any express, implied, or statutory warranty of any kind including but not limited to warranties of merchantability, non-infringement of intellectual property, or fitness for any particular purpose. Independent companies manufacture the third-party products that are mentioned on this site. Intel is not responsible for the quality or performance of third-party products and makes no representation or warranty regarding such products. The third-party supplier remains solely responsible for the design, manufacture, sale and functionality of its products. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. *Other names and brands may be claimed as the property of others.] Compiling PGPLOT on Mac OS Xa guide for the perplexed
Benjamin Weiner, May 2012
PGPLOTPGPLOTis a library of plotting subroutines written by Tim Pearson,callable from Fortran and C,that have been used in a variety of astronomy programs, andsome other software packages.PGPLOTis free for non-commercial use and downloadable as source.Although a new version has not appeared for some time, it is convenient, flexible, and many people anda number of useful programs depend on it.OS X issuesHistorically you typically installed PGPLOT by either compilingfrom source or installing a software package that includeda compiled library (libpgplot.a) and various other stuff likefonts. This used to be fairly easy on Linux or Mac, butstarting around OS X 10.6 and/or 64-bit CPU Macs, I and otherpeople had difficulty compiling PGPLOT on OS X. Typicallyone gets an error message like: /usr/bin/ranlib: archive member:libpgplot.a(grdate.o) cputype (16777223) does not match previousarchive members cputype (7) (all members must match).
If you googlearound you can find lots of puzzled people, and a number of webpages that suggest workarounds (not all of which are specificallyfor 10.6; none have solved theproblem for me). I've diagnosed the issue and provide herea couple of configuration files which you can add to a regularPGPLOT source distribution so it will compile correctly.
Instructions for fixing and installing PGPLOT
If you ran sudo make cpg you will also have libcpgplot.a.
Compiling and running programsTo compileprograms using it, link to /usr/local/lib/pgplot/libpgplot.a/usr/X11/lib/libX11.dylib
For example g77 -o myprog myprog.f /usr/local/lib/pgplot/libpgplot.a/usr/X11/lib/libX11.dylib
To run programs with PGPLOT, don't forget to set the environmentvariable PGPLOT_DIR to the library directory. Otherwise itcan't find the fonts at runtime. This is best done in a startup filelike .bash_profile or .cshrc, for example for bash: export PGPLOT_DIR=/usr/local/lib/pgplot ; and for csh: setenv PGPLOT_DIR /usr/local/lib/pgplot
You must use the same compiler foryour program that you used for the library: g77 OR gfortran. Youcould compile PGPLOT libraries with the two compilers in two differentdirectories and use one or the other as needed.
The /xs device should work when run from a mac Terminal, but /xtwon't. /xt will work when run from an xterm under X11.
If you want to get the /PNG driver to work, uncomment it indrivers.list, and after running makemake andbefore compiling, edit the makefile to comment out the following line:pndriv.o : ./png.h ./pngconf.h ./zlib.h ./zconf.h . This hasan incorrect location for the PNG library header files which causescompilation to fail.
If for some reason you need to make the libpgplot.so shared object (dynamically loaded) library, you should be able to do this by uncommentingthe lines in the .conf file (gfortran_gcc_32.conf or similar)that read SHARED_LIB='libpgplot.so' and SHARED_LD='gcc -shared -o $SHARED_LIB', before running the 'makemake' step.
Configuration files on githubThe new configuration files and these instructions are also availablefrom my github page for PGPLOT configuration. You can fork them or issue a pull request if you have modifications.Free C++ Compiler For Mac Os XWhy this worksMac OS X for 64-bit machines allows you to run 32 or 64 bitbinaries. But the inexplicable error message from ranlib above iscomplaining that it can't mix object files compiled for 32 bit cputype(i386) and 64 bit (x86_64) into a single object library archive, thelibpgplot.a file.
The problem is that PGPLOT source is actually a mix of Fortran andC. The Fortran compilers compile into 32-bit by default (g77is only 32 bit capable) and the C compiler now compiles into 64 bit bydefault. So ranlib has to mix 32 and 64 bit object files and it can'tdo that. This is why it only became a problem with 64 bit Macs andOS X 10.6. The new config files force the C compiler to compile in 32bit with the '-m32' option. So then the files are all 32-bitand it compiles ok. For 64 bit the config file forces gfortran tocompile in 64 bit with '-m64'.With Apple's C compiler you can also use '-arch i386' and '-archx86_64' to force 32 or 64 bit. The '-m32' and '-m64' options shouldwork with a non-Apple gcc, although I have not tested them.
C Compiler For Mac Os X 10.66 Snow Leopard
Other notes: I have not tested all the more exotic drivers and library locations, and if you do something arcane like use aPGPLOT-Tk interface, it may require adjustment.See above for how to get the PNG driver to work by editing the makefile.
I tested this on OS X 10.6 Snow Leopard, and have not tested PGPLOT on OS X 10.7 Lion myself, although users have reported it working on later OSes including Mavericks. I have a reportthat forcing the 64-bit option by using a configuration similar to'gfortran_gcc_64' will work, so try that.
Where to get compilersApple's gcc C compiler comes with Xcode, their development kit. Xcodewas on my OS X install CDs, but is not installed by default. You canalso download it from Apple.
Mac OS X versions of gfortran, g77, and non-Apple versions of gcc can be downloaded from http://hpc.sourceforge.net/.The HPC page does not have quick links to binaries of the compilersfor older versions of Mac OS X, but they are in the file tree athttp://sourceforge.net/projects/hpc/files/hpc/. Some other useful information about Fortran and Mac is listed here.
Contact:
My software page.
Back to my home page.
Benjamin Weiner, email bjw at as.arizona.edu
29 May 2012, updated 6 June 2012, 10 April 2013, 18 Nov 2014
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2020
Categories |