Philipp Janda schröbte:
> you could modify the `defaults.external_deps_dirs` variable
> in `luarocks/cfg.lua`

I tried:
    defaults.external_deps_dirs = { "/usr/local", "/usr",
      "/lib/i386-linux-gnu", "/usr/lib/i386-linux-gnu",
    }
but that seemed to get messed up with the
    external_deps_subdirs = {
      bin = "bin",
      lib = "lib",
      include = "include"
    },
so it seems luarocks needs the last four characters to be /lib So I:
    mkdir /usr/symlinks
    ln -s /usr/lib/i386-linux-gnu /usr/symlinks/lib
And in /usr/local/share/lua/5.2/luarocks/cfg.lua:
    defaults.external_deps_dirs = { "/usr/local", "/usr",
      "/usr/symlinks",
    }
Which gave me my next error message:
    Error: Could not find expected file gdbm.h, or gdbm.h for GDBM --
    you may have to install GDBM in your system and/or pass GDBM_DIR
    or GDBM_INCDIR to the luarocks command.
so it seems luarocks needs lib/ and include/ to be subdirs of the
same directory.  So I:
    ln -s /usr/include /usr/symlinks/include
and now it works !! :-)  And should continue to work, for all other
modules on this machine :-)  Bit rough and primitive, though.

The logic behind looking at /etc/ld.so.conf (and thence /etc/ld.so.conf.d/*)
is that that's what ld does (see step 8):
  3.  On an ELF system, for native linkers, ...  search the
      contents of the environment variable "LD_RUN_PATH".
  4.  On SunOS, ... search any directories specified using -L options.
  5.  For a native linker, the search the contents of the environment
      variable "LD_LIBRARY_PATH".
  6.  For a native ELF linker, the dirs in "DT_RUNPATH" or "DT_RPATH"
      of a shared library are searched for shared libraries needed by it.
      The "DT_RPATH" entries are ignored if "DT_RUNPATH" entries exist.
  7.  The default directories, normally /lib and /usr/lib.
  8.  For a native linker on an ELF system, if the file
      /etc/ld.so.conf exists, the list of directories found in that file.

A suitable rockspec featuring ~> should follow some time today...

Regards,  Peter Billam

http://www.pjb.com.au      p...@pjb.com.au     (03) 6278 9410
"Follow the charge, not the particle."  --  Richard Feynman
 from The Theory of Positrons, Physical Review, 1949

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to