Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lua5.3 Hardwired in Makefile? #39

Open
jlpoolen opened this issue Jun 6, 2024 · 0 comments
Open

Lua5.3 Hardwired in Makefile? #39

jlpoolen opened this issue Jun 6, 2024 · 0 comments

Comments

@jlpoolen
Copy link

jlpoolen commented Jun 6, 2024

I'm on Gentoo Linux, trying to build this project. The following illustrates the problem I encountered and my "fix" by changing "5.3" to "5.4" and the successful build thereafter.

jlpoole@ryzdesk /usr/local/src/osml10n/lua_unac $ make
gcc -Wall -shared -fPIC -o unaccent.so -I/usr/include/lua5.3 -llua5.3 -Wl,--no-as-needed -lunac lua_unac.c
lua_unac.c:14:10: fatal error: lua.h: No such file or directory
14 | #include <lua.h>
|          ^~~~~~~
compilation terminated.
make: *** [Makefile:7: unaccent.so] Error 1
jlpoole@ryzdesk /usr/local/src/osml10n/lua_unac $ locate lua.h
/usr/include/lua5.4/lua.h
/usr/include/lua5.4/lua.hpp
/usr/include/qt5/Qsci/qscilexerlua.h
/usr/include/texlua53/lua.h
/usr/include/texlua53/lua.hpp
/usr/include/texluajit/lua.h
/usr/include/texluajit/lua.hpp
jlpoole@ryzdesk /usr/local/src/osml10n/lua_unac $ cat -n Makefile
1  # lua version to build against
2  LUAV?=5.3
3
4  TARGETDIR=$(DESTDIR)/usr/lib/x86_64-linux-gnu/lua/$(LUAV)/
5
6  unaccent.so: lua_unac.c
7          gcc -Wall -shared -fPIC -o $@ -I/usr/include/lua$(LUAV) -llua$(LUAV) -Wl,--no-as-needed -lunac$<
8
9  install: unaccent.so
10          install -m 644 unaccent.so $(TARGETDIR)
11
12  deb:
13          dpkg-buildpackage -b -uc
14
15  clean:
16          rm -f unaccent.so
jlpoole@ryzdesk /usr/local/src/osml10n/lua_unac $ nano Makefile
jlpoole@ryzdesk /usr/local/src/osml10n/lua_unac $ make
gcc -Wall -shared -fPIC -o unaccent.so -I/usr/include/lua5.4 -llua5.4 -Wl,--no-as-needed -lunac lua_unac.c
jlpoole@ryzdesk /usr/local/src/osml10n/lua_unac $ ls -la
total 32
drwxr-xr-x  3 jlpoole jlpoole    91 Jun  6 10:25 .
drwxr-xr-x 10 jlpoole jlpoole  4096 Jun  6 08:41 ..
drwxr-xr-x  3 jlpoole jlpoole   121 Jun  6 08:41 debian
-rw-r--r--  1 jlpoole jlpoole   110 Jun  6 08:41 .gitignore
-rw-r--r--  1 jlpoole jlpoole   999 Jun  6 08:41 lua_unac.c
-rw-r--r--  1 jlpoole jlpoole   347 Jun  6 10:25 Makefile
-rwxr-xr-x  1 jlpoole jlpoole 15512 Jun  6 10:25 unaccent.so
jlpoole@ryzdesk /usr/local/src/osml10n/lua_unac $ head -n 2 Makefile |tail -n 1
LUAV?=5.4
jlpoole@ryzdesk /usr/local/src/osml10n/lua_unac $ eselect lua list
[1]   lua5.4 *
jlpoole@ryzdesk /usr/local/src/osml10n/lua_unac $

I'm not a savant re: make, but wonder if there could not be a setting that accomodates both Lua 5.3 and 5.4?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant