Subject: FVWM: XFree86 upgrade: fvwm2 and libXpm.so.4

From: Neil Zanella <[email-masked]>
Date: Wed, 24 May 2000 01:28:04 -0230 (NDT)

Hello,

I just upgraded from XFree86 3.3.2.3 to XFree86 3.6 by
installing the binary distribution from scratch under
/usr/X11R6 after backing up my /usr/X11R6 to /usr/X11R6.bak.
The twm window manager started from xdm works fine and is
configured as the default window manager. After reconfiguring
and renaming some files (such as /usr/X11R6/lib/X11/xdm/Xclients
and /usr/X11R6/lib/X11/xinit/Xsession) I tried to run fvwm2
in place of twm as my default window manager. However, I get
the following error in my ~/.xsession-errors file:

/usr/local/bin/fvwm2: error in loading shared libraries
libXpm.so.4: cannot open shared object file: No such file or directory

After looking under my /usr/X11R6 tree it looks like the Xpm library
file libXpm.so.4 is not part of XFree86 and was installed there
separately. I tried making a symbolic link to the same file under
my /usr/X11R6.bak tree but this did not solve my problem and the same
error kept on appearing in my ~/.xsession-errors when I logged in
with xdm.

At this point it seems like the only way to get rid of this problem
is to reinstall the Xpm library files from scratch.

Where do I get the Xpm library files from?
Has anyone experienced this problem before?
Does anyone have any alternative suggestions?

Thanks,

-- Neil Zanella
[email-masked]

--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: "Thomas A. Gardiner" <[email-masked]>
Date: Wed, 24 May 2000 00:48:22 -0400 (EDT)

On Wed, 24 May 2000, Neil Zanella wrote:

...

>Does anyone have any alternative suggestions?

bummer...

On my system I get

$ rpm -ql xpm
/usr/X11R6/lib/libXpm.so.4.11
$ rpm -q xpm
xpm-3.4k-1

So if you use rpm's then apparently you could just download this from
rufus or something.

HTH,

Tom

---

From: Michael Han <[email-masked]>
Date: Tue, 23 May 2000 22:10:04 -0700

Previously from Neil Zanella
>is to reinstall the Xpm library files from scratch.

It's not a terribly difficult installation. For more information:

http://search.yahoo.com/bin/search?p=xpm

leads to:

http://www.inria.fr/koala/lehors/xpm.html

>Does anyone have any alternative suggestions?

