Bug 247921 - nx fails because nxagent can't find libXcomp.so.2
nx fails because nxagent can't find libXcomp.so.2
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: nx (Show other bugs)
7
All Linux
high Severity medium
: ---
: ---
Assigned To: Axel Thimm
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-11 20:19 EDT by Eric Smith
Modified: 2008-03-04 18:01 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-03-04 18:01:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Eric Smith 2007-07-11 20:19:40 EDT
Description of problem:
nx connections fail with a signal 15 message in the client details.  Turning
on server side logging reveals that nxagent can't run because the dynamic
library libXcomp.so.2 can't be found by ld.so.  The library is present in
/usr/lib/nx. 

Message in session log is:
/usr/libexec/nx/nxagent.orig: error while loading shared libraries: libXcomp.so.
2: cannot open shared object file: No such file or directory

Version-Release number of selected component (if applicable):
nx-2.1.0-22.fc7

How reproducible:
100%

Steps to Reproduce:
1. install nx and freenx on F7 x86-64
2. update nx from Fedora updates
3. attempt an nx connection from a client machine

Actual results:
Connection fails because nxagent can't be run on server.
Session log on server contains error message:
/usr/libexec/nx/nxagent.orig: error while loading shared libraries: libXcomp.so.
2: cannot open shared object file: No such file or directory

Expected results:
successful connection

Additional info:

