Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0004103Dwarf FortressTechnical -- Generalpublic2011-03-01 16:452014-08-05 16:53
Toady One 
MacOS X10.7 (11A390)
0004103: Command line client does not launch on OS X 10.7 Lion (READ FOR FIX)
When launching df on OS X 10.7, dwarf fortress crashes.
1. Download DF Mac version
2. Run ./df
3. Dwarf Fortress Crashes
http://www.bay12forums.com/smf/index.php?topic=90246.msg2501128#msg2501128 [^]
To fix this error, replace the 'df' script with this text:

OSREV=`uname -r | cut -d. -f1`
if [ "$OSREV" -ge 11 ] ; then
  # OSX Lion
  export DYLD_LIBRARY_PATH="${PWD}/libs"
  export DYLD_FRAMEWORK_PATH="${PWD}/libs"
  # Pre-Lion
related to 0003263resolved Toady One Mac version unable to load up Dwarf Fortress game at all. 
has duplicate 0004777resolved Dwarfu Dwarf Fortress cannot start on Mac OS X Lion 
has duplicate 0004775resolved Dwarfu Crashes on startup on Lion 
has duplicate 0004802resolved Dwarfu Mac OSX Lion Startup Failure 
has duplicate 0004804resolved Footkerchief DF crashes upon Embark every time 
has duplicate 0004992resolved Footkerchief Won't run 
has duplicate 0004993resolved Dwarfu Dwarf Fortress will not open in Lion 
has duplicate 0005030resolved Footkerchief Game crashes immediately. 
related to 0004768new  DF crashes before fully loading. Something about a missing symbol. 
Issue History
2011-03-01 16:45theli0nheartNew Issue
2011-03-01 16:46theli0nheartIssue Monitored: theli0nheart
2011-03-01 16:48theli0nheartNote Added: 0015649
2011-03-01 23:32FootkerchiefSummaryCommand line client does not launch is OS X 10.7 Lion => Command line client does not launch on OS X 10.7 Lion
2011-03-01 23:32FootkerchiefDescription Updatedbug_revision_view_page.php?rev_id=5873#r5873
2011-03-01 23:32FootkerchiefAdditional Information Updatedbug_revision_view_page.php?rev_id=5875#r5875
2011-06-09 23:45kelwynNote Added: 0017967
2011-07-24 17:24rustymyersIssue Monitored: rustymyers
2011-07-25 06:32dgliddenIssue Monitored: dglidden
2011-07-25 07:45sharlaonIssue Monitored: sharlaon
2011-07-27 07:09jagedgeIssue Monitored: jagedge
2011-07-27 07:59DwarfuRelationship addedhas duplicate 0004777
2011-07-27 08:01DwarfuRelationship addedhas duplicate 0004775
2011-07-27 08:01DwarfuIssue Monitored: stanrandom
2011-07-27 08:01DwarfuIssue Monitored: thunderflesh
2011-07-27 08:01DwarfuIssue Monitored: algrym
2011-07-27 08:28DwarfuRelationship addedrelated to 0004768
2011-07-28 08:21phlyingpenguinIssue Monitored: phlyingpenguin
2011-07-29 03:30BitbritIssue Monitored: Bitbrit
2011-07-30 23:30ericpIssue Monitored: ericp
2011-08-02 21:44FlickeringNote Added: 0018417
2011-08-02 21:52FlickeringTag Attached: OSX
2011-08-02 22:29FlickeringIssue Monitored: Flickering
2011-08-03 21:05rustymyersNote Added: 0018425
2011-08-03 22:44DwarfuRelationship addedhas duplicate 0004802
2011-08-04 08:56FootkerchiefNote Edited: 0017967bug_revision_view_page.php?bugnote_id=0017967#r6891
2011-08-04 12:41acetech09Note Added: 0018430
2011-08-04 12:52acetech09Note Added: 0018431
2011-08-04 12:52acetech09Note Deleted: 0018430
2011-08-04 12:52acetech09Note Deleted: 0018431
2011-08-05 08:40norovaNote Added: 0018435
2011-08-05 18:21Logical2uRelationship addedparent of 0004804
2011-08-16 17:41DoolanNote Added: 0018542
2011-08-16 17:48DwarfuIssue Monitored: Doolan
2011-08-16 17:48DwarfuNote Added: 0018544
2011-08-16 17:48DwarfuTag Attached: AWAITING UPDATE
2011-08-16 18:56DoolanNote Added: 0018545
2011-09-08 08:06dgliddenNote Added: 0018692
2011-12-17 21:14ExplanatoryNote Added: 0019189
2011-12-22 09:52FootkerchiefTag Detached: AWAITING UPDATE
2011-12-22 09:54FootkerchiefAdditional Information Updatedbug_revision_view_page.php?rev_id=7179#r7179
2011-12-22 09:55FootkerchiefRelationship addedhas duplicate 0004992
2011-12-22 19:42DwarfuRelationship addedhas duplicate 0004993
2012-01-23 12:37FootkerchiefSticky IssueNo => Yes
2012-01-23 12:37FootkerchiefSummaryCommand line client does not launch on OS X 10.7 Lion => Command line client does not launch on OS X 10.7 Lion (READ FOR FIX)
2012-01-23 12:37FootkerchiefRelationship addedrelated to 0000048
2012-01-23 12:38FootkerchiefRelationship deletedrelated to 0000048
2012-01-23 12:38FootkerchiefRelationship replacedrelated to 0004804
2012-01-23 12:40FootkerchiefIssue Monitored: Toady One
2012-01-24 04:20DwarfuRelationship addedhas duplicate 0005030
2012-02-18 15:22jfsNote Added: 0020066
2012-02-19 02:15FootkerchiefRelationship addedrelated to 0003263
2012-03-21 18:26DwarfuRelationship addedhas duplicate 0005580
2012-07-02 20:23Madd the SaneNote Added: 0023145
2014-01-27 22:26FootkerchiefRelationship replacedhas duplicate 0004804
2014-07-30 19:29lethosorNote Added: 0027996
2014-07-30 19:29lethosorStatusnew => resolved
2014-07-30 19:29lethosorFixed in Version => 0.34.01
2014-07-30 19:29lethosorResolutionopen => fixed
2014-07-30 19:29lethosorAssigned To => Toady One
2014-07-30 19:32lethosorRelationship deletedhas duplicate 0005580
2014-08-05 16:53lethosorSticky IssueYes => No

