szagoruyko / loadcaffe

Load Caffe networks in Torch7

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

.so files not updated correctly?

RishabhMalviya opened this issue · comments

I had forked this repository and noticed something weird happening when compiling my changes.

I would make changes to the source files in the root directory, and then run luarocks make loadcaffe-1.0-0.rockspec. It seems everything would be updated correctly in my install location (~/torch/install/), except for the libloadcaffe.so file; because of this, I was copying the generated libloadcaffe.so file in my build directory to the install location manually.

I verified this by comparing the MD5Sums listed in the installed rock-manifest file (~/torch/install/lib/luarocks/rocks/loadcaffe/1.0-0/rock-manifest) with those of the generated files in the root directory, as well the files actually installed in the install locations both before and after running luarocks make:

Before running luarocks make loadcaffe-1.0-0.rockspec:

Contents of rock-manifest

rock_manifest = {
   doc = {
      LICENSE = "23d12aad33e90ecce979cf0a5899c58d",
      ["README.md"] = "7c94dea63442b00b1802c70c3a5e9346"
   },
   lib = {
      ["libloadcaffe.so"] = "653fc66d249a4bfd2a67fefc69392708"
   },
   ["loadcaffe-1.0-0.rockspec"] = "d40ca3a8679e889aefe0028d05de0cea",
   lua = {
      loadcaffe = {
         ["ffi.lua"] = "f006c86cb3c00238881030b0ed7f2466",
         ["init.lua"] = "9964fef41b846945b53d64d8e9464808",
         ["loadcaffe.lua"] = "e76bcda2d6327cf74fafa0c9f25786bb",
         ["test.lua"] = "f3e9d042e05002fd39a38f5bb92c1de9"
      }
   }
}

MD5-Sums of files in source directory:

# doc files
LICENSE = 23d12aad33e90ecce979cf0a5899c58d
README.md = 7c94dea63442b00b1802c70c3a5e9346 

# shared objects (in ./build folder)
libloadcaffe.so = N/A

# .rockspec file
loadcaffe-1.0-0.rockspec = f66effad83ba739a2f26cd61c2a97817

# .lua source files
ffi.lua = f006c86cb3c00238881030b0ed7f2466
init.lua = 9964fef41b846945b53d64d8e9464808
loadcaffe.cpp = 57e3d2ee6d960519a96b8a8df8dbd8f3
test.lua = f3e9d042e05002fd39a38f5bb92c1de9

MD5-Sums of files in install locations:

# doc files (at location ~/torch/install/lib/luarocks/rocks/loadcaffe/1.0-0/doc/)
LICENSE = 23d12aad33e90ecce979cf0a5899c58d
README.md = 7c94dea63442b00b1802c70c3a5e9346

# Shared object files (at location ~/torch/install/lib/lua/5.1/)
libloadcaffe.so = 653fc66d249a4bfd2a67fefc69392708

# .rockspec file (at location ~/torch/install/lib/luarocks/rocks/loadcaffe/1.0-0/)
loadcaffe-1.0-0.rockspec = f66effad83ba739a2f26cd61c2a97817

# .lua source files (at location ~/torch/install/share/lua/5.1/loadcaffe/) 
ffi.lua = f006c86cb3c00238881030b0ed7f2466
init.lua = 9964fef41b846945b53d64d8e9464808
loadcaffe.lua = e76bcda2d6327cf74fafa0c9f25786bb
test.lua = f3e9d042e05002fd39a38f5bb92c1de9

After running luarocks make loadcaffe-1.0-0.rockspec (after making changes to loadcaffe.cpp and all .lua source files):

Contents of rock-manifest

rock_manifest = {
   doc = {
      LICENSE = "23d12aad33e90ecce979cf0a5899c58d",
      ["README.md"] = "7c94dea63442b00b1802c70c3a5e9346"
   },
   lib = {
      ["libloadcaffe.so"] = "412135541158ebb89ac1a8b24e768688"
   },
   ["loadcaffe-1.0-0.rockspec"] = "f66effad83ba739a2f26cd61c2a97817",
   lua = {
      loadcaffe = {
         ["ffi.lua"] = "54428d80b29ee0b65936f80d88c880e9",
         ["init.lua"] = "989458751162c1a0a35940d3e0cbc4eb",
         ["loadcaffe.lua"] = "29275f2a2a8388cd36c62cfdfeb6280b",
         ["test.lua"] = "a89d4bf504fb53fe4d33d2fc74fded60"
      }
   }
}

MD5-Sums of files in source directory:

# doc files
LICENSE = 23d12aad33e90ecce979cf0a5899c58d
README.md = 7c94dea63442b00b1802c70c3a5e9346 

# shared objects (in ./build folder)
libloadcaffe.so = 0109ed089519f8dc569142acc53b4172

# .rockspec file
loadcaffe-1.0-0.rockspec = f66effad83ba739a2f26cd61c2a97817

# .lua source files
ffi.lua = 54428d80b29ee0b65936f80d88c880e9 
init.lua = 989458751162c1a0a35940d3e0cbc4eb
loadcaffe.cpp = 29275f2a2a8388cd36c62cfdfeb6280b
test.lua = a89d4bf504fb53fe4d33d2fc74fded60

MD5-Sums of files in install locations:

# doc files (at location ~/torch/install/lib/luarocks/rocks/loadcaffe/1.0-0/doc/)
LICENSE = 23d12aad33e90ecce979cf0a5899c58d
README.md = 7c94dea63442b00b1802c70c3a5e9346

# Shared object files (at location ~/torch/install/lib/lua/5.1/)
libloadcaffe.so = 412135541158ebb89ac1a8b24e768688

# .rockspec file (at location ~/torch/install/lib/luarocks/rocks/loadcaffe/1.0-0/)
loadcaffe-1.0-0.rockspec = f66effad83ba739a2f26cd61c2a97817

# .lua source files (at location ~/torch/install/share/lua/5.1/loadcaffe/) 
ffi.lua = 54428d80b29ee0b65936f80d88c880e9 
init.lua = 989458751162c1a0a35940d3e0cbc4eb
loadcaffe.cpp = 29275f2a2a8388cd36c62cfdfeb6280b
test.lua = a89d4bf504fb53fe4d33d2fc74fded60

As you can see, both libloadcaffe.so and the source .lua files are updated, but the md5sum of the libloadcaffe.so in the source directory does not match that of the files in the rock-manifest and at the install location.