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

LuaRocks site_config misses some lines #38

Open
mpeterv opened this issue Sep 19, 2016 · 1 comment
Open

LuaRocks site_config misses some lines #38

mpeterv opened this issue Sep 19, 2016 · 1 comment

Comments

@mpeterv
Copy link

mpeterv commented Sep 19, 2016

LuaRocks may add some lines to site_config.lua, like this:

if [ -n "$(MULTIARCH_SUBDIR)" ] ;\
then \
   echo 'site_config.LUAROCKS_EXTERNAL_DEPS_SUBDIRS={ bin="bin", lib={ "lib", [[$(MULTIARCH_SUBDIR)]] }, include="include" }' >> src/luarocks/site_config.lua ;\
   echo 'site_config.LUAROCKS_RUNTIME_EXTERNAL_DEPS_SUBDIRS={ bin="bin", lib={ "lib", [[$(MULTIARCH_SUBDIR)]] }, include="include" }' >> src/luarocks/site_config.lua ;\
fi

Where $MULTIARCH_SUBDIR) is set as follows:

if [ "$LUAROCKS_UNAME_S" = Linux ]
then
   GCC_ARCH=`gcc -print-multiarch 2>/dev/null`
   if [ -n "$GCC_ARCH" -a -d "/usr/lib/$GCC_ARCH" ]
   then
      MULTIARCH_SUBDIR="lib/$GCC_ARCH"
   elif [ -d "/usr/lib64" ]
   then
      # Useful for Fedora systems
      MULTIARCH_SUBDIR="lib64"
   fi
fi

($LUAROCKS_UNAME_S is uname -s)

These lines are not in site_config.lua installed by torch/distro: https://github.com/torch/luajit-rocks/blob/411f4b9d9c4be176d4aab965ebfce50911583e14/luarocks/src/luarocks/site_config.lua.in

This affects ease of linking Lua rocks with libraries installed e.g. in /usr/lib/x86_64-linux-gnu, see daurnimator/lua-http#39 (comment)

@d9k
Copy link

d9k commented Sep 21, 2017

@andresy, still an issue

site_config.LUAROCKS_EXTERNAL_DEPS_SUBDIRS and site_config.LUAROCKS_RUNTIME_EXTERNAL_DEPS_SUBDIRS are missing at site_config.lua

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

2 participants