Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Torch Lua na C libraries install location issue
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
archenroot
Apprentice
Apprentice


Joined: 13 Dec 2011
Posts: 218
Location: Lake Macha, Czech republic

PostPosted: Sun Jan 08, 2017 11:31 am    Post subject: Torch Lua na C libraries install location issue Reply with quote

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:
Code:
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 as well, but this time the library build fails on:
Code:
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)


So how to best result the situation by not making things dirty? (I know I can do simple symlink now and end of story..)

Thank you for suggestions.

Ladislav
_________________
Emperor wants to control outer space Yoda wants to explore inner space that's the fundamental difference between good and bad sides of the Force
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum