Subject: FVWM: fvwm2.1.10 and Xpm3.4k

From: Andrew Laden <[email-masked]>
Date: Wed, 27 Jan 1999 14:18:10 -0500 (EST)

Heya all

 Compiled 2.1.10 on my solaris 2.5.1 machine. Using gcc.

Did it twice, the first time I used the Xpm3.4g. Worked fine.

 Then went and used Xpm3.4k. (I forgot I had it the first time)

Using....

./configure --prefix=/opt/fvwm --with-xpm-library=/opt/fvwm/lib
--with-xpm-includes=/opt/fvwm/include

With:

heckyl# pwd
/opt/fvwm
heckyl# ls -l lib
total 292
-rw-r--r--   1 andrew   users      83380 Mar 19  1998 libXpm.a
lrwxrwxrwx   1 andrew   users         14 Jan 27 14:11 libXpm.so ->
libXpm.so.4.11
-rw-r--r--   1 andrew   users      63956 Mar 19  1998 libXpm.so.4.11
heckyl# ls -l include/X11
total 34
-r--r--r--   1 andrew   users      16644 Mar 19  1998 xpm.h

Got from Configure..

---
checking for XpmReadFileToXpmImage in -lXpm... yes
checking for X11/xpm.h... yes
checking for Xpm 3.4f or better... no
____
Configuration:
 
  FVWM Version:             2.1.10
 
  Build extra modules?      no
  Have ReadLine support?    no
  Have RPlay support?       no
  Have XPM support?         no
 
____

Last time I checked, k was better then f. 

Any ideas?

-Andrew

-- 
---------------------------------------------------------------------
Andrew V. Laden               | Voice: (212) 486-8295
A.V.P. Technology             | Fax  : (212) 355-4271
Sakura Global Capital         | Quote: "Its not my fault!
[email-masked]                |          They told me they fixed it!"
---------------------------------------------------------------------

--
Visit the official FVWM web page at <URL: http://fvwm.math.uh.edu/>.
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: Brad Giaccio <[email-masked]>
Date: Wed, 27 Jan 1999 15:56:52 -0500

Check in your include path it is checking for the version given by the header you may have installed the library but not the header

Brad
 
-- 
--- There are two kinds of knowledge, you either know the answer or
			you know where to find it
		      -Kane, Johnson, and anonymous
--
Visit the official FVWM web page at <URL: http://fvwm.math.uh.edu/>.
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: [email-masked] (Paul D. Smith)
Date: 27 Jan 1999 15:57:50 -0500

%% Andrew Laden <[email-masked]> writes:

  al>  Compiled 2.1.10 on my solaris 2.5.1 machine. Using gcc.

  al> Did it twice, the first time I used the Xpm3.4g. Worked fine.

  al>  Then went and used Xpm3.4k. (I forgot I had it the first time)

  al> Using....

  al> ./configure --prefix=/opt/fvwm --with-xpm-library=/opt/fvwm/lib
  al> --with-xpm-includes=/opt/fvwm/include

  al> ---
  al> checking for XpmReadFileToXpmImage in -lXpm... yes
  al> checking for X11/xpm.h... yes
  al> checking for Xpm 3.4f or better... no
  al> ____
  al> Configuration:
 
  al>   FVWM Version:             2.1.10
 
  al>   Build extra modules?      no
  al>   Have ReadLine support?    no
  al>   Have RPlay support?       no
  al>   Have XPM support?         no

Odd; usually configure will show some reason for not liking xpm here.

Well, first make sure you ran "make distclean", or "rm -f config.cache"
so it's not using any cached information.

If that still doesn't help, look in the config.log file and see where it
tries to compile and run the xpm app to find the version: what does it
say there?

-- 
-------------------------------------------------------------------------------
 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://fvwm.math.uh.edu/>.
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: Andrew Laden <[email-masked]>
Date: Wed, 27 Jan 1999 18:16:30 -0500 (EST)

Recap: Fvwm 2.1.10, Xpm 3.4k, configure sees it, but thinks its less then
3.4f.

> so it's not using any cached information.

Checked that.

> tries to compile and run the xpm app to find the version: what does it

Its says...(minus pine's formatting)

configure:4382: checking for XpmReadFileToXpmImage in -lXpm
configure:4401: gcc -o conftest -g -O2   conftest.c -lXpm -L/opt/fvwm/lib
-lXpm 
 -L/usr/openwin/lib -R/usr/openwin/lib  -lX11 -lsocket  -lnsl  1>&5
configure:4446: checking for X11/xpm.h
configure:4456: gcc -E  -I/opt/fvwm/include  -I/usr/openwin/include
conftest.c >
/dev/null 2>conftest.out
configure:4508: checking for Xpm 3.4f or better
configure:4525: gcc -o conftest -g -O2  -I/opt/fvwm/include
-I/usr/openwin/include  conftest.c  -L/opt/fvwm/lib -lXpm
-L/usr/openwin/lib -R/usr/openwin/lib  -
lX11 -lsocket  -lnsl 1>&5
configure: failed program was:
#line 4517 "configure"
#include "confdefs.h"
#include <X11/xpm.h>
   int main(int c, char **v) {
   return c == 1 ? 0 :
     XpmIncludeVersion != XpmLibraryVersion() ? 1 :
     XpmIncludeVersion < 30406 ? 2 : 0 ;}

On Wed, 27 Jan 1999, Brad Giaccio wrote:

> Check in your include path it is checking for the version given by the
> header you may have installed the library but not the header
> 

That says...

/*
 * first some identification numbers:
 * the version and revision numbers are determined with the following
rule:
 * SO Major number = LIB minor version number.
 * SO Minor number = LIB sub-minor version number.
 * e.g: Xpm version 3.2f
 *      we forget the 3 which is the format number, 2 gives 2, and f gives
6.
 *      thus we have XpmVersion = 2 and XpmRevision = 6
 *      which gives  SOXPMLIBREV = 2.6
 *
 * Then the XpmIncludeVersion number is built from these numbers.
 */
#define XpmFormat 3
#define XpmVersion 4
#define XpmRevision 11
#define XpmIncludeVersion ((XpmFormat * 100 + XpmVersion) * 100 +
XpmRevision)

