On Tue, Nov 24, 2015 at 8:51 AM, Dale Henrichs
<dale.henri...@gemtalksystems.com> wrote:
> As I mentioned in the previous email, I sometimes have users report that
> they get the following error in their log file when installing
> pharo/GsDevKit-Home:
>
>> /home/travis/build/GsDevKit/GsDevKit_home/shared/pharo/pharo: line 11:
>> /home/travis/build/GsDevKit/GsDevKit_home/shared/pharo
>
>
> and I assumed that it was some sort of unreported error while downloading
> the pharo-vm   (--silent used without --show-error for curl) ... fortunately
> I just started reliably getting this error on travis[1] and was able to
> track down the root cause of the bogus "file does not exist message" to the
> fact that the 32 bit libraries have not been installed[2].
>
> It's true that the zero-conf script reports info that the 32-bit libraries
> were not installed, but the linux error message in this case is completely
> misleading ... it wasn't until I verified that the file did indeed exist[1]
> that I was able to investigate this further --- in my case I was expecting
> the 32-bit libraries to get installed in a later step and changes to the
> script structure resulted in the 32 bit library install being skipped ...
>
> At the end of the day, I think that error messages should not be suppressed
> by the zero-conf scripts, especially given the fact that the error message
> you get when a download does fail is pretty much the same as you'd get when
> you don't have the 32 bit libraries installed  ...
>
> In my case, now that I understand that I cannot rely on a proper error error
> when 32-libraries have not been installed, I will have to see if I can come
> up with a way to provide a better error message for GsDevKit_home users ....
>
> Dale
>
> [1] https://travis-ci.org/GsDevKit/GsDevKit_home/jobs/92839591#L352
> [2]
> http://askubuntu.com/questions/133389/no-such-file-or-directory-but-the-file-exists
>
>
> On 11/23/2015 04:05 PM, Dale Henrichs wrote:
>>
>>
>>
>> On 11/23/2015 03:39 PM, Esteban A. Maringolo wrote:
>>>
>>> 2015-11-23 20:25 GMT-03:00 Dale Henrichs
>>> <dale.henri...@gemtalksystems.com>:
>>>>
>>>> I've been using zero-conf scripts to download the pharo vm for a while
>>>> and
>>>> occasionally the download fails to install the vm in the pharo-vm
>>>> directory
>>>> .... silently ..... with no clue as to what happened. even worse the
>>>> exit
>>>> status is zero so the failure isn't noticed until much later on in my
>>>> install when an attempt is made to actually use the vm .... I do know
>>>> that
>>>> when I see these failures the pharo-vm does get created but is  empty
>>>> ...
>>>
>>> +1. I've been bitten by this too.
>>>
>>> I would also like the option of seeing the progress of the download of
>>> the sources AND vm, because sometimes I want to know how the download
>>> is going on, speed, etc.
>>>
>>> Regards!
>>>
>>> --
>>> Esteban
>>>
>> I agree with the progress, but when running as a batch job, you end up
>> with a ton of junk being dumped out into the log file ... getting rid of
>> junk from a log file is how I learned about the problem with --silent:)
>>
>> With regards to the issue I am having --- I have hit a point in my testing
>> (on travis) where I consistently get the:
>>
>>> /home/travis/build/GsDevKit/GsDevKit_home/shared/pharo/pharo: line 11:
>>> /home/travis/build/GsDevKit/GsDevKit_home/shared/pharo/pharo-vm/pharo: No
>>> such file or directory
>>
>>
>> error message yet the following appears to work:
>>
>>> if [ "$OS" == "win" ]; then
>>>     PHARO_VM=`find $VM_DIR -name ${VM_BINARY_NAME}.exe`
>>> elif [ "$OS" == "mac" ]; then
>>>     PHARO_VM=`find $VM_DIR -name ${VM_BINARY_NAME}`
>>> elif [ "$OS" == "linux" ]; then
>>>     PHARO_VM=`find $VM_DIR -name ${VM_BINARY_NAME_LINUX}`
>>> fi
>>>
>>> echo $PHARO_VM
>>
>>
>> since `pharo-vm/pharo` is properly echoed even though the file does not
>> appear to exist? I'm digging deeper ....

I don't have a linux box to check this on, but how about something like...

    if [ `ldd $PHARO_VM 2>/dev/null | grep -c 'not found'` -ne 0 ]; then
        echo "Missing library dependencies..."
        ldd $PHARO_VM 2>/dev/null | grep 'not found'
        echo "Maybe you need to..."
        echo "  $ sudo dpkg --add-architecture i386"
        echo "  $ sudo apt-get update"
        echo "and for each $MISSING_LIBRARY..."
        echo "  $ sudo apt-get install $MISSING_LIBRARY:386"
        exit 1
   fi

cheers -ben

Reply via email to