orbitalquark/textadept-file-diff

Errors trying to install/require this neat-sounding module...

metaleap opened this issue · 4 comments

So I thought I'd go for this:

cd ~/.textadept/modules
git clone git@github.com:orbitalquark/textadept-file-diff.git
mv textadept-file-diff file_diff

Then require('file_diff') in init.lua but this produces:

lua: /home/_/.textadept/modules/file_diff/init.lua:102: module 'file_diff.diff' not found:
	no field package.preload['file_diff.diff']
	no file '/home/_/.textadept/modules/file_diff/diff.lua'
	no file '/home/_/.textadept/modules/file_diff/diff/init.lua'
	no file '/home/_/a/textadept/modules/file_diff/diff.lua'
	no file '/home/_/a/textadept/modules/file_diff/diff/init.lua'
	no file '/home/_/a/textadept/core/file_diff/diff.lua'
	no file '/usr/share/lua/5.4/file_diff/diff.lua'
	no file '/usr/share/lua/5.4/file_diff/diff/init.lua'
	no file '/usr/lib/lua/5.4/file_diff/diff.lua'
	no file '/usr/lib/lua/5.4/file_diff/diff/init.lua'
	no file ''
	no file '/home/_/.textadept/modules/file_diff/diff.so'
	no file '/home/_/a/textadept/modules/file_diff/diff.so'
	no file '/usr/lib/lua/5.4/file_diff/diff.so'
	no file '/usr/lib/lua/5.4/loadall.so'
	no file ''
	no file '/home/_/.textadept/modules/file_diff.so'
	no file '/home/_/a/textadept/modules/file_diff.so'
	no file '/usr/lib/lua/5.4/file_diff.so'
	no file '/usr/lib/lua/5.4/loadall.so'
	no file ''

(Of course there is diff.cxx but that's not pertinent I guess.) So since there's a makefile I do a make clean and make all but this yields:

g++ -c -std=c++11 -pedantic -fPIC -Wall -I../../src/lua/src -o diff.o diff.cxx
diff.cxx:3:10: fatal error: diff_match_patch.h: No such file or directory
    3 | #include "diff_match_patch.h"
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:27: diff.o] Error 1

which must related to this wild net fetch from L55+:

diff_match_patch_zip = 7f95b37e554453262e2bcda830724fc362614103.zip
$(diff_match_patch_zip): ; wget https://github.com/leutloff/diff-match-patch-cpp-stl/archive/$@
diff_match_patch.h: | $(diff_match_patch_zip) ; unzip -j $| "*/$@"

So leutloff has no more archive dir in that repo so now I'm out of ideas 😁 guess to resolve, would have to dig in that repo's history to find the latest .h that did exist under his ...../archive/ and bring it here into the repo? Or you might have a better idea since you actually what all this stuff is for and why...

Thanks @orbitalquark! Tried and no lua.h:

g++ -c -std=c++11 -pedantic -fPIC -Wall -I../../src/lua/src -o diff.o diff.cxx
diff.cxx:6:10: fatal error: lua.h: No such file or directory
    6 | #include "lua.h"
      |          ^~~~~~~
compilation terminated.
make: *** [Makefile:27: diff.o] Error 1

So I installed package lua-devel which picked out lua53-devel (out of the 51-54 range available in pkg repo) but no dice... tried again too with lua54-devel, same outcome

Yay, solves the build issues and lets me require without errors, muchos gracias!