Still no clue.

-Andrew

---

From: [email-masked] (Paul D. Smith)
Date: 29 Jan 1999 12:48:46 -0500

al> Recap: Fvwm 2.1.10, Xpm 3.4k, configure sees it, but thinks its
  al> less then 3.4f.

  >> tries to compile and run the xpm app to find the version: what does it

  al> Its says...(minus pine's formatting)

  al> configure:4382: checking for XpmReadFileToXpmImage in -lXpm
  al> configure:4401: gcc -o conftest -g -O2   conftest.c -lXpm -L/opt/fvwm/lib
  al> -lXpm 
  al>  -L/usr/openwin/lib -R/usr/openwin/lib  -lX11 -lsocket  -lnsl  1>&5
  al> configure:4446: checking for X11/xpm.h
  al> configure:4456: gcc -E  -I/opt/fvwm/include  -I/usr/openwin/include
  al> conftest.c >
  al> /dev/null 2>conftest.out
  al> configure:4508: checking for Xpm 3.4f or better
  al> configure:4525: gcc -o conftest -g -O2  -I/opt/fvwm/include
  al> -I/usr/openwin/include  conftest.c  -L/opt/fvwm/lib -lXpm
  al> -L/usr/openwin/lib -R/usr/openwin/lib  -
  al> lX11 -lsocket  -lnsl 1>&5
  al> configure: failed program was:
  al> #line 4517 "configure"
  al> #include "confdefs.h"
  al> #include <X11/xpm.h>
  al>    int main(int c, char **v) {
  al>    return c == 1 ? 0 :
  al>      XpmIncludeVersion != XpmLibraryVersion() ? 1 :
  al>      XpmIncludeVersion < 30406 ? 2 : 0 ;}

That's _it_?  No error message after that?  No link error?  Arg.

OK, try extracting the text there into a .c file and compiling it by
hand using the commands configure used:

  $ cat >foo.c
  #include <X11/xpm.h>
  ^D

  $ gcc -o conftest -g -O2  -I/opt/fvwm/include -I/usr/openwin/include foo.c -L/opt/fvwm/lib -lXpm -L/usr/openwin/lib -R/usr/openwin/lib  -lX11 -lsocket  -lnsl

Do you get any compiler or linker errors?  Next try:

  $ ./conftest
  $ echo $?

(assuming Bourne shells; I guess you'd use $status in C shells?)

What is the return code for the program?

---

From: Andrew Laden <[email-masked]>
Date: Fri, 29 Jan 1999 15:08:44 -0500 (EST)

Ok, Got a little luck here, sort of.

 Compiled with no problem or errors. When I tried to run it i got.

# ./conftest    
ld.so.1: ./conftest: fatal: libXpm.so.4.11: can't open file: errno=2
Killed

Check the obvious permission errors. All fine. check the file type.

libXpm.so.4.11: ELF 32-bit MSB dynamic lib SPARC Version 1, dynamically
linked, not stripped

Looks ok.

For S**ts and giggles I checked the 3.4g that I had been using. Noticed
that it didnt have the shared versions, only the straight ar archive. So I
got rid of the shared libraries and only left the unshared libXpm.a in
place.

 Recompiled, reran conftest. Works. Tried configure again. Works. 

So, for some reason, something doesnt like the shared libraries. But That
doesnt bother me, as I would rather used the unshared, so I dont have to
worry about distributing a shared library as I install fvwm around here.

Thats what I get for using pre-compilied binaries of the libraries instead
of compiling them myself.

-Andrew

--

---

From: [email-masked] (Paul D. Smith)
Date: 29 Jan 1999 16:35:12 -0500

al>  Compiled with no problem or errors. When I tried to run it i got.

  al> # ./conftest    
  al> ld.so.1: ./conftest: fatal: libXpm.so.4.11: can't open file: errno=2
  al> Killed

This means that, while the linker can find the shared lib just fine
because you specified -L, the runtime can't find it.  Note that there is
a distinction between linktime paths and runtime paths--older systems
like SunOS didn't make this distinction (or not easily), but newer ones
do.

This means that you don't have your ld.so environment set up correctly.
On Solaris, for example, you can specify the runtime path by either
setting the LD_RUN_PATH env. variable or the -R option at link time.  If
your xpm libraries are in a non-standard place, you _must_ provide one
or the other of these methods for finding it a runtime (or set
LD_LIBRARY_PATH at runtime).

Unfortunately, at this time GNU autoconf (and thus fvwm) doesn't handle
this situation very well :(.  We hope to improve this in the future (see
the BUGS file).  Until then, you'll have to do something like:

  $ LDFLAGS=-R/opt/fvwm/lib ./configure --prefix=/opt/fvwm ...

to explicitly set the -R option.

What really confuses me is why you didn't see this output (or any other
output) in the config.log file.  It should have been there...

Oh well.