-
Notifications
You must be signed in to change notification settings - Fork 516
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
install native and cross lua executables & add LuaRocks plugin #1017
Conversation
--with-lua-bin='$(PREFIX)/bin' \ | ||
--with-downloader='wget' \ | ||
--with-md5-checker='openssl' | ||
$(MAKE) -C '$(1)' build install \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
install
doesn't depend on build
so (on OSX) the symlink is created first and doesn't have execute permissions. These steps should be separated.
Looks good! Plugins currently require some boilerplate:
for updates to work, I might see if there's some sort of Additional metadata like:
may also be useful, but the REAMDE is an excellent approach. |
$(WGET) -q -O- 'http://www.inf.puc-rio.br/~roberto/lpeg/' | \ | ||
$(SED) -n 's,.*lpeg-\([0-9][^>]*\)\.tar.*,\1,p' | \ | ||
sort -h | tail -1 | ||
endef |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$(SORT)
See 2944ccd,
There's also now an automatic |
> install doesn't depend on build so (on OSX) the symlink is > created first and doesn't have execute permissions. These > steps should be separated. See mxe#1017
... instead of $(PREFIX)/bin, not to clobber the user's normal tools. See mxe#1017
> There's also now an automatic all-<plugin> target which is the > last segment of the plugin path. all-rocks.mk can be removed > and make all-luarocks MXE_PLUGIN_DIRS=plugins/luarocks ... > will work. See mxe#1017
... instead of $(PREFIX)/bin, not to clobber the user's normal tools. See mxe#1017
> There's also now an automatic all-<plugin> target which is the > last segment of the plugin path. all-rocks.mk can be removed > and make all-luarocks MXE_PLUGIN_DIRS=plugins/luarocks ... > will work. See mxe#1017
I have taken into account all the comments. Build on Wheezy produces broken lua.exe / lua53.dll. It can't find
|
Is it only Wheezy and/or lua.exe? The gcc *.dlls are in a version-specific subdir in case we were going to do side-by-side gcc versions (which now seems unlikely). Does moving the *.dlls the the parent dir work? |
It doesn't depend on Wheezy/Jessie. Clean installation:
Old installation (gcc rebuilt):
|
I'm not sure what just happened. I tried creating a pull request using the web interface and it created the branch but seems to have merged it without a pull request ae8f6de. |
Reverted now 38a9ead, I'll do a proper fix tomorrow. |
See #1032 |
llthreads2, lpeg, and lua-rapidjson depend on luasocket:
Easy fix tonytheodore@297f697 |
llthreads2, lpeg, and lua-rapidjson do not depend on luasocket. None of them needs network. Can you show logs for llthreads2, lpeg, and lua-rapidjson, please? Probably the build was failed because of race condition ( Another possible reason of printing |
Only llthreads2 and lpeg this time: https://gist.github.com/tonytheodore/7765744f895cdad87035
The
|
A workaround is to put a diff --git a/plugins/luarocks/luarocks.mk b/plugins/luarocks/luarocks.mk
index b7cbbae..51209bb 100644
--- a/plugins/luarocks/luarocks.mk
+++ b/plugins/luarocks/luarocks.mk
@@ -18,6 +18,10 @@ define $(PKG)_UPDATE
$(SORT) -h | tail -1
endef
+# Luarocks updates information about rocks installed and it seems
+# to do it without synchronization between multiple processes.
+.NOTPARALLEL:
+
# shared-only because Lua loads modules in runtime
define $(PKG)_BUILD_SHARED |
I wrapped luarocks main tool with bash script which provides a mutex based on |
Thanks, the lock dir needs to exist: diff --git a/plugins/luarocks/luarocks.mk b/plugins/luarocks/luarocks.mk
index 10131ee..a852c37 100644
--- a/plugins/luarocks/luarocks.mk
+++ b/plugins/luarocks/luarocks.mk
@@ -39,6 +39,7 @@ define $(PKG)_BUILD_SHARED
# create bash wrapper adding inter-process mutex
# see https://github.com/mxe/mxe/pull/1017#issuecomment-161557440
+ $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/luarocks'
(echo '#!/usr/bin/env bash'; \
echo 'echo "== Using MXE wrapper: $(PREFIX)/$(TARGET)/bin/luarocks"'; \
echo '# Creating a directory is an atomic operation, that is why'; \ and it all works well! |
Fixed. |
Do you want to do any rebasing? Otherwise I think this is ready to merge. |
LuaRocks plugin adds * package "luarocks" * several packages with rocks (lpeg, luasocket, llthreads2, lua-rapidjson) * plugins/luarocks/README.md * virtual rock "all-rocks" depending on all rocks * short test for rocks
> install doesn't depend on build so (on OSX) the symlink is > created first and doesn't have execute permissions. These > steps should be separated. See mxe#1017
... instead of $(PREFIX)/bin, not to clobber the user's normal tools. See mxe#1017
> There's also now an automatic all-<plugin> target which is the > last segment of the plugin path. all-rocks.mk can be removed > and make all-luarocks MXE_PLUGIN_DIRS=plugins/luarocks ... > will work. See mxe#1017
Rebased |
install native and cross lua executables & add LuaRocks plugin
Well done! |
No description provided.