bugs/git-annex won't execute on WD My Cloud NASgit-annexhttp://git-annex.branchable.com/bugs/git-annex_won__39__t_execute_on_WD_My_Cloud_NAS/git-annexikiwiki2016-11-16T22:06:59Zcomment 1http://git-annex.branchable.com/bugs/git-annex_won__39__t_execute_on_WD_My_Cloud_NAS/comment_1_b87b50ca08bf90ecb7d741a6baa1dc4d/joey2015-10-15T17:15:00Z2015-10-15T17:04:07Z
<p>I wonder if this ELF issue extends to other binaries included in the
git-annex bundle, or does it only affect the git-annex (and
git-annex-shell) binary?</p>
<p>It looks like git is working when used inside runshell, and that is using a
git binary from the git-annex bundle.</p>
<p>If so, it could have something to do with how the haskell binary is being
linked. I found this thread about fixing this problem in the gold linker:
<a href="https://sourceware.org/ml/binutils/2012-08/msg00486.html">https://sourceware.org/ml/binutils/2012-08/msg00486.html</a>. IIRC
the arm build is currently using the bfd linker, not gold.</p>
comment 2http://git-annex.branchable.com/bugs/git-annex_won__39__t_execute_on_WD_My_Cloud_NAS/comment_2_6c95d0fd70fbf41eea4e6575486af3f5/PaulK2015-10-16T01:32:37Z2015-10-16T01:32:37Z
<p>Yup. It seems to affect mainly git-annex binaries...</p>
<div class="highlight-sh"><pre class="hl"><span class="hl slc"># ./git-annex</span>
<span class="hl opt">/</span>mnt<span class="hl opt">/</span>HD<span class="hl opt">/</span>git-annex<span class="hl opt">/</span>shimmed<span class="hl opt">/</span>git-annex<span class="hl opt">/</span>git-annex<span class="hl opt">:</span> error <span class="hl kwa">while</span> loading shared libraries<span class="hl opt">: /</span>mnt<span class="hl opt">/</span>HD<span class="hl opt">/</span>git-annex<span class="hl opt">/</span>shimmed<span class="hl opt">/</span>git-annex<span class="hl opt">/</span>git-annex<span class="hl opt">:</span> ELF load <span class="hl kwb">command</span> alignment not page-aligned
<span class="hl slc"># ./git-annex-shell </span>
<span class="hl opt">/</span>mnt<span class="hl opt">/</span>HD<span class="hl opt">/</span>git-annex<span class="hl opt">/</span>shimmed<span class="hl opt">/</span>git-annex-shell<span class="hl opt">/</span>git-annex-shell<span class="hl opt">:</span> error <span class="hl kwa">while</span> loading shared libraries<span class="hl opt">: /</span>mnt<span class="hl opt">/</span>HD<span class="hl opt">/</span>git-annex<span class="hl opt">/</span>shimmed<span class="hl opt">/</span>git-annex-shell<span class="hl opt">/</span>git-annex-shell<span class="hl opt">:</span> ELF load <span class="hl kwb">command</span> alignment not page-aligned
<span class="hl slc"># ./git-annex-webapp </span>
<span class="hl opt">/</span>mnt<span class="hl opt">/</span>HD<span class="hl opt">/</span>git-annex<span class="hl opt">/</span>shimmed<span class="hl opt">/</span>git-annex<span class="hl opt">/</span>git-annex<span class="hl opt">:</span> error <span class="hl kwa">while</span> loading shared libraries<span class="hl opt">: /</span>mnt<span class="hl opt">/</span>HD<span class="hl opt">/</span>git-annex<span class="hl opt">/</span>shimmed<span class="hl opt">/</span>git-annex<span class="hl opt">/</span>git-annex<span class="hl opt">:</span> ELF load <span class="hl kwb">command</span> alignment not page-aligned
<span class="hl slc"># ./git-shell</span>
fatal<span class="hl opt">:</span> Interactive git shell is not enabled.
hint<span class="hl opt">:</span> ~<span class="hl opt">/</span>git-shell-commands should exist and have <span class="hl kwb">read</span> and execute access.
<span class="hl slc"># ./git-upload-pack</span>
usage<span class="hl opt">:</span> git upload-pack <span class="hl opt">[</span><span class="hl kwb">--strict</span><span class="hl opt">] [</span><span class="hl kwb">--timeout</span><span class="hl opt">=<</span>n<span class="hl opt">>] <</span>dir<span class="hl opt">></span>
<span class="hl slc"># ./shimmed/wget/wget</span>
.<span class="hl opt">/</span>shimmed<span class="hl opt">/</span>wget<span class="hl opt">/</span>wget<span class="hl opt">:</span> error <span class="hl kwa">while</span> loading shared libraries<span class="hl opt">:</span> libpcre.so<span class="hl num">.3</span><span class="hl opt">:</span> cannot open shared object <span class="hl kwc">file</span><span class="hl opt">:</span> No such <span class="hl kwc">file</span> or directory
<span class="hl slc"># ./runshell which wget</span>
<span class="hl opt">/</span>mnt<span class="hl opt">/</span>HD<span class="hl opt">/</span>git-annex<span class="hl opt">/</span>bin<span class="hl opt">/</span>wget
<span class="hl slc"># ./runshell wget</span>
wget<span class="hl opt">:</span> missing URL
Usage<span class="hl opt">:</span> wget <span class="hl opt">[</span>OPTION<span class="hl opt">]</span>... <span class="hl opt">[</span>URL<span class="hl opt">]</span>...
Try <span class="hl str">`wget --help' for more options.</span>
<span class="hl str"></span>
<span class="hl str"># ./runshell which git </span>
<span class="hl str">/mnt/HD/git-annex/bin/git</span>
<span class="hl str"></span>
<span class="hl str"># ./runshell git annex</span>
<span class="hl str">/mnt/HD/git-annex/shimmed/git-annex/git-annex: error while loading shared libraries: /mnt/HD/git-annex/shimmed/git-annex/git-annex: ELF load command alignment not page-aligned</span>
<span class="hl str">fatal: 'annex' appears to be a git command, but we were not</span>
<span class="hl str">able to execute it. Maybe git-annex is broken?</span>
</pre></div>
comment 3http://git-annex.branchable.com/bugs/git-annex_won__39__t_execute_on_WD_My_Cloud_NAS/comment_3_6dd54179aad379bb22638db518bd377f/sts2016-06-23T12:07:10Z2016-06-23T12:07:10Z
Is there a way to link the objects with the gold linker? I am running into the same issue. Currently I am doing a workaround with mounting the drive via NFS, but that has quite poor performance (all git-related things).
comment 4http://git-annex.branchable.com/bugs/git-annex_won__39__t_execute_on_WD_My_Cloud_NAS/comment_4_614da8cad46df5c71539cc5a8ed11831/PaulK2016-09-19T04:39:07Z2016-09-19T04:39:07Z
<p>So, does anyone out there have access to this gold linker, and could they please try to link it for the armv7l architecture?
Thanks.</p>
comment 5http://git-annex.branchable.com/bugs/git-annex_won__39__t_execute_on_WD_My_Cloud_NAS/comment_5_5fa9d10ebd639eb1a836866b99e90aab/joey2016-09-21T22:03:16Z2016-09-21T16:44:08Z
<p>I've updated the <a href="https://downloads.kitenet.net/git-annex/autobuild/armel/git-annex-standalone-armel.tar.gz">arm daily build</a> to use ld.gold temporarily.</p>
<p>Please give it a try and report back if it works and if so I'll
make the change permanant.</p>
comment 6http://git-annex.branchable.com/bugs/git-annex_won__39__t_execute_on_WD_My_Cloud_NAS/comment_6_8e05f8769870b3f1aec77fca06f37284/PaulK2016-09-24T04:16:51Z2016-09-24T04:16:51Z
Nope, no difference. Same "ELF load command alignment not page-aligned" errors as before.
comment 7http://git-annex.branchable.com/bugs/git-annex_won__39__t_execute_on_WD_My_Cloud_NAS/comment_7_8da1f5fc6656e92dc2e3dabd9808f2d1/PaulK2016-09-25T03:08:40Z2016-09-25T03:08:40Z
<p>As an aside, just tried syncthing's arm verion, and I get a "runtime: kernel page size (32768) is larger than runtime page size (4096)" error. While their arm64 version also won't run.</p>
<p>Perhaps it's a similar issue with git-annex? Seems the page-size comes up in a number of contexts of people trying to get software running on the WD NAS.</p>
<p>Is there any way to adjust this page-size in the linker?</p>
<p>Thanks</p>
comment 8http://git-annex.branchable.com/bugs/git-annex_won__39__t_execute_on_WD_My_Cloud_NAS/comment_8_48026cf7c187e97d53d15d35ed2c3670/joey2016-11-16T22:06:59Z2016-11-16T21:48:49Z
<p>The arm daily build now uses a 32kb page size. So try
<a href="https://downloads.kitenet.net/git-annex/autobuild/armel/git-annex-standalone-armel.tar.gz">https://downloads.kitenet.net/git-annex/autobuild/armel/git-annex-standalone-armel.tar.gz</a></p>
<p>That has been verified to fix the problem on a Drobo 5N.</p>
<p>This may still not be enough for some of the affected NAS devices, which
use a 64kb page size. Unfortunately, gold fails to link with a 64kb page
size: <a href="http://bugs.debian.org/844467">http://bugs.debian.org/844467</a></p>