by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 08 04:16
    daurnimator commented #1215
  • Aug 05 21:49
    dwenegar converted_to_draft #1213
  • Aug 03 16:22
    hishamhm commented #1215
  • Aug 03 15:51
    daurnimator commented #1215
  • Aug 03 15:45
    hishamhm commented #1215
  • Aug 03 00:54
    stevenjohnstone commented #1215
  • Aug 03 00:46
    daurnimator commented #1215
  • Aug 03 00:39
    stevenjohnstone commented #1215
  • Aug 02 23:49
    daurnimator commented #1215
  • Aug 02 23:00
    stevenjohnstone commented #1215
  • Aug 02 16:32
    stevenjohnstone opened #1215
  • Aug 01 18:04
    joshglenn opened #1214
  • Aug 01 04:49
  • Aug 01 04:45
    dwenegar synchronize #1213
  • Aug 01 04:40
  • Aug 01 04:38
    dwenegar reopened #1213
  • Aug 01 04:38
    dwenegar synchronize #1213
  • Aug 01 04:25
    dwenegar closed #1213
  • Aug 01 04:13
  • Aug 01 04:10
    dwenegar opened #1213
Hisham Muhammad
@hishamhm
@insanetheta you can try using the tar.gz archive link that Github produces in its Releases page instead
@rheniser that message in the help screen is incorrect, I just pushed a commit to remove it. To change the default you can run
luarocks config variables.CC /my/path/to/gcc
watchd0g
@supercalhotas
Hi there guys \o
Does anyone know a good guide, to build modules with luarocks using cross-compile toolchains?
i need to build support for requests module on a embedded system i run
Greg Back
@insanetheta
@hishamhm thanks!
Greg Back
@insanetheta

I'm running into an issue now with using a remote repository for my rockserver and using luarocks-admin commands, centered in the using wget over https in luarocks/admin/cache.lua.

When I run luarocks-admin add or refresh_cache with my server specified it runs the following wget through os.execute(cmd):
executing cmd = wget --no-cache -v -m -np -nd -kpN -e robots=off --reject *.rock https://my.repository/rocks/ --user=user --password=password

When run, it downloads the index.html just fine, but as it crawls over the index to download manifests it hits issues that print as:
HTTP request sent, awaiting response... 200 No headers, assuming HTTP/0.9
Length: unspecified
Saving to: ‘manifest-5.1’
but then hangs for several minutes and eventually saves an empty file for manifest-5.1, then repeats the process for the rest of the files.

But, when I run the exact same wget command in the same .cache/luarocks/temp folder, it downloads successfully.

Greg Back
@insanetheta
i added a --no-http-keep-alive in the wget command in cache.lua, which does allow the command to complete by opening a new socket connection for each file downloaded. Works, but slow.
Pierre Chapuis
@catwell

@watchd0g Support for cross-compilation in LuaRocks is not great as of now.

For modules that use the builtin type you can get away with setting a few environment variables (CC, LD, CFLAGS...) but for modules which use make / cmake you typically need to look at each one and do custom stuff. Also you will probably want static builds and LuaRocks is not really made for this either.

I use to maintain a code base that built on several embedded platforms and honestly I had given up on using LuaRocks for this (at least for non-pure modules). I just included all the C modules I needed in my own build system.

If I had to do it today I might look at the possibility of using Zig as the C compiler: https://andrewkelley.me/post/zig-cc-powerful-drop-in-replacement-gcc-clang.html

(Support for static builds / cross-compilation has been on the GSOC list but I don't think anyone has ever picked it...)
Vladislav Grubov
@orchaton
Hello to everyone! I'm facing weird situation with resolving domain luarocks.org to unexpected list of ip addresses: 198.54.117.200, 198.54.117.197, 198.54.117.198, 198.54.117.199 instead of 45.33.61.132. And this breaks installations of rockspecs. Do you know who can fix this? https://dnschecker.org/#A/luarocks.org/45.33.61.132
Thijs Schreijer
@Tieske
Rami Sabbagh
@RamiLego4Game
Hello
I'm writing my first rockspec
I have a multiple files module
With a structure like:
my_module/init.lua
my_module/utilities/init.lua
my_module/utilities/http.lua
How can I specify the whole folder for the builtin build system?
Rami Sabbagh
@RamiLego4Game
Nevermind I've figured it
Used the lua folder feature
sol
@s-ol
Is there a way to do what luarocks build path/to/rockspec --pack-binary-rock does, but using the repo already locally cloned?
sol
@s-ol
ah, figured that out myself: its luarocks make path/to/rockspec --pack-binary-rock :)
next question: has anyone successfully managed to cross-compile rocks for execution on windows from Linux?
Hisham Muhammad
@hishamhm
luarocks.exe for Windows is actually built on a Linux box
so that binary/ folder contains hacks for both cross-compiling and building static-library rocks, two things LuaRocks does not "officially support"
George Oliver
@ergodicbreak
hello, I am using LuaRocks for the first time to install luasocket, but I'm failing on "Failed compiling module socket/core.dll", I'm wondering if I just have a basic problem with my setup. This is the install log https://gist.github.com/ergodicbreak/ec929794cebe830e09d0de73a1346124 and this is my config https://gist.github.com/ergodicbreak/1124a2bf4be858db4f75c6a79a0a4a2c
Doron Gold
@dorongold
Hi, is there a way to specify output directory for the command luarocks make --pack-binary-rock?
By default the *.all.rock file is created in the current directory.
I am trying to create an automated build which puts the output in a separate directory and does not contaminate my source directory.
I do this for multiple source directories (each is a different Kong plugin).
I want to later add the separate output directory to the LUA_PATH
Hisham Muhammad
@hishamhm

