Recently, I have been trying to install WordGrinder on Yosemite. First I tried getting the latest tar packages from the developers' website and using them, but I ran into some library linking errors with
ncursesw. I tried using MacPorts because I assumed that it would do all of that for me, but it turns out that the problems I encountered first were just confusion left over from some earlier dirty MacPorts installs - I ran
port selfupdate and those went away. After yet more difficulty with MacPorts, I decided to reconsider building from source. But now, when I use
make, I get the following series of errors:
Maat:wordgrinder-0.5.1 Matt$ make CC .obj/release/src/c/arch/unix/cursesw/dpy.o error: unable to open output file '.obj/release/src/c/arch/unix/cursesw/dpy.o': 'Error opening output file '.obj/release/src/c/arch/unix/cursesw/dpy.o': Permission denied' 1 error generated. make: *** [.obj/release/src/c/arch/unix/cursesw/dpy.o] Error 1 Maat:wordgrinder-0.5.1 Matt$ sudo make CC .obj/release/src/c/arch/unix/cursesw/dpy.o src/c/arch/unix/cursesw/dpy.c:164:8: error: use of undeclared identifier 'KEY_EVENT' case KEY_EVENT: return "KEY_EVENT"; ^ 1 error generated. make: *** [.obj/release/src/c/arch/unix/cursesw/dpy.o] Error 1 Maat:wordgrinder-0.5.1 Matt$
First, I have to use
sudo to get the compiler to access the output file (I don't think I am supposed to have to do that, but not the main issue), and then, when I do, I run into the other one, about the "
use of undeclared identifier 'KEY_EVENT'". I went over the makefile and the README.Unix several times, but I can't make head nor tail of it. I read in another, unrelated issue with installing WordGrinder on OS X that "building on Mac is a pig," and now I can't help but agree. What is going wrong, and how can I get WordGrinder to install properly on OS X?
In the end, I wiped my convoluted /usr/local and /opt folders and reorganized a large portion of my filesystem. I installed Homebrew on the clean slate I had created, then installed lua and Homebrew/dupes/ncurses using Homebrew as per the steps Alistair listed in his answer. I then downloaded wordgrinder-0.5.2.1 instead of wordgrinder-0.5.1, because 0.5.2.1 had added Homebrew installation support. No more issues with the backspace key. At this point,
wordgrinder-static would run, but
wordgrinder wouldn't (again, as Alistair reported). Installing luafilesystem allowed
wordgrinder to run, as I predicted in an earlier revision of this answer. I used Homebrew to install luarocks in my Cellar (
brew install luarocks) and then used luarocks to install luafileystem in my /usr/local/lib/luarocks/rocks directory.
wordgrinder now runs perfectly well, with no issues.
Many thanks to Alistair for all the help. I did learn a lot more than I already did in the process of trying to get this to work, and may be able to take on the rest myself - as I said earlier, I will document my results here as I come up with them.