Subject: FVWM: configure do not recognize xpm

From: Sigmund Skjelnes <[email-masked]>
Date: Sun, 04 Aug 2002 21:49:39 +0200

Hello, all!
I'd trying to get an fvwm 2.4.8 installed on an netbsd 1.5, but fvwm2 do
not find the xpm. When I'd try to run the configure script, it comes up
with "XPM support    NO". An piece of config.log:
<quote>
configure:2560: checking for XpmReadFileToXpmImage in -lXpm
configure:2579: gcc -o conftest -g -O2   conftest.c -lXpm
-L/usr/local/xpm-3.4k/
lib -lXpm  -L/usr/X11R6/lib  -lSM -lICE -lX11   1>&5
configure:2623: checking for X11/xpm.h
configure:2633: gcc -E  -I/usr/local/xpm-3.4k/exports/include/X11 
-I/usr/X11R6/
include conftest.c >/dev/null 2>conftest.out
configure:2685: checking for Xpm 3.4g or better
configure:2702: gcc -o conftest -g -O2 
-I/usr/local/xpm-3.4k/exports/include/X1
1  -I/usr/X11R6/include  conftest.c  -L/usr/local/xpm-3.4k/lib -lXpm 
-L/usr/X11
R6/lib  -lSM -lICE -lX11  1>&5
configure: failed program was:
#line 2694 "configure"
#include "confdefs.h"
#include <X11/xpm.h>
   int main(int c, char **v) {
   return c == 1 ? 0 :
     XpmIncludeVersion != XpmLibraryVersion() ? 1 :
     XpmIncludeVersion < 30407 ? 2 : 0 ;}
configure:2788: checking for rplay_create in -lrplay

</quote>
This looked like something were wrong in my xpm support. I checked
version of the xpm, and it were xpm 3.4k. fvwm2 requires 3.4g, I'd
assume this is OK. I'd like to check the xpm installation, I downloaded
xpm from ftp.x.org, and installed it in a new directory, not to muck up
the NetBSD package system. The configure script were given proper xpm
options to find the xpm, but got the same negative result. Could xpm not
be backwards compatible? Is there done anything in xpm 3.4k that make
any program looking for xpm 3.4g fail?

Of course I'd get no icons, and when I'd tries to use an .fwvm2rc that
is supposed to look like win 95, I do not get any button bar, I'd think
that is because xpm read is failing, and make the button bar fail too.

Hope somebody have an remedy for this, I'll be very grateful for any
tip.

-- 
Best regards,
Sigmund Skjelnes
--
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: Mikhael Goikhman <[email-masked]>
Date: Sun, 4 Aug 2002 22:28:59 +0000

> configure:2788: checking for rplay_create in -lrplay

It seems that the program is compiled, but returns a non zero.

To be sure, compose this small program myxpmtest.c:

#include <stdio.h>
#include <X11/xpm.h>
int main() {
	printf("XpmIncludeVersion=%d, XpmLibraryVersion=%d\n",
		XpmIncludeVersion, XpmLibraryVersion());
}

Compile it using:

  % gcc -o myxpmtest -I/usr/local/xpm-3.4k/exports/include/X11 -L/usr/local/xpm-3.4k/lib -lX11 -lXpm myxpmtest.c

and run it. You should see the problem better.
It prints for me: XpmIncludeVersion=30411, XpmLibraryVersion=30411.

> that is because xpm read is failing, and make the button bar fail too.

Theoretically a button bar (do you mean FvwmTaskBar or FvwmButtons?)
should work without an xpm support. If it is started when you manage to
build with xpm support, post your relevant configuration lines.

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 5 Aug 2002 00:36:30 +0200

On Sun, Aug 04, 2002 at 09:49:39PM +0200, Sigmund Skjelnes wrote:
> with "XPM support    NO".

Is that the only output?  No explanation of what went wrong?  In
this case, compilation of the test program must have failed, but
there is no indication of this in the ouput below.  Did you by any
chance overlook the error message 

> An piece of config.log:

> R6/lib  -lSM -lICE -lX11  1>&5
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Why is this line chopped into pieces?

<-- There should be an error message here!

> any program looking for xpm 3.4g fail?

