Can't infer base LD_LIBRARY_PATH

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't infer base LD_LIBRARY_PATH

Ben Coman

On Sat, May 21, 2016 at 4:44 AM, Clément Bera <[hidden email]> wrote:

>
> On Fri, May 20, 2016 at 7:29 PM, Ben Coman <[hidden email]> wrote:
>>
>> I've decided to try and get the simulator working for the first
>> time this weekend.  Its been interesting poking through the VM with
>> gdb, but its not "exactly" fun.
>
>
> Normally if you build a cog development image:
> $ svn co http://www.squeakvm.org/svn/squeak/branches/Cog/image
> $ cd ./image
> $ ./buildsqueaktrunkvmmakerimage.sh

I'm sure I've built successfully from there before, but right now I'm
getting and error..
  cogspurlinuxht/squeak trunk50.image UpdateSqueakTrunkImage.st
  Can't infer base LD_LIBRARY_PATH. Aborting. Try adding a line for
/lib/i386-linux-gnu/i686/nosegneg/libc.so.6 to cogspurlinuxht/squeak.
Please report your edit to squeak vm-dev.

  cogspurlinuxht/squeak SpurVMMaker.image BuildSqueakSpurTrunkVMMakerImage.st
  Can't infer base LD_LIBRARY_PATH. Aborting. Try adding a line for
/lib/i386-linux-gnu/i686/nosegneg/libc.so.6 to cogspurlinuxht/squeak.
Please report your edit to squeak vm-dev.

I'm in the process of tracking that down, but just reporting in case
there is a known quick fix.  btw, I'm on Debian Jessie
Linux dom0 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt20-1+deb8u3
(2016-01-17) i686 GNU/Linux

cheers -ben

>
> 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.
Reply | Threaded
Open this post in threaded view
|

Re: Can't infer base LD_LIBRARY_PATH

Eliot Miranda-2
 
Hi Ben,

   just be sure to post your augmentation of the script back here so the scripts can be updated in svn-soon-to-be-github.

On Fri, May 20, 2016 at 8:54 PM, Ben Coman <[hidden email]> wrote:

On Sat, May 21, 2016 at 4:44 AM, Clément Bera <[hidden email]> wrote:
>
> On Fri, May 20, 2016 at 7:29 PM, Ben Coman <[hidden email]> wrote:
>>
>> I've decided to try and get the simulator working for the first
>> time this weekend.  Its been interesting poking through the VM with
>> gdb, but its not "exactly" fun.
>
>
> Normally if you build a cog development image:
> $ svn co http://www.squeakvm.org/svn/squeak/branches/Cog/image
> $ cd ./image
> $ ./buildsqueaktrunkvmmakerimage.sh

I'm sure I've built successfully from there before, but right now I'm
getting and error..
  cogspurlinuxht/squeak trunk50.image UpdateSqueakTrunkImage.st
  Can't infer base LD_LIBRARY_PATH. Aborting. Try adding a line for
/lib/i386-linux-gnu/i686/nosegneg/libc.so.6 to cogspurlinuxht/squeak.
Please report your edit to squeak vm-dev.

  cogspurlinuxht/squeak SpurVMMaker.image BuildSqueakSpurTrunkVMMakerImage.st
  Can't infer base LD_LIBRARY_PATH. Aborting. Try adding a line for
/lib/i386-linux-gnu/i686/nosegneg/libc.so.6 to cogspurlinuxht/squeak.
Please report your edit to squeak vm-dev.

I'm in the process of tracking that down, but just reporting in case
there is a known quick fix.  btw, I'm on Debian Jessie
Linux dom0 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt20-1+deb8u3
(2016-01-17) i686 GNU/Linux

cheers -ben

>
> 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.



--
_,,,^..^,,,_
best, Eliot
Reply | Threaded
Open this post in threaded view
|

Re: Can't infer base LD_LIBRARY_PATH

Ben Coman
 
(btw, Actually I am running ./buildspurtrunkvmmakerimage.sh)

So I found that ./buildspurtrunkvmmakerimage.sh
creates directory cogspurlinuxht
containing shell script 'squeak'
which for LD_LIBRARY_PATH hard codes eight alternative libc locations.
But after reformatting (see attached) a pattern is apparent such that
the following generic substitution seems appropriate (and worked for
me)...

