www.cendio.com
Bug 4319 - tlclient does not display error message on 64-bit systems without 32-bit libs
: tlclient does not display error message on 64-bit systems without 32-bit libs
Status: CLOSED FIXED
: ThinLinc
Client
: 3.4.0
: PC Unknown
: P2 Normal
: 4.2.0
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2012-05-30 14:35 by
Modified: 2014-05-14 09:47 (History)
Acceptance Criteria:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From cendio 2012-05-30 14:35:08
Running tlclient on such a system simply gives a cryptic "not found" message,
instead of printing the text in /opt/thinlinc/bin/tlclient which is supposed to
be displayed when the client fails to launch.

We should either fix this, or remove it once we have a 64-bit client.
------- Comment #1 From cendio 2013-12-16 08:42:35 -------
Failed to reproduce on CentOS 6, after removing glibc.i686:

$
/home/astrand/tl-4.1.1-clients/client-linux-dynamic/tl-4.1.1-4137-client-linux-dynamic-i686/bin/tlclient
/home/astrand/tl-4.1.1-clients/client-linux-dynamic/tl-4.1.1-4137-client-linux-dynamic-i686/bin/tlclient:
/home/astrand/tl-4.1.1-clients/client-linux-dynamic/tl-4.1.1-4137-client-linux-dynamic-i686/bin/../lib/tlclient/tlclient.bin:
/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
/home/astrand/tl-4.1.1-clients/client-linux-dynamic/tl-4.1.1-4137-client-linux-dynamic-i686/bin/tlclient:
line 16:
/home/astrand/tl-4.1.1-clients/client-linux-dynamic/tl-4.1.1-4137-client-linux-dynamic-i686/bin/../lib/tlclient/tlclient.bin:
Success
The execution of the ThinLinc client failed. A common reason for
this is that you are using the wrong architecture. Perhaps you
are running a 32 bit client on a 64 bit system without support
for 32 bit applications?
------- Comment #2 From cendio 2013-12-16 08:57:42 -------
Problem occurs on Ubuntu because their /bin/sh is not Bash. Our script looks
like:

if [ "${BASH_VERSION}" ]; then
    shopt -s execfail
fi
exec "${ORIGIN}/../lib/tlclient/tlclient.bin" "$@"
echo The execution of the ThinLinc client failed. A common reason for
...

Solutions are:

1) Keep the existing behaviour. Drawback: Does not work an all platforms. 

2) Get rid of "execfail" and exec. Instead, print error if return code is 127.
Drawback: The shell will stay running when the client runs, consuming some
memory. 

3) Check for ${BASH_VERSION}", use existing 1) or 2) depending on if it is set.
Drawback: In addition to the drawbacks of 1) and 2), we will also have more
code.
------- Comment #3 From cendio 2013-12-16 09:17:02 -------
> Solutions are:
> 
> 1) Keep the existing behaviour. Drawback: Does not work an all platforms. 
> 
> 2) Get rid of "execfail" and exec. Instead, print error if return code is 127.
> Drawback: The shell will stay running when the client runs, consuming some
> memory. 
> 
> 3) Check for ${BASH_VERSION}", use existing 1) or 2) depending on if it is set.
> Drawback: In addition to the drawbacks of 1) and 2), we will also have more
> code.

Decided on 2), fixed in 28208.
------- Comment #4 From cendio 2014-03-18 13:37:58 -------
Tested 32bit client build 4290 on Fedora 19 without glibc.i686

[hean01@hean01-desktop bin]$ ../lib/tlclient/tlclient.bin 
bash: ../lib/tlclient/tlclient.bin: /lib/ld-linux.so.2: bad ELF interpreter: No
such file or directory
[hean01@hean01-desktop bin]$ echo $?
126

which return error code 126 and not 127.. maybe catch both ?
------- Comment #5 From cendio 2014-03-31 11:08:49 -------
(In reply to comment #4)
> Tested 32bit client build 4290 on Fedora 19 without glibc.i686
> 
> [hean01@hean01-desktop bin]$ ../lib/tlclient/tlclient.bin 
> bash: ../lib/tlclient/tlclient.bin: /lib/ld-linux.so.2: bad ELF interpreter: No
> such file or directory
> [hean01@hean01-desktop bin]$ echo $?
> 126
> 
> which return error code 126 and not 127.. maybe catch both ?

r28763.
------- Comment #6 From cendio 2014-04-01 15:47:06 -------
(In reply to comment #5)
> (In reply to comment #4)
> > Tested 32bit client build 4290 on Fedora 19 without glibc.i686
> > 
> > [hean01@hean01-desktop bin]$ ../lib/tlclient/tlclient.bin 
> > bash: ../lib/tlclient/tlclient.bin: /lib/ld-linux.so.2: bad ELF interpreter: No
> > such file or directory
> > [hean01@hean01-desktop bin]$ echo $?
> > 126
> > 
> > which return error code 126 and not 127.. maybe catch both ?
> 
> r28763.

Tested using build 4310, works as expected.
------- Comment #7 From cendio 2014-05-12 16:53:07 -------
Now it incorrectly prints that message on most signals though. E.g. SIGKILL
will result in a return code of 137.
------- Comment #8 From cendio 2014-05-12 23:41:01 -------
(In reply to comment #7)
> Now it incorrectly prints that message on most signals though. E.g. SIGKILL
> will result in a return code of 137.

28970
------- Comment #9 From cendio 2014-05-14 09:47:58 -------
(In reply to comment #8)
> (In reply to comment #7)
> > Now it incorrectly prints that message on most signals though. E.g. SIGKILL
> > will result in a return code of 137.
> 
> 28970

Verified using ThinLinc client 4.2.0 build 3454.