Sticking to the packaged setups is generally easier to do and allows
you to solve problems like these more easily. OTOH, people on OSes
like Solaris have to toddle over to sunfreeware.com to pick up all the
necessities Sun forgot to put on their CDs, like gcc, perl and Xpm (I
hear they've finally addressed the issue in Solaris8).
-- 
[email-masked]                         http://www.best.com/~mikehan/
coffee achiever                              San Francisco, California
Avoid cliches like the plague
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Neil Zanella <[email-masked]>
Date: Wed, 24 May 2000 02:51:52 -0230 (NDT)

> >Does anyone have any alternative suggestions?

Thanks for your feedback. I am running Red Hat Linux 5.2 and
my installation had come with xpm-3.4j-3 (output of rpm -q xpm).
I downloaded the xpm package from <ftp://ftp.x.org/contrib/libraries/>
version 3.4k which seems to install fine since I get no error messages.
Among other things after installation I have:

$ ls -l /usr/X11R6/lib/libXpm*
lrwxrwxrwx   /usr/X11R6/lib/libXpm.so -> libXpm.so.4.11
lrwxrwxrwx   /usr/X11R6/lib/libXpm.so.4 -> libXpm.so.4.11
-rwxr-xr-x   /usr/X11R6/lib/libXpm.so.4.11

What is rufus? Can you please give me a complete domain name for rufus?
Also, what is your output of rpm -ql xpm and what version of Red Hat
Linux and XFree86 do you have installed?

Thanks,

Neil

---

From: Neil Zanella <[email-masked]>
Date: Wed, 24 May 2000 03:01:14 -0230 (NDT)

> http://www.inria.fr/koala/lehors/xpm.html

I agree but I must have done something wrong because when I try to
launch netscape I get the following error:

/usr/lib/netscape/netscape-communicator: error in loading shared libraries
libXpm.so.4: cannot open shared object file: No such file or directory

The same happens to me when I try to recompile fvwm2 with xpm support
since fvwm2's configure script does not find the files from my fresh
xpm installation.

Do I have to recompile my whole system to get things to work now?
($%&^@$@!!!)

> hear they've finally addressed the issue in Solaris8).

On one hand I agree since after all I haven't had much luck with
xpm-3.4k.tar.gz (although I the problem I am experiencing seems
a bit of a puzzle). On the other hand an rpm might have dependencies
such as a newer glibc (I am still running glibc 2.0).

Why aren't applications able find my shared library files?
After all they are installed in a very standard location.
Do I need some extra symlinks?

Thanks,

Neil

---

From: Neil Zanella <[email-masked]>
Date: Wed, 24 May 2000 03:27:37 -0230 (NDT)

On Tue, 23 May 2000, Michael Han wrote:

> So after installing, your Xpm lib still isn't usable for linking...
> Seems strange. What's the output of 'make install' when you install
> Xpm? You should have the following things:
> 
> /usr/X11R6/lib/libXpm.a

Ah! The make install installed the .so files and the .h file but
not the .a file. So I need all of them. Huh! I installed the package
according to the installation instruction so why did it not get installed:

xmkmf -a
make
make install
make install.man

What did I do wrong?

> /usr/X11R6/lib/libXpm.so
> /usr/X11R6/lib/libXpm.so.4
> /usr/X11R6/include/X11/xpm.h
> 
> What happens if you do ldd against some Xpm-dependant binary? For
> example:
> 
> $ ldd /usr/lib/netscape/netscape-communicator

I get the following:

]$ ldd /usr/lib/netscape/netscape-communicator
        libBrokenLocale.so.1 => /lib/libBrokenLocale.so.1 (0x40005000)
        libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x40007000)
        libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x4004c000)
        libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x40054000)
        libXmu.so.6 => /usr/X11R6/lib/libXmu.so.6 (0x40068000)
        libXpm.so.4 => not found
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40079000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40084000)
        libdl.so.2 => /lib/libdl.so.2 (0x4011b000)
        libstdc++.so.2.8 => /usr/lib/libstdc++.so.2.8 (0x4011e000)
        libm.so.6 => /lib/libm.so.6 (0x4015f000)
        libc.so.6 => /lib/libc.so.6 (0x40178000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

What does this mean?

Thanks,

Neil

---

From: Michael Han <[email-masked]>
Date: Tue, 23 May 2000 22:43:17 -0700

/usr/X11R6/lib/libXpm.a
/usr/X11R6/lib/libXpm.so

All in all, I'm baffled by your problem with Xpm.
-- 
[email-masked]                         http://www.best.com/~mikehan/
coffee achiever                              San Francisco, California
The life uncaffeinated is not worth living.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Neil Zanella <[email-masked]>
Date: Wed, 24 May 2000 04:15:48 -0230 (NDT)

Hello,

I find the xpm installation program a bit strange. It seems
that you can only build either the static library or the
shared library in one go but not both at once. To build
the shared library I had to uncomment the following line
in the Imakefile:

IMAKE_DEFINES = -DSharedLibXpm=NO

This gave me the required .a file so now I have:

$ ls /usr/X11R6/lib/libXpm*
/usr/X11R6/lib/libXpm.a        /usr/X11R6/lib/libXpm.so.4
/usr/X11R6/lib/libXpm.so       /usr/X11R6/lib/libXpm.so.4.11

However I still get the same errors:

[~/fvwm-2.3.17]# ./configure
checking for X11/xpm.h... yes
checking for Xpm 3.4g or better... no

This is very strange. I have Xpm 3.4k! What exactly is configure
checking for?

Thanks,

Best Regards,

Neil

---

From: Mikhael Goikhman <[email-masked]>
Date: Wed, 24 May 2000 13:03:48 +0300

> /usr/X11R6/lib/libXpm.so       /usr/X11R6/lib/libXpm.so.4.11

Depending on your instalation method, you may also need to run ldconfig.

> This is very strange. I have Xpm 3.4k! What exactly is configure

The standard reply. If you have configure problems, first take a look at
config.log, you should see why "checking for Xpm 3.4g or better" failed.

Also at the end, the real xpm problem should be displayed, like:
  Have XPM support?                  no: Xpm library version is too old!

Regards,
Mikhael.

---

From: Vivek <[email-masked]>
Date: Wed, 24 May 2000 11:17:59 +0100 (BST)

> This is very strange. I have Xpm 3.4k! What exactly is configure

Is /usr/X11R6/lib in your /etc/ld.so.conf?
Have you run ldconfig since installing Xpm?

Other than that, the approach I usually take with configure is to zero in
on the bit of the script that is doing the check and dumping a load of
'echo' statements in there to find out what it's doing: Often configure 
will create a temp .c file and try to compile, link and run it to see if a
library is there: If any of those stages fail, configure thinks the
library is unavailable. Alternatively, If something worked in
Xpm-3.4[ghij] but isn't quite the same in Xpm-3.4k, than you'd get the
same symptom... 

HTH
-- 
fsck -f -b 8193 /dev/cortex

---

From: Neil Zanella <[email-masked]>
Date: Wed, 24 May 2000 08:59:12 -0230 (NDT)

> Is /usr/X11R6/lib in your /etc/ld.so.conf?

Yes.

$ cat /etc/ld.so.conf
/usr/i486-linuxaout/lib
/usr/X11R6/lib
/usr/lib
/usr/i486-linux-libc5/lib
/opt/kde/lib

> Have you run ldconfig since installing Xpm?

The ldconfig man page says that ldconfig is normally run  automatically
at bootup from /etc/rc. I do not have a file or directory called /etc/rc
on my system although I have a directory called /etc/rc.d containing
many files including /etc/rc.d/rc. None of these files contain the string
ldconfig so I assume that my Red Hat 5.2 box was not set up for this and
I have to run ldconfig manually. I have never used ldconfig before nor was
I aware of the existence of this tool. I shall log in as root and run
"/sbin/ldconfig -v" and hope that fixes it...

  Have XPM support?                  yes

Hurray!

I really think that the ldconfig step should have been done by the xpm
installation script or should have at least been mentioned in the
documentation. Oh well...

Thanks,

Neil

---

From: "Thomas A. Gardiner" <[email-masked]>
Date: Wed, 24 May 2000 08:26:50 -0400 (EDT)

Rufus is another site I usually go to for rpms.

http://rufus.w3.org/linux/RPM/

It's a nice repository...  I'm using RH6.1, for xpm I get

[maxwell: ~/]$ rpm -qi xpm
Name        : xpm                          Relocations: (not relocateable)
Version     : 3.4k                              Vendor: Red Hat Software
Release     : 1                             Build Date: Mon Aug 30
12:08:13 1999
Install date: Sat Mar 11 15:54:27 2000      Build Host:
porky.devel.redhat.com
Group       : System Environment/Libraries   Source RPM:
xpm-3.4k-1.src.rpm
Size        : 61647                            License: MIT
Packager    : Red Hat Software <http://developer.redhat.com/bugzilla>
Summary     : A pixmap library for the X Window System.
Description :
The xpm package contains the XPM pixmap library for the X Window
System.  The XPM library allows applications to display color,
pixmapped images, and is used by many popular X programs.

[maxwell: ~/]$ rpm -ql xpm
/usr/X11R6/lib/libXpm.so.4.11

and for XFree86 I get...

[maxwell: ~/]$ rpm -q XFree86
XFree86-3.3.5-3

Both of these are directly from the RH6.1 distribution.

As for the Xpm library you installed it looks like the packager just
thought that some programs might get confused by the suffix, so added a
couple links to other names.

Tom

---

From: Erik Steffl <[email-masked]>
Date: Wed, 24 May 2000 08:41:33 -0700

in addition to other info posted here:

  if ldd shows that the library is not found and you know that you have
given library installed (either you remember installing it or you used
find to find it), you can use LD_LIBRARY_PATH environmental variable to
make ld look for libraries in that directory (that's mostly to try stuff
out, for real solution you usually want to add the path to /etc/ld.conf
and run ldconfig (or just run ldconfig)).

	erik

---

From: [email-masked] (Paul D. Smith)
Date: 24 May 2000 13:15:38 -0400

There have been a lot of questions and answers, I just wanted to note a
few things:

 1) My opinion is that the method you used to upgrade X wasn't optimal.
    There are a ton of things installed in the typical /usr/X11R6 which
    don't come with X itself.  I suspect you'll find that xpm is just
    the tip of the iceberg for missing tools and libraries.

    What I would recommend, if you can't or don't want to use your
    package management system to do the upgrade (which would be my first
    choice) is that you make a complete _copy_ of your existing
    /usr/X11R6 directory, as a backup.  Then install the new one _on top
    of_ your existing hierarchy, instead of separately.

    That way you should keep all your existing libraries, plus add the
    new ones (they're all different .so versions, etc.), and get all the
    new servers and standard X apps while still keeping the ones that
    don't come with X.

 2) Xpm uses Imake which... well, let's face it, Imake sucks.  That's
    why it's so much more obscure and difficult to build than your
    typical autoconf package.  But, since Xpm is almost always provided
    pre-built these days it just doesn't seem worthwhile to fix it.

 3) The reason Xpm doesn't run ldconfig on install is that many systems
    don't have or need it, and Xpm builds on any X-based system.  Also,
    ldconfig requires root permissions and many people don't install as
    root.  I agree it _could_ be added to the docs as a "you may need
    to..." note, but... see #2 :).

 4) You don't need the libXpm.a file, unless you want to build Xpm
    statically into an app.  The .a files are not used in any way during
    dynamic linking.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email-masked]>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Neil Zanella <[email-masked]>