Manually running ldconfig on /usr/lib/nx seems to fix the problem.
Possibly related to bug 247914?
Comment 1 Axel Thimm 2007-08-13 15:42:26 EDT
(In reply to comment #0)
> /usr/libexec/nx/nxagent.orig: error while loading shared libraries: libXcomp.so.

There is no nxagent.orig file in the nx package:

# smart install freenx nx
[...]
# ls /usr/libexec/nx/nxagent.orig
ls: cannot access /usr/libexec/nx/nxagent.orig: No such file or directory
# rpm -qlp
./download.fedora.redhat.com/pub/fedora/linux/updates/7/i386/nx-2.1.0-22.fc7.i386.rpm
./download.fedora.redhat.com/pub/fedora/linux/updates/7/x86_64/nx-2.1.0-22.fc7.x86_64.rpm
./download.fedora.redhat.com/pub/fedora/linux/updates/7/ppc/nx-2.1.0-22.fc7.ppc.rpm
| grep -c orig
0

I also checked nx-2.1.0-1.fc6 in case the *.orig was from an old install, but it
isn't part of it either.

I suggest you remove nx/freenx packages, make sure there are no leftovers from
previous nx installs in any way and reinstall.
Comment 2 Eric Smith 2007-09-02 12:57:02 EDT
The nxagent.orig was an artifact of my attempting to fix the problem myself,
unsuccessfully.  From a fresh install, with the 2.1.0-22 update, I get the same
problem.  Every time I install any other RPMs that install libraries, nxagent
breaks, and is  unable to find libXcomp.

When I manually run "ldconfig /usr/lib/nx", then it works again until the next
time I install any libraries.

I removed all traces of nx and freenx, reinstalled them with yum, and still have
the same behavior.  I've also seen this problem on a second machine running a
fresh install of Fedora 7 (updated).

Since ldconfig complains about the libraries in /usr/lib/nx, I think this may be
related to bug 247914.
Comment 3 Chitlesh GOORAH 2007-10-04 16:05:14 EDT
well, fedora's nx is completely broken.

chitlesh(~)[1]$/usr/libexec/nx/nxviewer
/usr/libexec/nx/nxviewer: error while loading shared libraries: libXcomp.so.2: 
cannot open shared object file: No such file or directory
[1]+  Done                    pirut
chitlesh(~)[0]$rpm -qf /usr/libexec/nx/nxviewer
nx-2.1.0-22.fc7
chitlesh(~)[0]$rpm -ql nx | grep libXcomp
/usr/lib/nx/libXcomp.so.2
/usr/lib/nx/libXcomp.so.2.1.0
/usr/lib/nx/libXcompext.so.2
/usr/lib/nx/libXcompext.so.2.1.0

chitlesh(~)[0]$nxviewer

NXVIEWER - Version 2.1.0 (based on TightVNC 1.2.9)

Copyright (C) 2001, 2006 NoMachine.
See http://www.nomachine.com/ for more information.

Warning: Unable to load any usable fontset
Warning: Input Method Open Failed
Info: Connecting to RFB server 'lepcao1.u-strasbg.fr'.
Session: Starting session at 'Thu Oct  4 21:59:50 2007'.
nxviewer: Connection timed out.
NXTransDialog: WARNING! Couldn't start '/usr/NX/bin/nxclient'. Error is 2 'No 
such file or directory'.
Warning: Couldn't start '/usr/NX/bin/nxclient'. Error is 2 'No such file or 
directory'.
NXTransDialog: WARNING! Trying with 
path '/usr/NX/bin:/opt/NX/bin:/usr/local/NX/bin:/opt/jre1.6.0_02/bin:/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/opt/jre1.6.0_02/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/usr/lib/alliance/bin:/usr/libexec/sdcc:/home/chitlesh/bin:/usr/lib/alliance/bin:/usr/libexec/sdcc'.
Warning: Trying with 
path '/usr/NX/bin:/opt/NX/bin:/usr/local/NX/bin:/opt/jre1.6.0_02/bin:/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/opt/jre1.6.0_02/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/usr/lib/alliance/bin:/usr/libexec/sdcc:/home/chitlesh/bin:/usr/lib/alliance/bin:/usr/libexec/sdcc'.
NXTransDialog: WARNING! Couldn't start 'nxclient'. Error is 2 'No such file or 
directory'.
Warning: Couldn't start 'nxclient'. Error is 2 'No such file or directory'.
NXTransDialog: WARNING! Trying with 
path '/usr/NX/bin:/opt/NX/bin:/usr/local/NX/bin:/usr/NX/bin:/opt/NX/bin:/usr/local/NX/bin:/opt/jre1.6.0_02/bin:/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/opt/jre1.6.0_02/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/usr/lib/alliance/bin:/usr/libexec/sdcc:/home/chitlesh/bin:/usr/lib/alliance/bin:/usr/libexec/sdcc'.
Warning: Trying with 
path '/usr/NX/bin:/opt/NX/bin:/usr/local/NX/bin:/usr/NX/bin:/opt/NX/bin:/usr/local/NX/bin:/opt/jre1.6.0_02/bin:/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/opt/jre1.6.0_02/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/usr/lib/alliance/bin:/usr/libexec/sdcc:/home/chitlesh/bin:/usr/lib/alliance/bin:/usr/libexec/sdcc'.
Info: Disconnecting from RFB server 'lepcao1.u-strasbg.fr'.
Session: Terminating session at 'Thu Oct  4 22:00:05 2007'.
Info: Disconnected from RFB server 'lepcao1.u-strasbg.fr'.
Session: Session terminated at 'Thu Oct  4 22:00:05 2007'.

there's no /usr/NX/bin but /usr/libexec/NX

was this package tested before pushed to stable repositories ?
Comment 4 Bjorge Solli 2007-10-11 03:56:24 EDT
I got a similar problem. I actually fixed it by doing a:
ln -s /usr/bin/nxagent /usr/libexec/nx/nxagent

I used nomachine's client on a linux machine so the error message was different.
It might be a separate bug, but I got it to work after doing this.

The freenx installation is:
freenx-0.7.0-2.fc7 (x86_64)
nx-2.1.0-1.fc6 (i386)
Linux nx.uib.no 2.6.20-2936.fc7xen #1 SMP Fri Sep 21 11:56:20 EDT 2007 x86_64
x86_64 x86_64 GNU/Linux
Comment 5 Axel Thimm 2007-12-28 18:57:25 EST
(In reply to comment #3)
> well, fedora's nx is completely broken.
> 
> chitlesh(~)[1]$/usr/libexec/nx/nxviewer
> /usr/libexec/nx/nxviewer: error while loading shared libraries: libXcomp.so.2: 
> cannot open shared object file: No such file or directory

(In reply to comment #4)
> I got a similar problem. I actually fixed it by doing a:
> ln -s /usr/bin/nxagent /usr/libexec/nx/nxagent

These kind of problems are expected: %{_libexecdir} is by definition not
supposed to be called directly by the user. Instead it is being called by other
programs like the ones under %{_bindir}

For example:
# cat /usr/bin/nxagent
#! /bin/sh

export LD_LIBRARY_PATH=/usr/lib64/nx:$LD_LIBRARY_PATH
exec /usr/libexec/nx/`basename $0` "$@"

E.g. the nxagent in the path makes the appropriate modifications to the library
search path before calling the actual binary. This is needed since nx ships some
modified standard X11 libraries which should only be visible by nx* binaries.
Since rpaths and static builds are generally deprecated one can only play with
dynamically modified library paths.

Which more or less means that one may not call %{_libexec} binaries directly.

In light of this does anyone see any bug still? :)

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