I am attempting to build Google Breakpad for Mac OS X as a part of porting an application, based on the trunk revision 782. The Breakpad wiki specifies that one should build client/mac/Breakpad.xcodeproj, which produces a Breakpad.framework including a dynamically linked lib if I understand correctly. There is also sample code on how to use this from an Objective-C application, but all this. If your Mac is using a firmware password, you're prompted to enter the password. Option-Command-P-R: Reset NVRAM or PRAM. If your Mac is using a firmware password, it ignores this key combination or starts up from macOS Recovery. Shift (⇧): Start up in safe mode. Disabled when using a firmware password. D: Start up to the Apple Diagnostics. Updated July 27. Article originally posted July 25. The Mac's move to ARM is an exciting one for Apple, but it is one with some major problems along the way.One of the biggest problems is the. Find Adventure games for macOS like Rope Cow: Rope it to The Cow, Knight Night, World Zombie Survival FPS, Jaland, Pocket Watch on itch.io, the indie game hosting marketplace.
If you're a scientist with a new Apple computer, read on. This page assumes you want to write scripts, reduce data, plot results, work with LaTeX, and give presentations, among other handy things. This is not a tutorial.
As a brief introduction: Mac's operating system is called 'OS X' or now 'macOS'. It is a version of BSD Unix with a fancy graphical interface. Because unix is the engine, you can use your favorite linux tools, plus prettier programs written for Macs.
Many of these apps are large files and will take a while to download. You should be on a good internet connection and allow at least a couple hours to complete the entire setup.
Find out which version of OS X you have. Click the apple in the upper lefthand corner of your screen, and choose 'About This Mac.' |
Default is bash and is recommended.
To change your default shell, look under 'System Preferences' and open the 'Users & Groups' panel. If the padlock icon in the lower left corner is locked, click on it and authenticate. Then right click (or Ctrl-click, or two-finger tap) on your user account in the account list on the left hand side. Select the 'Advanced Options' option when it appears. Change your 'Login Shell' setting by selecting or typing '/bin/tcsh'. Don't change anything else in here, these are dangerous settings.
Testing: Start up the 'Terminal' application, and type 'echo $SHELL'. A full logout / login or system reboot may be needed for the shell change to register in Xquartz / X11. Speaking of which.
X11 is the standard linux graphical window environment and most astronomical software (and anything written for li/unix) requires X11. Terminal is built-in and will work for basic commands, but X11 is required for graphics. The XQuartz project is an open-source effort to develop a version of the X.Org X Window System that runs on OS X.
OS10.8, 10.9, 10.12: Download XQuartz (~70 MB)
OS 10.7 and earlier: X11 is already pre-installed. You may wish to install Xquartz anyway (link above).
To initiate an X11 session: Launch XQuartz from Applications/Utilities. You will then be able to launch xterm instances from the 'Applications' menu. |
XCode includes the standard C compiler (gcc) and command line tools (e.g., make, tar, gzip, vi) that are necessary so that you can use the terminal's full suite of commands as you would in a linux enivornment.
OS X 10.7, 10.8, 10.9, 10.12:
- Install XCode (1.5 GB) from the App Store. (The App Store should be available as an icon in your Dock.)
- Install Command Line Tools
- 10.9: Command Line > xcode-select --install
- 10.8:
- Launch XCode from Applications
- Go to XCode 'Preferences > Downloads > Components' and install the 'Command Line Tools.'
- Restart your Mac.
- 10.12
xcode-select --install
- Agree to Xcode license in Terminal:
sudo xcodebuild -license
- Additional help with XCode installation and its many uses is here: XCode Support
- (Optional) Install a standard Fortran compiler, gfortran (38 MB). Download and move to /usr/local/bin
OS X 10.6 and Earlier:
- Install Apple's binary version of gcc: Insert the DVD/CD that came with your computer into the drive. Use Finder to search the disk for 'XcodeTools.mpkg'. Double-click to install. This gives you gcc, Java, and many other developer tools. To learn more, read 'About Xcode Tools.pdf' on your install disc.
Test the install by checking the gcc install via the command line. Roustabout mac os. > which gcc |
Now would be a good time to install MacPorts (via package) and start downloading and compiling your favorite MacPorts packages. Check out the MacPorts 101 page for an introduction, overview, and usage pointers. Each package gets installed (along with its dependencies) via 'sudo port install ', and you can list available packages by search string via 'port search '. Here is a list of likely packages:
- emacs +x11 (assuming you want the X11-savvy version)
- aspell and aspell-dict-en
- texlive
- R
- wget and gv and xv and/or gimp
- xfig and GraphicsMagick
macOS 10.12: We recommend installing Anaconda and AstroConda (optionally with IRAF support).
OS 10.8, 10.9: See the page Installing Scientific Python via the Python4Astronomers group for discussion - they recommend Anaconda. With a little more work and a lot more time (everything compiled from source), you can install Python using MacPorts. Cumanbins mac os. Finally, you may want to consider a Ureka install, which includes Python 2.7, the most popular scientific Python tools, pyraf, and IRAF.
Under the default Ureka setup, you will only have access to the Python tools in a given login session after running the 'ur_setup' script. If you want these tools to be available by default, you should call the script from within your .cshrc or equivalent startup file.
Test your Ureka installation: > ur_setup |
IRAF/PyRAF
- The recommended way to get Python + IRAF + PyRAF (stsci_python) is to install Ureka (see above), an easy-to-install binary distribution from STScI and Gemini. You can find more information and installation instructions here: http://ssb.stsci.edu/ureka/. Click on the link for the latest version (not the development version).
- IRAF 2.16 is included with Ureka.
Not Recommended (because it's not trivial): install IRAF from NOAO - 10.12: IRAF can be optionally install with AstroConda (only python 2.7).
- DS9 can be installed via MacPorts (sudo port install ds9). Here is an XPA error page for getting DS9 to play with PyRAF/IRAF (unverified recipe: include export XPA_METHOD=local in .bashrc or setenv XPA_METHOD local in .csrhc)
- Heasarc's fv fits viewer is handy for visualizing FITS files.
- Skycalc, by John Thorstensen, provides almanac, ephemeris, and airmass information, invaluable for planning observing runs. Jskycalc is the new graphical version that runs on any platform, and has an AstroBetter walkthrough. Also available as the classic shell version.
- Multinest, PyMC, or emcee for Bayesian statistical analysis.
See the IDL install and setup page.
Via MacPorts: 'sudo port install texlive' is the command you're looking for. Further discussion at the LaTex install and setup page
See the dedicated Mac Apps page for suggestions
- Mac native version is updated now (as of June 2015), but if it falls off again the below can give you easier integration with Finder and the like via an Automator app you create yourself after installing DS9 via MacPorts (or whatever). These instructions assume you installed via MacPorts, so change the first line of the bash snippet to whatever you need. Tested in 10.7.5 and again in 10.9.5.
- Launch Automator
- Choose a document type as 'Application'
- Choose an action: Library -> Utilities -> Run Shell Script
- At the top, change the 'Pass Inputs' type to 'as arguments'
- Paste the following into the code box (removing whatever's in that box to begin with)
- # Change this line to whatever you need to get ds9 (and libs) in the path.# This should work for MacPorts. PATH changes you make elsewhere aren't## NOTE: It should just be single square brackets, not doubles.# Sometimes Wiki formatting things single square brackets are links, so doubles are a defenseexport PATH=/opt/local/bin:/opt/local/sbin:$PATHif [[ $# 0 ]]; thenelsefi
- Save it (File -> Save) somewhere with a nice name (such as DS9) in /Applications (or you can save it somewhere in your home dir and drag it in).
- Find a FITS file and open the 'Get Info' pane. Choose to Open with Other. and select the DS9 thing you've saved from step #7, click 'Add', then 'Change All.' to associate all .FITS files with ds9.
- Rejoice!
Additional hint: If you're adapting this to work with some other X11 app, you might need to set other environment variables; Spyder required LANG to be set, otherwise some things (e.g. astropy.io.fits) would fail with a locale error.
Selecting multiple FITS files to open opens them as seperate frames, and launching it via the Applications menu (such as in your dock) opens ds9 by itself. Yay!
- Configure CUPS for printing from the command line with lpr. (Following commands modify ~/.cups/lpoptions)
Set default printer:
Make duplex printing default:
- Show hidden files
- 10.9 - in Terminal, execute this command then restart (ref):
- 10.8 and earlier
- If you're converting to a Mac from a Linux system, the behavior of home, end, pg up, and pg down are probably driving you absolutely insane in a terminal. This blog post fixed it for me, in the terminal at least. (tested in OS X 10.7.x)
- Swap Control and Caps Lock Key: Easier on the fingers for emacs/unix users.
- System Preferences -> Keyboard and Mouse -> Keyboard -> Modifier Keys
- Just switch the two with a drop down box.
- Still needed in 10.8?Enable X11 Click Through:more info. In a terminal, do the following:
- >10.5.5 or later:
- earlier than 10.5.5:
Old Stuff (Only relevant for 10.4 or earlier)
![Krabstadt - arrabbiata wants a raise mac os - Krabstadt - arrabbiata wants a raise mac os -](https://img.itch.zone/aW1hZ2UvODAwMjUzLzQ1MDg2NTYucG5n/original/Ce1aoP.png)
- Configure CUPS for printing from the command line with lpr. (Following commands modify ~/.cups/lpoptions)
Set default printer:
Make duplex printing default:
- Show hidden files
- 10.9 - in Terminal, execute this command then restart (ref):
- 10.8 and earlier
- If you're converting to a Mac from a Linux system, the behavior of home, end, pg up, and pg down are probably driving you absolutely insane in a terminal. This blog post fixed it for me, in the terminal at least. (tested in OS X 10.7.x)
- Swap Control and Caps Lock Key: Easier on the fingers for emacs/unix users.
- System Preferences -> Keyboard and Mouse -> Keyboard -> Modifier Keys
- Just switch the two with a drop down box.
- Still needed in 10.8?Enable X11 Click Through:more info. In a terminal, do the following:
- >10.5.5 or later:
- earlier than 10.5.5:
Old Stuff (Only relevant for 10.4 or earlier)
- IRAF at MacSingularity , If you need to IRAF for PowerPC and 10.4, use MacSingularity
- Install DesktopManager (10.4 Tiger Only) In Tiger, and on PPC macs, this gives you a multiple desktop option. Spaces will replace this in Leopard and I don't think Desktop Manager is Universal. Note : Most of the non-Apple virtual desktop programs are going away, due to Spaces (such as VirtueDesktops).
- X11 on Leopard 10.5 is very different than on Tiger 10.4 and may cause some issues. Options include installing Tiger's X11 or installing some patches. The latest X11 patches from XDarwin appear to fix the majority of the issues with the possible exception of X11 full screen mode.
- Setup a 3-button Mouse: This sets up right click and paste with middle mouse button in Terminal/X11.
- System Preferences -> Keyboard and Mouse -> Mouse
- Set left button to Primary Button
- Set middle (scroller) button to Button 3
- Set right button to Secondary Button
- Install X11: If you have OS X 10.4 or earlier, you can install X11 from the DVD or CDs that came with your computer. To do this, insert the install disk and user Finder to search for 'X11User.pkg'. (Finder is the blue happy face in the Dock.) Double-click on X11User.pkg, and X11 should install.
This document is a step-by-step recipe to get your Mac client app to build with Breakpad.
Preparing a binary build of Breakpad for use in your tree
You can either check in a binary build of the Breakpad framework & tools or build it as a dependency of your project. The former is recommended, and detailed here, since building dependencies through other projects is problematic(matching up configuration names), and the Breakpad code doesn‘t change nearly often enough as your application's will.
Building the requisite targets
All directories are relative to the src
directory of the Breakpad checkout.
- Build the ‘All' target of
client/mac/Breakpad.xcodeproj
in Release mode. - Execute
cp -R client/mac/build/Release/Breakpad.framework
- Inside
tools/mac/dump_syms
directory, build dump_syms.xcodeproj, and copy tools/mac/dump_syms/build/Release/dump_syms to a safe location where it can be run during the build process.
Adding Breakpad.framework
Inside your application‘s framework, add the Breakpad.Framework to your project's framework settings. When you select it from the file chooser, it will let you pick a target to add it to; go ahead and check the one that's relevant to your application.
Copy Breakpad into your Application Package
Copy Breakpad into your Application Package, so it will be around at run time.
Go to the Targets section of your Xcode Project window. Hit the disclosure triangle to reveal the build phases of your application. Add a new Copy Files phase using the Contextual menu (Control Click). On the General panel of the new ‘Get Info' of this new phase, set the destination to ‘Frameworks' Close the ‘Info' panel. Use the Contextual Menu to Rename your new phase ‘Copy Frameworks' Now drag Breakpad again into this Copy Frameworks phase. Drag it from whereever it appears in the project file tree.
Add a New Run Script build phase
Near the end of the build phases, add a new Run Script build phase. This will be run before Xcode calls /usr/bin/strip on your project. This is where you'll be calling dump_sym to output the symbols for each architecture of your build. In my case, the relevant lines read:
Adjust the Project Settings
- Turn on Separate Strip,
- Set the Strip Style to Non-Global Symbols.
Write Code!
You‘ll need to have an object that acts as the delegate for NSApplication. Inside this object's header, you'll need to add
- add an ivar for Breakpad and
- a declaration for the applicationShouldTerminate:(NSApplication
*
sender) message.
Inside your object's implementation file,
- add the following method InitBreakpad
- modify your awakeFromNib method to look like the one below,
- modify/add your application's delegate method to look like the one below
Configure Breakpad
Configure Breakpad for your application.
- Take a look inside the Breakpad.framework at the Breakpad.h file for the keys, default values, and descriptions to be passed to BreakpadCreate().
- Add/Edit the Breakpad specific entries in the dictionary passed to BreakpadCreate() -- typically your application's info plist.
Example from the Notifier Info.plist: BreakpadProductGoogle_Notifier_Mac BreakpadProductDisplay${PRODUCT_NAME}
Build Your Application
Almost done!
Verify
The armoire mac os. Double-check:
Your app should have in its package contents: myApp.app/Contents/Frameworks/Breakpad.framework.
The symbol files have reasonable contents (you can look at them with a text editor.)
Krabstadt - Arrabbiata Wants A Raise Mac Oscar
Look again at the Copy Frameworks phase of your project. Are you leaking .h files? Select them and delete them. (If you drag a bunch of files into your project, Xcode often wants to copy your .h files into the build, revealing Google secrets. Be vigilant!)
Upload the symbol file
You'll need to configure your build process to store symbols in a location that is accessible by the minidump processor. There is a tool in tools/mac/symupload that can be used to send the symbol file via HTTP post.
- Test
Configure breakpad to send reports to a URL by adding to your app's Info.plist:
Final Notes
Krabstadt - Arrabbiata Wants A Raise Mac Os -
Breakpad checks whether it is being run under a debugger, and if so, normally does nothing. But, you can force Breakpad to function under a debugger by setting the Unix shell variable BREAKPAD_IGNORE_DEBUGGER to a non-zero value. You can bracket the source code in the above Write The Code step with #if DEBUG to completely eliminate it from Debug builds. See //depot/googlemac/GoogleNotifier/main.m for an example. https://wy-bonus-frog-free-chips-slots-konami.peatix.com. FYI, when your process forks(), exception handlers are reset to the default for child processes. So they must reinitialize Breakpad, otherwise exceptions will be handled by Apple's Crash Reporter.