Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

Gentoo: LUA library for INSTALL_CMOD - thpp search in /usr/lib64 instead of /usr/lib64/lua/5.1 #31

Open
archenroot opened this issue Jan 8, 2017 · 0 comments

Comments

@archenroot
Copy link

Hi,

I work on Torch ebuilds in my overlay. And got into situation which is quite easy to fix, but to me question which solution is correct.

When I install Torch package I do it as:

DESCRIPTION="Torch is a Lua-based suite for scientific computations based on multidimensional tensors." 
HOMEPAGE="https://github.com/torch/torch7" 
EGIT_REPO_URI="https://github.com/torch/torch7.git" 

.... 
src_configure() { 
   local mycmakeargs=( 
      "-DLUADIR=$($(tc-getPKG_CONFIG) --variable INSTALL_LMOD $(usex luajit 'luajit' 'lua'))" 
      "-DLIBDIR=$($(tc-getPKG_CONFIG) --variable INSTALL_LIB $(usex luajit 'luajit' 'lua'))" 
      "-DLUA_BINDIR=$($(tc-getPKG_CONFIG) --variable INSTALL_BIN $(usex luajit 'luajit' 'lua'))" 
      "-DLUA_INCDIR=$($(tc-getPKG_CONFIG) --variable INSTALL_INC $(usex luajit 'luajit' 'lua'))" 
      "-DLUA_LIBDIR=$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD $(usex luajit 'luajit' 'lua'))" 
      "-DSCRIPTS_DIR=$($(tc-getPKG_CONFIG) --variable INSTALL_BIN $(usex luajit 'luajit' 'lua'))" 
      "-DLUALIB=`equery files luajit |grep lib64/libluajit | grep .so | awk 'NR==0; END{print}'`" 
      "-DLUA=/usr/bin/luajit" 
   ) 

   cmake-utils_src_configure 
}

Important is my configuration of LUA libraries. With these settings Torch is installed as following:

Code:
 * QA Notice: The following shared libraries lack a SONAME 
 * /usr/lib64/libtorch.so 

strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment -R .GCC.command.line -R .note.gnu.gold-version 
   usr/lib64/lua/5.1/libluaT.so.0 
   usr/lib64/libtorch.so 
   usr/lib64/lua/5.1/libTH.so.0 

So some goes directly to /usr/lib64 and some goes to lua subdir, which looks correct to me.

Next I am emerging ebuild for Facebook TH++ library based on Troch using CMAKE from repo as well, but this time the library build fails on:

CMake Error at /usr/share/cmake/torch/TorchExports.cmake:70 (message): 
  The imported target "TH" references the file 

     "/usr/lib64/libTH.so.0" 

  but this file does not exist.  Possible reasons include: 

  * The file was deleted, renamed, or moved to another location. 

  * An install or uninstall procedure did not complete successfully. 

  * The installation package was faulty and contained 

     "/usr/share/cmake/torch/TorchExports.cmake" 

  but not all the files it references. 

Call Stack (most recent call first): 
  /usr/share/cmake/torch/TorchConfig.cmake:29 (INCLUDE) 
  CMakeLists.txt:26 (FIND_PACKAGE)

Could you suggest if the problem is in Cmake files with TH++ by looking in wrong libraries, I can of course write a patch for Gentoo, but more thinking now what is the correct way.

Thank you for suggestions.

Ladislav

@archenroot archenroot changed the title LUA library for INSTALL_CMOD - thpp search in /usr/lib64 instead of /usr/lib64/lua/5.1 Gentoo: LUA library for INSTALL_CMOD - thpp search in /usr/lib64 instead of /usr/lib64/lua/5.1 Jan 8, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant