Astrophysics Apple Developers' Page

Please note: This is a temporary version of this page, intended to get the information out to users in a timely fashion. In particular, links to old information on the AstroWiki, here and elsewhere, will be replaced by links to this Webserver, as and when time permits.

Finding libraries and executables

Please see also:

Astrophysics: Available Software
Available software: wrapper scripts
Astrophysics: MacOS X Development Tools
Application Setup
Libraries

Clickable programs

These will usually be in or under /Applications, or one of its subdirectories:

  • /Applications/MacPorts

    Applications installed by MacPorts

  • /Applications/Scisoft # (DEPRECATED)

    A symbolic link for Scisoft clickables

Tip of the Day: Drag /Applications from Finder into the right-hand part of Dock: this gives you a clickable icon for each directory, from which you can get a grid or menu of everything therein. This reduces the need to clutter up the left-hand part of Dock with quite so many individual launch icons. Don't forget to control-click on the icon, then select List under "View contents as", unless you prefer the "banana" display. (Minions need not apply.)

If you like this, repeat the exercise with such directories as /Applications/Utilities and /Applications/MacPorts, to taste.

Command-line executables

The more important and widely-used software (including the C and Fortran compilers, and LaTeX) will be on your $PATH already, and are thus directly accessible without further ado. If not, the appropriate Activation (qv) will do the necessary magic for you.

Commands to try at the shell prompt:

  • See if it's already on your $PATH:

    which gnuplot

  • Show that it's in MacPorts (and the now-deprecated SciSoft) with version information, and that there's also a wrapper script:

    Activate search gnuplot

  • Elect to use the Scisoft version (WARNING: this is now serious "it's your neck" territory):

    Activate scisoft

  • Show all versions along $PATH:

    \which -a gnuplot

The backslash in the last example is important: this bypasses the csh built-in "which" (which doesn't take the "-a" argument, but which can see aliases and builtins), so that the command sees the executable /usr/bin/which (which does, and can't, respectively). A more verbose alternative command for us Bourne-shell users is "type", which does know about builtins, aliases and shell functions, and does take the "-a" argument.

PLEASE NOTE: This might not be the best example, as the wrapper script (qv) tries hard to Do The Right Thing on your behalf, and with reason. It is retained here for educational and historical reasons: your Humble Author was once asked "How do I install GNUplot?", and was inspired by the ensuing manual search to add the help and search facilities to Applications Setup.

We repeat: use of SciSoft is now deprecated on APple Macs.

Libraries

.... a show-and-tell:

  • Where is it? ---

    Activate search pgplot

  • --- in Starlink:

    Activate starlink

  • Show where the compilers will be looking:

    printenv | grep LIBRARY

  • Check what the make utility might be told to tell the compilers (SciSoft does this):

    printenv | grep FLAGS

  • Use the OS X version of classic UNIX find (rather faster):

    mdfind -name pgplot

Please note: The full path displayed by mdfind (or find, or in other jurisdictions locate) is the "canonical" pathname, which resolves away all the helpful symbolic links by which package maintainers try to make your life simpler (by eliding version information and shortening convoluted multi-part pathnames). If you use the canonical path yourself directly, eg by putting it in your scripts or Makefiles, this can lead your build process seriously astray when the location of the installed library is changed by it (or the distribution it's a part of) being updated to a new version, or by you attempting to use said scripts or Makefiles under (eg) Linux without change.

Advanced Player note: The Wise User will only employ mdfind (etc) to discover whether a file or library exists on the system at all, and in which suite(s) its assorted versions may be. One should use a version-specific pathname directly only as a desperate last resort. If in doubt, please contact Physics IT Support at the usual e-mail address: if we've put it there, we'll usually know how to invoke it in a more generic fashion, and which suites and versions are less well supported.

Categories: Apple | Astro software | Astrophysics | Development | Mac | OS X