3.4k is fine.  Maybe you have multiple xpm versions on your system
that interfere with each other.

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [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: Dominik Vogt <[email-masked]>
Date: Mon, 5 Aug 2002 00:39:55 +0200

> It seems that the program is compiled, but returns a non zero.

Note: If it has compiled, there must be an explanation in thei
configure summary.  If there was no explanation, then the program
was not successfully compiled or not started.

Bye

Dominik ^_^  ^_^

---

From: Mikhael Goikhman <[email-masked]>
Date: Sun, 4 Aug 2002 23:05:06 +0000

> was not successfully compiled or not started.

Sorry, this is not correct. The helpful explanation is always printed
regardless of the failed stage. Since there is no such answer as "NO", but
"no: explanation", it is clear that Sigmund just did not write it down.

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 5 Aug 2002 03:25:16 +0200

> "no: explanation", it is clear that Sigmund just did not write it down.

But it *is* correct.  If compilation fails, you don't get an
explanation:

    [edit configure.in, add a syntax error in the C code]
    $ grep --before-context=1 --after-context=4 "#error" configure.in
    AC_TRY_RUN([#include <X11/xpm.h>
-->  #error
     int main(int c, char **v) {
     return c == 1 ? 0 :
       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
       XpmIncludeVersion < 30407 ? 2 : 0 ;}],
    $ autoreconf > /dev/null && ./configure | grep "With XPM"
-->   With XPM image support?             no
                                         ^^^^

Bye

Dominik ^_^  ^_^

---

From: Dan Espen <[email-masked]>
Date: Mon, 05 Aug 2002 08:00:04 -0400

> with "XPM support    NO". An piece of config.log:
...
> -L/usr/X11R6/lib  -lSM -lICE -lX11  1>&5
...
> Hope somebody have an remedy for this, I'll be very grateful for any

Since you appear to have the XPM library installed in a non-standard
place, you need to follow the instructions in the INSTALL.fvwm file.

Look at the section titled:
"Shared Libraries in Non-standard Places".

-- 
Dan Espen                           E-mail: [email-masked]
444 Hoes Lane  Room RRC 1C-214      Phone: (732) 699-5570
Piscataway, NJ 08854
--
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: Mikhael Goikhman <[email-masked]>
Date: Mon, 5 Aug 2002 22:33:39 +0000

On 05 Aug 2002 20:52:31 +0200, Sigmund Skjelnes wrote:
> Mikhael Goikhman wrote:
> Took your advice, it may look like we have an clue here, cause it wont
> compile:
> 
> bash-2.04$ cd /var/tmp
> bash-2.04$ gcc -o myxpmtest -I/usr/local/xpm-3.4k/exports/include/X11/
> -L/usr/local/xpm-3.4k/lib -lX11 -lXpm myxpmtest.c 
> myxpmtest.c:2: X11/xpm.h: No such file or directory
> bash-2.04$ 
> 
> Took away ../X11, as "#include <X11/xpm.h>
> " includes this.
> 
> Then:
> bash-2.04$ gcc -o myxpmtest -I/usr/local/xpm-3.4k/exports/include/
> -I/usr/X11R6/include -L/usr/local/xpm-3.4k/lib  -lX11 -lXpm myxpmtest.c 
> /usr/bin/ld: cannot open -lX11: No such file or directory
> collect2: ld returned 1 exit status
> 
> Something is definitely rotten, also in my system. Have tried to take
> away those two -l opts, but I'd get " undefined reference to
> `XpmLibraryVersion'". Seems to me that I can't get the object files (or
> library?) files to link as they are supposed to.

This is ok, just add -L/usr/X11R6/lib and probably you will be able to
compile the test program, supply additional parameter to gcc if not.
If you want icons, you should successfully build and run this xpm test.

It is strange that you don't get the gcc or cpp/ld error in config.log.

So, returning to your problem, the correct options for you seem to be:

  ./configure --with-xpm-includes=/usr/local/xpm-3.4k/exports/include \
    --with-xpm-library=/usr/local/xpm-3.4k/lib

Please write to the list.

Regards,
Mikhael.

---

From: Sigmund Skjelnes <[email-masked]>
Date: Tue, 13 Aug 2002 23:49:52 +0200

Hi, all!
Now FVWM2 are up and running nicely, with the win95 look I'd asked for.
All what is left now is to edit setup to fit this installation, I'd
start on that soon. 

What I've done is to (removed the extra xpm installation) (1) re-build
xpm (NetBSD source package), as a result everything that depended on xpm
were re-built as well, so it took the entire evening (do not ask how
long, I'd went to bed). There have been a flaw in fvwm95 ( which is in
current use ), when I'd click on a window, it comes to front, but do not
receive focus. I'd have to click on the icon on button bar to gain
focus. When X is recently started it works ok, when I'd click on a
window, it gets to front and focus are gained, but after Netscape have
crashed once or more, I dont get focus by clicking in a window any more.
This behavior now seems to have disappeared, but I'd won't say its gone
quite yet, this bug is of an periodic kind, it's important to be very
patient. 

Furthermore I'd have tested the myfvwmtest program sent me from Mikhael
Goikhman, and I'd found that some libXpm.so.4 library were missing.
Links were made in /usr/lib, and after sucessful build, it reported 

XpmIncludeVersion=30411, XpmLibraryVersion=30411

as expected. Now, I'd (3) re-installed fvwm2:

./configure --with-xpm-library=/usr/X11R6/lib
--with-xpm-includes=/usr/X11R6/lib

.. this time config summary said "XPM  YES". Then I'd executed "make"
and "make install". It came up with that "configure 95" in main menu,
and soon I'd get that 95 look a like desktop. 

It seems like that xpm installation were bad. Some strange things also
happened to fvwm2, this may or may not be related to all the xpm
trouble, this time it found the setup 95 script, so the .fvwm2rc file
were installed. Happy ending, despite it is'nt very clear how the
scripts finally made it... Thank you very much all of you, and good luck
with the fvwm development. Feel free to ask more questions.