<div dir="ltr"><div>Here is the proposed change...</div><a href="https://github.com/OpenSmalltalk/vm/pull/15">https://github.com/OpenSmalltalk/vm/pull/15</a><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 22, 2016 at 10:11 PM, Ben Coman <span dir="ltr">&lt;<a href="mailto:btc@openinworld.com" target="_blank">btc@openinworld.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">(btw, Actually I am running ./buildspurtrunkvmmakerimage.sh)<br>
<br>
So I found that ./buildspurtrunkvmmakerimage.sh<br>
creates directory cogspurlinuxht<br>
containing shell script &#39;squeak&#39;<br>
which for LD_LIBRARY_PATH hard codes eight alternative libc locations.<br>
But after reformatting (see attached) a pattern is apparent such that<br>
the following generic substitution seems appropriate (and worked for<br>
me)...<br>
<br>
LIBC_SO=&quot;`/usr/bin/ldd &quot;$BIN/squeak&quot; | /bin/fgrep /libc. | sed<br>
&#39;s/^.*=&gt; \([^ ]*\).*/\1/&#39;`&quot;<br>
LIB=`expr &quot;$LIBC_SO&quot; : &#39;\(.*\)/libc.*&#39;`<br>
if [ &quot;$LIB&quot; = &quot;&quot; ]; then<br>
        echo ERROR: Could not determine libc path for VM<br>
        exit 1<br>
fi<br>
SVMLLP=&quot;$LIB:/lib:/usr$LIB:/usr/lib&quot;<br>
LD_LIBRARY_PATH=&quot;$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}&quot; exec $GDB<br>
&quot;$BIN/squeak&quot; &quot;$@&quot;<br>
<br>
except for /lib , /lib32 and /lib64 which substitute as...<br>
SVMLLP=&quot;$LIB:/usr$LIB&quot;<br>
<br>
Now I read [1] &quot;The standard paths [/lib and /usr/lib] will still be<br>
searched, but only after the list of paths in LD_LIBRARY_PATH has been<br>
exhausted.&quot; So I wonder what is the advantage of interleaving the<br>
standard paths with $LIB ones ?   If /lib and /usr/lib could just be<br>
left to be &quot;searched anyway&quot; at the end, the the above snippet seems<br>
to cover all existing cases - and likely new cases without change.<br>
<br>
[1] <a href="http://wiredrevolution.com/system-administration/how-to-correctly-use-ld_library_path" rel="noreferrer" target="_blank">http://wiredrevolution.com/system-administration/how-to-correctly-use-ld_library_path</a><br>
<br>
cheers -ben<br>
<br>
On Sun, May 22, 2016 at 2:16 AM, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Hi Ben,<br>
&gt;<br>
&gt;    just be sure to post your augmentation of the script back here so the scripts can be updated in svn-soon-to-be-github.<br>
<div class=""><div class="h5">&gt;<br>
&gt; On Fri, May 20, 2016 at 8:54 PM, Ben Coman &lt;<a href="mailto:btc@openinworld.com">btc@openinworld.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Sat, May 21, 2016 at 4:44 AM, Clément Bera &lt;<a href="mailto:bera.clement@gmail.com">bera.clement@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Fri, May 20, 2016 at 7:29 PM, Ben Coman &lt;<a href="mailto:btc@openinworld.com">btc@openinworld.com</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; I&#39;ve decided to try and get the simulator working for the first<br>
&gt;&gt; &gt;&gt; time this weekend.  Its been interesting poking through the VM with<br>
&gt;&gt; &gt;&gt; gdb, but its not &quot;exactly&quot; fun.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Normally if you build a cog development image:<br>
&gt;&gt; &gt; $ svn co <a href="http://www.squeakvm.org/svn/squeak/branches/Cog/image" rel="noreferrer" target="_blank">http://www.squeakvm.org/svn/squeak/branches/Cog/image</a><br>
&gt;&gt; &gt; $ cd ./image<br>
&gt;&gt; &gt; $ ./buildsqueaktrunkvmmakerimage.sh<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m sure I&#39;ve built successfully from there before, but right now I&#39;m<br>
&gt;&gt; getting and error..<br>
&gt;&gt;   cogspurlinuxht/squeak trunk50.image UpdateSqueakTrunkImage.st<br>
&gt;&gt;   Can&#39;t infer base LD_LIBRARY_PATH. Aborting. Try adding a line for<br>
&gt;&gt; /lib/i386-linux-gnu/i686/nosegneg/libc.so.6 to cogspurlinuxht/squeak.<br>
&gt;&gt; Please report your edit to squeak vm-dev.<br>
&gt;&gt;<br>
&gt;&gt;   cogspurlinuxht/squeak SpurVMMaker.image BuildSqueakSpurTrunkVMMakerImage.st<br>
&gt;&gt;   Can&#39;t infer base LD_LIBRARY_PATH. Aborting. Try adding a line for<br>
&gt;&gt; /lib/i386-linux-gnu/i686/nosegneg/libc.so.6 to cogspurlinuxht/squeak.<br>
&gt;&gt; Please report your edit to squeak vm-dev.<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m in the process of tracking that down, but just reporting in case<br>
&gt;&gt; there is a known quick fix.  btw, I&#39;m on Debian Jessie<br>
&gt;&gt; Linux dom0 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt20-1+deb8u3<br>
&gt;&gt; (2016-01-17) i686 GNU/Linux<br>
&gt;&gt;<br>
&gt;&gt; cheers -ben<br>
&gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; You have multiple scripts available with comments to run the simulator that work out of the box. It should take a couple minutes to get it working. Then the easiest is to simulate a REPL image to easily debug what you want.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div><span class=""><font color="#888888">&gt; --<br>
&gt; _,,,^..^,,,_<br>
&gt; best, Eliot<br>
&gt;<br>
</font></span></blockquote></div><br></div></div>