LIBC_SO="`/usr/bin/ldd "$BIN/squeak" | /bin/fgrep /libc. | sed
's/^.*=> \([^ ]*\).*/\1/'`"
LIB=`expr "$LIBC_SO" : '\(.*\)/libc.*'`
if [ "$LIB" = "" ]; then
        echo ERROR: Could not determine libc path for VM
        exit 1
fi
SVMLLP="$LIB:/lib:/usr$LIB:/usr/lib"
LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" exec $GDB
"$BIN/squeak" "$@"

except for /lib , /lib32 and /lib64 which substitute as...
SVMLLP="$LIB:/usr$LIB"

Now I read [1] "The standard paths [/lib and /usr/lib] will still be
searched, but only after the list of paths in LD_LIBRARY_PATH has been
exhausted." So I wonder what is the advantage of interleaving the
standard paths with $LIB ones ?   If /lib and /usr/lib could just be
left to be "searched anyway" at the end, the the above snippet seems
to cover all existing cases - and likely new cases without change.

[1] http://wiredrevolution.com/system-administration/how-to-correctly-use-ld_library_path

cheers -ben

On Sun, May 22, 2016 at 2:16 AM, Eliot Miranda <[hidden email]> wrote:

>
> Hi Ben,
>
>    just be sure to post your augmentation of the script back here so the scripts can be updated in svn-soon-to-be-github.
>
> On Fri, May 20, 2016 at 8:54 PM, Ben Coman <[hidden email]> wrote:
>>
>>
>> On Sat, May 21, 2016 at 4:44 AM, Clément Bera <[hidden email]> wrote:
>> >
>> > On Fri, May 20, 2016 at 7:29 PM, Ben Coman <[hidden email]> wrote:
>> >>
>> >> I've decided to try and get the simulator working for the first
>> >> time this weekend.  Its been interesting poking through the VM with
>> >> gdb, but its not "exactly" fun.
>> >
>> >
>> > Normally if you build a cog development image:
>> > $ svn co http://www.squeakvm.org/svn/squeak/branches/Cog/image
>> > $ cd ./image
>> > $ ./buildsqueaktrunkvmmakerimage.sh
>>
>> I'm sure I've built successfully from there before, but right now I'm
>> getting and error..
>>   cogspurlinuxht/squeak trunk50.image UpdateSqueakTrunkImage.st
>>   Can't infer base LD_LIBRARY_PATH. Aborting. Try adding a line for
>> /lib/i386-linux-gnu/i686/nosegneg/libc.so.6 to cogspurlinuxht/squeak.
>> Please report your edit to squeak vm-dev.
>>
>>   cogspurlinuxht/squeak SpurVMMaker.image BuildSqueakSpurTrunkVMMakerImage.st
>>   Can't infer base LD_LIBRARY_PATH. Aborting. Try adding a line for
>> /lib/i386-linux-gnu/i686/nosegneg/libc.so.6 to cogspurlinuxht/squeak.
>> Please report your edit to squeak vm-dev.
>>
>> I'm in the process of tracking that down, but just reporting in case
>> there is a known quick fix.  btw, I'm on Debian Jessie
>> Linux dom0 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt20-1+deb8u3
>> (2016-01-17) i686 GNU/Linux
>>
>> cheers -ben
>>
>> >
>> > 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.
>
>
>
>
> --
> _,,,^..^,,,_
> best, Eliot
>

squeak.reformatted (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Can't infer base LD_LIBRARY_PATH

Ben Coman

I forgot to mention a roadbump I hit at the start.
     ./envvars.sh: Syntax error: "("

From...
http://forum.world.st/error-with-envvars-sh-when-building-VMMaker-image-td4855076.html
I discovered my /bin/sh  was linked to  /bin/dash
The advice given to change the first line of the script to #!/bin/bash
is a pain since it calls several other scripts, which chain on to
other scripts and all would need to be changed.    I solved it by
re-linking /bin/sh to /bin/bash, but relying on everyone to make such
a global change is not good, nor requiring each VM newcomer to
rediscover this for themselves.

Would it make sense to update the scripts to #!/bin/bash change once
at the download source?

cheers -ben

On Sun, May 22, 2016 at 10:11 PM, Ben Coman <[hidden email]> wrote:

> (btw, Actually I am running ./buildspurtrunkvmmakerimage.sh)
>
> So I found that ./buildspurtrunkvmmakerimage.sh
> creates directory cogspurlinuxht
> containing shell script 'squeak'
> which for LD_LIBRARY_PATH hard codes eight alternative libc locations.
> But after reformatting (see attached) a pattern is apparent such that
> the following generic substitution seems appropriate (and worked for
> me)...
>
> LIBC_SO="`/usr/bin/ldd "$BIN/squeak" | /bin/fgrep /libc. | sed
> 's/^.*=> \([^ ]*\).*/\1/'`"
> LIB=`expr "$LIBC_SO" : '\(.*\)/libc.*'`
> if [ "$LIB" = "" ]; then
>         echo ERROR: Could not determine libc path for VM
>         exit 1
> fi
> SVMLLP="$LIB:/lib:/usr$LIB:/usr/lib"
> LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" exec $GDB
> "$BIN/squeak" "$@"
>
> except for /lib , /lib32 and /lib64 which substitute as...
> SVMLLP="$LIB:/usr$LIB"
>
> Now I read [1] "The standard paths [/lib and /usr/lib] will still be
> searched, but only after the list of paths in LD_LIBRARY_PATH has been
> exhausted." So I wonder what is the advantage of interleaving the
> standard paths with $LIB ones ?   If /lib and /usr/lib could just be
> left to be "searched anyway" at the end, the the above snippet seems
> to cover all existing cases - and likely new cases without change.
>
> [1] http://wiredrevolution.com/system-administration/how-to-correctly-use-ld_library_path
>
> cheers -ben
>
> On Sun, May 22, 2016 at 2:16 AM, Eliot Miranda <[hidden email]> wrote:
>>
>> Hi Ben,
>>
>>    just be sure to post your augmentation of the script back here so the scripts can be updated in svn-soon-to-be-github.
>>
>> On Fri, May 20, 2016 at 8:54 PM, Ben Coman <[hidden email]> wrote:
>>>
>>>
>>> On Sat, May 21, 2016 at 4:44 AM, Clément Bera <[hidden email]> wrote:
>>> >
>>> > On Fri, May 20, 2016 at 7:29 PM, Ben Coman <[hidden email]> wrote:
>>> >>
>>> >> I've decided to try and get the simulator working for the first
>>> >> time this weekend.  Its been interesting poking through the VM with
>>> >> gdb, but its not "exactly" fun.
>>> >
>>> >
>>> > Normally if you build a cog development image:
>>> > $ svn co http://www.squeakvm.org/svn/squeak/branches/Cog/image
>>> > $ cd ./image
>>> > $ ./buildsqueaktrunkvmmakerimage.sh
>>>
>>> I'm sure I've built successfully from there before, but right now I'm
>>> getting and error..
>>>   cogspurlinuxht/squeak trunk50.image UpdateSqueakTrunkImage.st
>>>   Can't infer base LD_LIBRARY_PATH. Aborting. Try adding a line for
>>> /lib/i386-linux-gnu/i686/nosegneg/libc.so.6 to cogspurlinuxht/squeak.
>>> Please report your edit to squeak vm-dev.
>>>
>>>   cogspurlinuxht/squeak SpurVMMaker.image BuildSqueakSpurTrunkVMMakerImage.st
>>>   Can't infer base LD_LIBRARY_PATH. Aborting. Try adding a line for
>>> /lib/i386-linux-gnu/i686/nosegneg/libc.so.6 to cogspurlinuxht/squeak.
>>> Please report your edit to squeak vm-dev.
>>>
>>> I'm in the process of tracking that down, but just reporting in case
>>> there is a known quick fix.  btw, I'm on Debian Jessie
>>> Linux dom0 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt20-1+deb8u3
>>> (2016-01-17) i686 GNU/Linux
>>>
>>> cheers -ben
>>>
>>> >
>>> > 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.
>>
>>
>>
>>
>> --
>> _,,,^..^,,,_
>> best, Eliot
>>
tty
Reply | Threaded
Open this post in threaded view
|

Re: Re: [Vm-dev] Can't infer base LD_LIBRARY_PATH

tty
In reply to this post by Ben Coman
 
This may be relevant if you are on a 64 bit Ubuntu machine ..

IIRC 64 bit Ubuntu puts its 32 bit libs in /usr/lib32  (its 64 bit libs are in /usr/lib)


Slackware 64 reverses the Ubuntu convention and puts its 32 bit libs in /usr/lib and the 64 bit libs in /usr/lib64


hth

tty






---- On Sun, 22 May 2016 10:11:53 -0400 Ben Coman <[hidden email]> wrote ----
(btw, Actually I am running ./buildspurtrunkvmmakerimage.sh)

So I found that ./buildspurtrunkvmmakerimage.sh
creates directory cogspurlinuxht
containing shell script 'squeak'
which for LD_LIBRARY_PATH hard codes eight alternative libc locations.
But after reformatting (see attached) a pattern is apparent such that
the following generic substitution seems appropriate (and worked for
me)...

LIBC_SO="`/usr/bin/ldd "$BIN/squeak" | /bin/fgrep /libc. | sed
's/^.*=> \([^ ]*\).*/\1/'`"
LIB=`expr "$LIBC_SO" : '\(.*\)/libc.*'`
if [ "$LIB" = "" ]; then
echo ERROR: Could not determine libc path for VM
exit 1
fi
SVMLLP="$LIB:/lib:/usr$LIB:/usr/lib"
LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" exec $GDB
"$BIN/squeak" "$@"

except for /lib , /lib32 and /lib64 which substitute as...
SVMLLP="$LIB:/usr$LIB"

Now I read [1] "The standard paths [/lib and /usr/lib] will still be
searched, but only after the list of paths in LD_LIBRARY_PATH has been
exhausted." So I wonder what is the advantage of interleaving the
standard paths with $LIB ones ? If /lib and /usr/lib could just be
left to be "searched anyway" at the end, the the above snippet seems
to cover all existing cases - and likely new cases without change.

[1] http://wiredrevolution.com/system-administration/how-to-correctly-use-ld_library_path

cheers -ben

On Sun, May 22, 2016 at 2:16 AM, Eliot Miranda <[hidden email]> wrote:

>
> Hi Ben,
>
> just be sure to post your augmentation of the script back here so the scripts can be updated in svn-soon-to-be-github.
>
> On Fri, May 20, 2016 at 8:54 PM, Ben Coman <[hidden email]> wrote:
>>
>>
>> On Sat, May 21, 2016 at 4:44 AM, Clément Bera <[hidden email]> wrote:
>> >
>> > On Fri, May 20, 2016 at 7:29 PM, Ben Coman <[hidden email]> wrote:
>> >>
>> >> I've decided to try and get the simulator working for the first
>> >> time this weekend. Its been interesting poking through the VM with
>> >> gdb, but its not "exactly" fun.
>> >
>> >
>> > Normally if you build a cog development image:
>> > $ svn co http://www.squeakvm.org/svn/squeak/branches/Cog/image
>> > $ cd ./image
>> > $ ./buildsqueaktrunkvmmakerimage.sh
>>
>> I'm sure I've built successfully from there before, but right now I'm
>> getting and error..
>> cogspurlinuxht/squeak trunk50.image UpdateSqueakTrunkImage.st
>> Can't infer base LD_LIBRARY_PATH. Aborting. Try adding a line for
>> /lib/i386-linux-gnu/i686/nosegneg/libc.so.6 to cogspurlinuxht/squeak.
>> Please report your edit to squeak vm-dev.
>>
>> cogspurlinuxht/squeak SpurVMMaker.image BuildSqueakSpurTrunkVMMakerImage.st
>> Can't infer base LD_LIBRARY_PATH. Aborting. Try adding a line for
>> /lib/i386-linux-gnu/i686/nosegneg/libc.so.6 to cogspurlinuxht/squeak.
>> Please report your edit to squeak vm-dev.
>>
>> I'm in the process of tracking that down, but just reporting in case
>> there is a known quick fix. btw, I'm on Debian Jessie
>> Linux dom0 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt20-1+deb8u3
>> (2016-01-17) i686 GNU/Linux
>>
>> cheers -ben
>>
>> >
>> > 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.
>
>
>
>
> --
> _,,,^..^,,,_
> best, Eliot
>


Reply | Threaded
Open this post in threaded view
|

Re: Can't infer base LD_LIBRARY_PATH

Holger Freyther


> On 22 May 2016, at 16:34, gettimothy <[hidden email]> wrote:
>
> This may be relevant if you are on a 64 bit Ubuntu machine ..
>
> IIRC 64 bit Ubuntu puts its 32 bit libs in /usr/lib32  (its 64 bit libs are in /usr/lib)
>

Both Debian and Ubuntu invented/try to have multi-arch[1] support (e.g. for cross compiling you might install the normal -dev packages for your target architecture). In regard to paths this[2] seems to be recent and correct.

kind regards
        holger

[1] https://wiki.debian.org/Multiarch https://wiki.ubuntu.com/MultiarchSpec
[2] https://wiki.debian.org/Multiarch/LibraryPathOverview
Reply | Threaded
Open this post in threaded view
|

Re: Can't infer base LD_LIBRARY_PATH

Ben Coman
In reply to this post by Ben Coman
 
Here is the proposed change...
https://github.com/OpenSmalltalk/vm/pull/15

On Sun, May 22, 2016 at 10:11 PM, Ben Coman <[hidden email]> wrote:
(btw, Actually I am running ./buildspurtrunkvmmakerimage.sh)

So I found that ./buildspurtrunkvmmakerimage.sh
creates directory cogspurlinuxht
containing shell script 'squeak'
which for LD_LIBRARY_PATH hard codes eight alternative libc locations.
But after reformatting (see attached) a pattern is apparent such that
the following generic substitution seems appropriate (and worked for
me)...

LIBC_SO="`/usr/bin/ldd "$BIN/squeak" | /bin/fgrep /libc. | sed
's/^.*=> \([^ ]*\).*/\1/'`"
LIB=`expr "$LIBC_SO" : '\(.*\)/libc.*'`
if [ "$LIB" = "" ]; then
        echo ERROR: Could not determine libc path for VM
        exit 1
fi
SVMLLP="$LIB:/lib:/usr$LIB:/usr/lib"
LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" exec $GDB
"$BIN/squeak" "$@"

except for /lib , /lib32 and /lib64 which substitute as...
SVMLLP="$LIB:/usr$LIB"

Now I read [1] "The standard paths [/lib and /usr/lib] will still be
searched, but only after the list of paths in LD_LIBRARY_PATH has been
exhausted." So I wonder what is the advantage of interleaving the
standard paths with $LIB ones ?   If /lib and /usr/lib could just be
left to be "searched anyway" at the end, the the above snippet seems
to cover all existing cases - and likely new cases without change.

[1] http://wiredrevolution.com/system-administration/how-to-correctly-use-ld_library_path

cheers -ben

On Sun, May 22, 2016 at 2:16 AM, Eliot Miranda <[hidden email]> wrote:
>
> Hi Ben,
>
>    just be sure to post your augmentation of the script back here so the scripts can be updated in svn-soon-to-be-github.
>
> On Fri, May 20, 2016 at 8:54 PM, Ben Coman <[hidden email]> wrote:
>>
>>
>> On Sat, May 21, 2016 at 4:44 AM, Clément Bera <[hidden email]> wrote:
>> >
>> > On Fri, May 20, 2016 at 7:29 PM, Ben Coman <[hidden email]> wrote:
>> >>
>> >> I've decided to try and get the simulator working for the first
>> >> time this weekend.  Its been interesting poking through the VM with
>> >> gdb, but its not "exactly" fun.
>> >
>> >
>> > Normally if you build a cog development image:
>> > $ svn co http://www.squeakvm.org/svn/squeak/branches/Cog/image
>> > $ cd ./image
>> > $ ./buildsqueaktrunkvmmakerimage.sh
>>
>> I'm sure I've built successfully from there before, but right now I'm
>> getting and error..
>>   cogspurlinuxht/squeak trunk50.image UpdateSqueakTrunkImage.st
>>   Can't infer base LD_LIBRARY_PATH. Aborting. Try adding a line for
>> /lib/i386-linux-gnu/i686/nosegneg/libc.so.6 to cogspurlinuxht/squeak.
>> Please report your edit to squeak vm-dev.
>>
>>   cogspurlinuxht/squeak SpurVMMaker.image BuildSqueakSpurTrunkVMMakerImage.st
>>   Can't infer base LD_LIBRARY_PATH. Aborting. Try adding a line for
>> /lib/i386-linux-gnu/i686/nosegneg/libc.so.6 to cogspurlinuxht/squeak.
>> Please report your edit to squeak vm-dev.
>>
>> I'm in the process of tracking that down, but just reporting in case
>> there is a known quick fix.  btw, I'm on Debian Jessie
>> Linux dom0 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt20-1+deb8u3
>> (2016-01-17) i686 GNU/Linux
>>
>> cheers -ben
>>
>> >
>> > 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.
>
>
>
>
> --
> _,,,^..^,,,_
> best, Eliot
>