SUMMARY: dlopen

From: Cengiz Oezcan-Barlach (
Date: Tue May 03 1994 - 16:08:25 CDT

Dear managers,

Original posting:

----- Begin Included Message -----

-->Hi managers,
-->among others we have an SS1 runing SUNOS 4.1.1 and Openwindows 3.0.
-->When a particular user (only this one!) tries to start openwin
-->by typing "openwin" on the console, after a short time
-->he gets the message:
-->dlopen: stub interception failed
-->xinit: can not connect to window server (errno 61)
-->then openwin exits and dumps core.
-->Anyone any idea about the reason of this behaviour?

----- End Included Message -----

There were several answers which are listed below.
It turned out that this user hadn't included /usr/lib in his
LD_LIBRARY_PATH variable. I added this path and now it works.
Thanks to all respondends.


From: (raised on robbery)

Try checking the order in which libraries appear in the user's path,
and try checking if they have the LD_LIBRARY_PATH set, and what it's
set to.

We had the same problem, and solved it two ways:

        1) Changed where /usr/openwin/lib appeared in the user's path
                and made sure they had an LD_LIBRARY_PATH variable.

        2) Switched all the hosts on that particular subnet over to
                X11R5 like the rest of our machines, and put
                OpenWindows inthe garbage, where it belongs.

Hope this helps! :-)


From: (Dick St.Peters)

You rebuilt your shared library (to use DNS?) without adding
"-ldl" to the /usr/lib/shlib.etc/Makefile ld lines.


From: (Brett Lymn)

More than likely the user has been playing with the LD_LIBRARY_PATH
environment variable and put /lib before /usr/lib in there. Remove
the /lib from the LD_LIBRARY_PATH variable and things should work


From: Casper Dik <>

LD_LIBRARY_PATH contains /lib or anotehr alias of /usr/lib that
doesn't exactly match /usr/lib.

The dynamic linker intercepts calls to the functions dlopen, dlclose and
dlsym in the library called ``/usr/lib/'' and executes
them by itself. If you use an LD_LIBRARY_PATH that finds
with another pathname, the calls are not intercepted. The
library contains functions that print:

dlopen: stub interception failed

those are called at that point.

E.g., if you LD_LIBRARY_PATH contains /lib, the dynamic linker will
find /lib/ and it concludes that it isn't /usr/lib/libdl
and calls the functions in the library giving the symptoms you describe.


From: gjones@cvedg.CV.COM (Greg Jones)

Hi There

Not totally sure this will fix your Problems but we where receiving similiar
messages due to having an LD_LIBRARY_PATH set when starting openwin



He probably has a dud LD_LIBRARY_PATH. There should be no mention of /lib or
/usr/lib in it.


From: Christian Lawrence <>

dlopen is a function located in a dynamically linked library
(/usr/lib/ either its not known to at runtime,
the library is corrupted, or its been removed from the file system.
check this file and/or run 'ldconfig /usr/lib'


From: (James Terry)

check his passwd entry for weirdness...
also check his env.


From: (Systems Administrator - Todd Glassey)

Openwin is not setup correctly,

check that the OPENWIN HOME variable is set properly in the
shell and that the LD_LIBRARY_PATH variable has $OPENWINHOME/lib in it
as well.

Should run OK then...

From: (Johnny Hui)

Please post summary or send me a copy.

Thanks in advance!

From: (Alison Garvin)

Hi Cengiz,
Did you get a resolution to your "dlopen" problem?
If so, could you forward me that information please?
I am experiencing a somewhat similar situation on a SparcLX(4.1.3C)
when i try to start up mailtool .. the other openwin tools work
properly, however.
_________________________________________________________________________ Cengiz Oezcan-Barlach
                                Institut fuer Theoretische Elektrotechnik
                                Universitaet Hannover
                                Appelstr. 9A _/_/_/_/_/_/_/_/_/_/_/
Tel.: +49 511 762-3595 30167 Hannover _/ _/_/ _/
Fax : +49 511 762-3204 Germany _/ _/_/_/ _/

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:00 CDT