dit
dit copied to clipboard
Build on Mac fails
Generating Makefile went well:
./autogen.sh
./configure
Just did not find LUA, because the header is not <lua.h>, but <lua/lua.h>. Not a big deal, the bundled LUA 5.3 will work well.
Building the executable failed:
make
Missing identifiers and follow-up errors:
Display.c:437:46: error: use of undeclared identifier 'cclock'; did you mean 'clock'?
Display.c:438:10: error: member reference type 'struct timespec *' is a pointer; did you mean to use '->'?
Display.c:438:20: error: use of undeclared identifier 'mts'
Display.c:439:10: error: member reference type 'struct timespec *' is a pointer; did you mean to use '->'?
Fixed by including the missing headers and proper dereferencing by mac.diff.txt.
Another one - missing libeditorconfig.a
when linking dit
. Fixed by making it explicitly:
make libeditorconfig.a
make
make install
Let us test it:
dit Display.c
Oops:
Error loading script /usr/local/share/dit//scripts/c.lua:1: module 'compatS3' not found:
no field package.preload[' compatS3']
no file '/usr/lLocal/share/Lua/S .3/compatS3.1lua'
no file '/usr/lLocal/share/Lua/S .3/compatS3/init.lua'
no file '/usr/Local/Lib/1lua/S .3/compatS3.1lua'
no file '/usr/Local/Lib/1lua/S .3/compatS3/init. lua’
no file './compatS3.1lua'
no file './compatS3/init.1lua'
no file '/usr/lLocal/share/dit//scripts/compatS3.1lua'
no file '/usr/lLocal/share/dit//scripts/compatS3.1lua'
no file '/usr/Local/Lib/lua/S .3/compatS3.so'
no file '/usr/local/lib/Lua/S.3/loadall.so'
no file './compatS3.so'
Fixed by copying the missing files manually:
cp -R scripts/compat53 /usr/local/share/dit/scripts/
cp -R scripts/compat53.lua /usr/local/share/dit/scripts/
Success!
I am sorry, I do not know, where to put the fix for libeditorconfig
and compat53
, otherwise I would have sent a pull request.
What output did you get?
I am sorry, a weird set of key clicks on a PC keyboard attached to Mac posted the issue text unfinished. Now it is complete.
Ah, no worries! Thanks for thundering through the build errors and reporting on the journey! I'll see if I can get these fixes integrated into the default make
sequence.
Thank you! dit
is the first editor as simple as notepad
, but running in the terminal. :-)
I'm also getting errors compiling on Mac. It would be great if you could provide prebuilt binaries for this, because it is a nice text editor.