Hi, is there a way to specify output directory for the command luarocks make --pack-binary-rock?

no, this is currently not supported

I want to later add the separate output directory to the LUA_PATH

note, though, that LUA_PATH will not pick up modules inside packed binary rocks

(i.e. they don't work like .jar files, they're more like .rpm/.deb files)
Doron Gold
@dorongold
Thanks @hishamhm. I'll just move the created *all.rock file to the output dir. I wanted to avoid having to move the file in a separate command, but oh well.
Good point about LUA_PATH and binary packs.
I'll run luarocks --tree <output_tree_dir> install *.all.rock as the last step of my build and add <output_tree_dir> to LUA_PATH
sol
@s-ol
Is there a way to force UNIX luarocks to install into a windows rocktree? I mean create .bat wrappers for scripts and so on
I guess I can try with wine otherwise
Hisham Muhammad
@hishamhm
@s-ol you could try platforms = {"windows"} in the config file, but that will make LuaRocks assume it is running on Windows and will probably make it fail in spectacular ways :)
you might have better luck with the luarocks binary, because that depends less on the surrounding environment — but it will still try to use msvc/mingw to compile things etc. — so, it's not a recommended or supported way of using LR, but it might be fun to try ;)
Caleb Maclennan
@alerque
I know using luarocks install I can pass a specific URL I want to use as as rockspec, but is there a way to accomplish the same effect inside a rockspec file in the dependencies = {} table? I'm trying to test something in my fork of an upstream module in some downstream software builds before I submit PR(s) and it's really difficult to change the build systems to install a different way.
Ryan
@RyanSquared
if you install the specific version first i don't think that luarocks cares whether it's a specific version or the one from the repo
not a direct answer to your question but maybe a probable solution
Abhishek Mittal
@mittalabhi2123
Hello, we are planning to integrate Luarocks in our company's build system. Can someone help me with the target remote URLs that we will have to whitelist/proxy setup to be able to use luarocks from within our network?
Caleb Maclennan
@alerque
You can configure what servers you want to check in your own config file, but I think you'll find the defaults here: https://github.com/luarocks/luarocks/blob/c52a5c57ccffa5a0929593cd94fa5f87e795efd7/src/luarocks/core/cfg.lua#L205-L212
@mittalabhi2123 ^^^
Abhishek Mittal
@mittalabhi2123
Thanks @alerque
Abhishek Mittal
@mittalabhi2123
Hi I am looking to pack the src.rock for a package and all the underlying transitive dependencies. Is there a way to figure out (and probably pull the src.rock files) the dependencies dynamically?
Rok Novosel
@novoselrok
hey, how can I the -std=c++11 flag to luarocks package when compiling a C++ extension? here is the rockspec file: https://github.com/spotify/annoy/blob/master/annoy-dev-1.rockspec I'm working on a PR (spotify/annoy#495) that is adding multithreading so c++11 is required.
Steven Johnstone
@stevenjohnstone
Hi! Does luarocks have a security policy/security contact?
daurnimator
@daurnimator
stevenjohnstone: for the website itself or the application?
Steven Johnstone
@stevenjohnstone
Application, @daurnimator
daurnimator
@daurnimator
stevenjohnstone: best would probably be to send a message to myself and/or hisham
TJ DeVries
@tjdevries
Hi, I'm working on integrating luarocks with our neovim package manager ( https://github.com/wbthomason/packer.nvim ) and I'm wondering if it's possible to run and use luarocks as a module (i.e. require('luackocks').install('lua-cjson') or something similar)
I haven't seen anything about someone doing that, so if there is some documentation I missed, I'm happy to read up on that. Thanks!
breakone9r
@breakone9r
I can't seem to find any documentation on how to create rpm packages for specific luarocks rocks ? I'm new to creating rpms, so im just missing something obvious, but I am trying to create rpms for another project I like which doesn't have them, and uses rocks not available in my distros default repos