Skip to content

Build on Mac fails #38

@prantlf

Description

@prantlf

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions