8000 Build on Mac fails · Issue #38 · hishamhm/dit · GitHub
[go: up one dir, main page]

Skip to content

Build on Mac fails #38

Open
Open

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.

Activity

  1. hishamhm commented on Aug 29, 2020

    @hishamhm
    Owner

    What output did you get?

  2. prantlf commented on Aug 29, 2020

    @prantlf
    Author

    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.

  3. hishamhm commented on Aug 29, 2020

    @hishamhm
    Owner

    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.

  4. prantlf commented on Aug 29, 2020

    @prantlf
    Author

    Thank you! dit is the first editor as simple as notepad, but running in the terminal. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      0