2011-03-01 16:48   
Wow, I have to apologize, with all my editing, I totally botched up the English in this report.

Summary: Command line client does not launch *on* OS X 10.7 Lion

Description: When launching df on OS X 10.7, dwarf fortress crashes.

Additional information: same error repeats 1468 times
2011-06-09 23:45   
(edited on: 2011-08-04 08:56)
Crash log: http://pastebin.com/XHSt5CeV [^]

2011-08-02 21:44   
I have a workaround/fix for this issue..

The standard DF script has:


Which puts the libraries DF ships with right at the end of the search path. If I change those to:

export DYLD_LIBRARY_PATH=${PWD}/libs

Then the executable is loading happily (OSX Lion on a Mac Pro)
2011-08-03 21:05   
I am running OS X Lion and the fix reported by Flickering is working for me. I'm on a Macbook Core 2 duo. Thanks dude.
2011-08-05 08:40   
I can report that this fix works for me as well.
2011-08-16 17:41   
I can report the fix lets the game launch, but it crashes again when you attempt an aimed attack in adventurer mode. Reproduced the crash six times in a row.
2011-08-16 17:48   
Reminder sent to: Doolan

Do you happen to have TrueType enabled?
2011-08-16 18:56   
Aha, thank you Dwarfu, that was indeed the issue.

With the fix suggested in this thread and disabling TrueType it runs smooth as silk.

Thanks again!
2011-09-08 08:06   
Changing the startup script to set the DYLD paths does NOT work for me. The executable crashes with:

"397 Abort trap"

Even when extracting 31_25 from the original distribution and changing only the startup script it still crashes with the same error.
2011-12-17 21:14   
Flickering's fix works for me to. I was getting the exact same problem. I'm just wondering why this less-than-one-minute-to-fix critical bug fix wasn't immediately fixed when a solution was found. (I'm using a version I just downloaded.)
2012-02-18 15:22   
There is another ticket with OS X startup issues (0003263), I posted a proper fix there, which involves creating a proper application bundle instead of relying on a shell script. I believe it should be quite easy to integrate into the build toolchain used to compile Dwarf Fortress.

The gist of the fix is arranging the files into an .app bundle and fixing the binaries with the install_name_tool provided by Apple so they refer to libraries inside the bundle, that removes the need for DYLD environment hacks.
Madd the Sane   
2012-07-02 20:23   
Part of the problem is that the Mac version of Dwarf Fortress uses a custom c++ and gcc library. I do not understand why it does this (Cross-compiling issue, perhaps?), but using the system-supplied libraries will mean that the hack needed to get it working won't be needed.
2014-07-30 19:29   
The main problem here was fixed in 0.34.01 (the "df" script now handles OS X 10.7+).