<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"><<a href="mailto:btc@openinworld.com" target="_blank">btc@openinworld.com</a>></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 'squeak'<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="`/usr/bin/ldd "$BIN/squeak" | /bin/fgrep /libc. | sed<br>
's/^.*=> \([^ ]*\).*/\1/'`"<br>
LIB=`expr "$LIBC_SO" : '\(.*\)/libc.*'`<br>
if [ "$LIB" = "" ]; then<br>
echo ERROR: Could not determine libc path for VM<br>
exit 1<br>
fi<br>
SVMLLP="$LIB:/lib:/usr$LIB:/usr/lib"<br>
LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" exec $GDB<br>
"$BIN/squeak" "$@"<br>
<br>
except for /lib , /lib32 and /lib64 which substitute as...<br>
SVMLLP="$LIB:/usr$LIB"<br>
<br>
Now I read [1] "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." 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 "searched anyway" 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 <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>> wrote:<br>
><br>
> Hi Ben,<br>
><br>
> 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">><br>
> On Fri, May 20, 2016 at 8:54 PM, Ben Coman <<a href="mailto:btc@openinworld.com">btc@openinworld.com</a>> wrote:<br>
>><br>
>><br>
>> On Sat, May 21, 2016 at 4:44 AM, Clément Bera <<a href="mailto:bera.clement@gmail.com">bera.clement@gmail.com</a>> wrote:<br>
>> ><br>
>> > On Fri, May 20, 2016 at 7:29 PM, Ben Coman <<a href="mailto:btc@openinworld.com">btc@openinworld.com</a>> wrote:<br>
>> >><br>
>> >> I've decided to try and get the simulator working for the first<br>
>> >> time this weekend. Its been interesting poking through the VM with<br>
>> >> gdb, but its not "exactly" fun.<br>
>> ><br>
>> ><br>
>> > Normally if you build a cog development image:<br>
>> > $ 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>
>> > $ cd ./image<br>
>> > $ ./buildsqueaktrunkvmmakerimage.sh<br>
>><br>
>> I'm sure I've built successfully from there before, but right now I'm<br>
>> getting and error..<br>
>> cogspurlinuxht/squeak trunk50.image UpdateSqueakTrunkImage.st<br>
>> Can't infer base LD_LIBRARY_PATH. Aborting. Try adding a line for<br>
>> /lib/i386-linux-gnu/i686/nosegneg/libc.so.6 to cogspurlinuxht/squeak.<br>
>> Please report your edit to squeak vm-dev.<br>
>><br>
>> cogspurlinuxht/squeak SpurVMMaker.image BuildSqueakSpurTrunkVMMakerImage.st<br>
>> Can't infer base LD_LIBRARY_PATH. Aborting. Try adding a line for<br>
>> /lib/i386-linux-gnu/i686/nosegneg/libc.so.6 to cogspurlinuxht/squeak.<br>
>> Please report your edit to squeak vm-dev.<br>
>><br>
>> I'm in the process of tracking that down, but just reporting in case<br>
>> there is a known quick fix. btw, I'm on Debian Jessie<br>
>> Linux dom0 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt20-1+deb8u3<br>
>> (2016-01-17) i686 GNU/Linux<br>
>><br>
>> cheers -ben<br>
>><br>
>> ><br>
>> > 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>
><br>
><br>
><br>
><br>
</div></div><span class=""><font color="#888888">> --<br>
> _,,,^..^,,,_<br>
> best, Eliot<br>
><br>
</font></span></blockquote></div><br></div></div>