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

Building on Arch Linux. #275

Open
fjrclean opened this issue Feb 5, 2017 · 3 comments
Open

Building on Arch Linux. #275

fjrclean opened this issue Feb 5, 2017 · 3 comments

Comments

@fjrclean
Copy link

fjrclean commented Feb 5, 2017

In Arch (or at least a fork of it, Parabola, which I use) Lua5.1 is in package lua51 and the .pc file is located at /usr/lib/pkgconfig/lua51.pc. So I added another elif to findlua.sh and now I can build with root make file:

elif pkg-config lua51 ; then
	# Arch
	pkg-config lua51 $@

Initially I was trying to build with cmake, and did make some progress.
There doesn't seem to be a Findzlib.cmake in zlib package. This worked instead:

find_package(PkgConfig REQUIRED)
pkg_search_module(ZLIB REQUIRED zlib)
find_package(zlib REQUIRED)

I'm not sure if there is an easy way to use both without issues.
I was then getting errors regarding

'LUA_GLOBALSINDEX' undeclared (first use in this function)

So I needed to use library/include variables for LUA51 instead of LUA:

LUA51_LIBRARIES
LUA_LIBRARIES
LUA51_INCLUDE_DIRS
LUA_INCLUDE_DIR
find_package(Lua51 REQUIRED)
find_package(Lua REQUIRED)

This got me to linking, where I got some incomprehensible (to me) errors. I think the LUA51 variables where different from the LUA counterparts, apart from how they obviously would be. I can post that if anyone wants to pursue it further. Personally, trying to compile with cmake made me an alcoholic.

@iamgreaser
Copy link
Owner

Wew, more reason to keep around the makefile support.

Does it build fine on the dev branch? I've switched the default branch over to that as ultimately the master branch hasn't been touched in quite some time (means we don't have to bump versions).

With that said, a PR based against the dev branch for findlua.sh would be good.

Another PR for getting it to work with CMake would also be good but make sure you somehow have it working - if it doesn't work, just post what you have to and if someone's interested they may be able to help.

@fjrclean
Copy link
Author

fjrclean commented Feb 6, 2017

In dev branch, I can use make without any changes. The findlua.sh luajit elif works. I guess I'll still make a pull with my changes for people who don't have it.
EDIT: building with cmake works fine in dev too. I guess it has to do with checking for luajit and using it instead if found. My method was:

mkdir build && cd build
cmake ..
make

@rakiru
Copy link
Collaborator

rakiru commented Feb 6, 2017

Thanks for the patch. I'd recommend running with LuaJIT where possible though.

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

3 participants