Date: Wed, 24 May 2000 23:36:46 -0230 (NDT)

> Rufus is another site I usually go to for rpms.

I just had a look at <http://rufus.w3.org/linux/RPM/>.
Nice site. Too bad they don't have rpms for XFree86 3.3.6.

> /usr/X11R6/lib/libXpm.so.4.11

So perhaps I did not need to build /usr/X11R6/lib/libXpm.a by uncommenting
IMAKE_DEFINES = -DSharedLibXpm=NO in the Imakefile and all I needed to do
is run /sbin/ldconfig -v. Do you have /usr/X11R6/lib/libXpm.a? If so what
is the output of rpm -qf /usr/X11R6/lib/libXpm.a?

...just wondering.

Thanks,

Neil

---

From: "Thomas A. Gardiner" <[email-masked]>
Date: Wed, 24 May 2000 22:21:36 -0400 (EDT)

Hi,

>is the output of rpm -qf /usr/X11R6/lib/libXpm.a?

No I do not have a libXpm.a .  Also you probably do not need a libXpm.a .
I'm fairly sure that someone has already said this, but files with a ".a"
suffix are for building executeables with the library "staticly
(sp?) linked", while ".so" files are dynamicly linked libraries.  All you
should need is a ".so" file unless you are trying to do some sort of code
devel.  So, all in all, you probably just needed to do the install and run
ldconfig.

Tom

---

From: Mikhael Goikhman <[email-masked]>
Date: Thu, 25 May 2000 15:58:08 +0300

> Nice site. Too bad they don't have rpms for XFree86 3.3.6.

  http://rufus.w3.org/linux/RPM/XFree86.html

You also need -libs, -devel, -75dpi-fonts and your specific X server.

Regards,
Mikhael.