Subject: FVWM: trouble building fvwm-2.2.4 with xpm

From: Drew Lebauer <[email-masked]>
Date: Mon, 31 Jan 2000 10:52:16 -0700

I just pulled down and successfully built (making both static and shared
libraries) xpm 3.4k. It is installed in /u/asl/opt/usr/openwin (/bin include
include/X11 include/X11/X11 and /lib). When I run configure it can't find the
xpm stuff. It says:

>   Have XPM support?         no: Xpm library or header not found!
>
I'm on an ultra-sparc running SunOS 5.6 (== solaris 2.6). This is a box where I
cannot become root or install anywhere except under my home directory (/u/asl).

I've tried the following command line:
./configure --with-xpm-library=/u/asl/opt/usr/openwin/lib \
--with-xpm-includes=/u/asl/opt/usr/openwin/include/X11 --prefix=/u/asl
--enable-extras

What can I do to make it work?

   ) *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
 (  | Drew Lebauer | Phone: (303) 802-1416 | Fax: (303) 802-1420
  ) | Evolving Systems, Inc.  |  mailto:[email-masked]
c[] *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
    Nothing is impossible; it is merely improbable.

--
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: Dan Espen <[email-masked]>
Date: Mon, 31 Jan 2000 13:12:31 -0500

> What can I do to make it work?

You would have to normally show us the errors.

Leave the X11 part off of the include path.

You're going to need "-R/u/asl/opt/usr/openwin/lib" in your link editor
flags.  The whole process is explained in the INSTALL.fvwm file.

--
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
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: "Paul D. Smith" <[email-masked]>
Date: 31 Jan 2000 13:11:38 -0500

%% Drew Lebauer <[email-masked]> writes:

  dl> I just pulled down and successfully built (making both static and
  dl> shared libraries) xpm 3.4k. It is installed in
  dl> /u/asl/opt/usr/openwin (/bin include include/X11 include/X11/X11
  dl> and /lib). When I run configure it can't find the xpm stuff. It

  >> Have XPM support?         no: Xpm library or header not found!

Which one wasn't found?  Look back up through the output.

  dl> I'm on an ultra-sparc running SunOS 5.6 (== solaris 2.6). This is
  dl> a box where I cannot become root or install anywhere except under
  dl> my home directory (/u/asl).

There's no need to emulate the whole /usr/openwin path under your
directory (if you don't want to).  You could just as easily use
/u/asl/xpm/lib, /u/asl/xpm/bin, etc.

  dl> I've tried the following command line:
  dl> ./configure --with-xpm-library=/u/asl/opt/usr/openwin/lib \
  dl> --with-xpm-includes=/u/asl/opt/usr/openwin/include/X11 --prefix=/u/asl
  dl> --enable-extras

I'll bet it's the header that wasn't found.  By tradition, X headers are
#included in the code as <X11/xpm.h>.  That means that whatever
directory you gave to --with-xpm-includes, the compiler will add
"/X11/xpm.h" to it to find the header.  You gave
/u/asl/opt/usr/openwin/include/X11, so the compiler will be looking for
/u/asl/opt/usr/openwin/include/X11/X11/xpm.h (note two X11's).  That
probably doesn't exist.

Change the configure line to use just
--with-xpm-includes=/u/asl/opt/usr/openwin/include and see if that works
any better.

-- 
-------------------------------------------------------------------------------
 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: Drew Lebauer <[email-masked]>
Date: Mon, 31 Jan 2000 11:30:53 -0700

Xpm installed itself into /u/asl/opt/usr/openwin. The include/X11/X11 directory
really does exist. What it installed (under /u/asl/opt) is (ls -RF):

> usr/
>
> usr:
> openwin/
>
> usr/openwin:
> bin/            include/        lib/            share/
>
> usr/openwin/bin:
> cxpm*   sxpm*
>
> usr/openwin/include:
> X11/
>
> usr/openwin/include/X11:
> X11/
>
> usr/openwin/include/X11/X11:
> xpm.h
>
> usr/openwin/lib:
> libXpm.a        libXpm.so@      libXpm.so.4.11
>
> usr/openwin/share:
> man/
>
> usr/openwin/share/man:
> man1/
>
> usr/openwin/share/man/man1:
> cxpm.1  sxpm.1
>

I have also tried the following command:

> LDFLAGS=-R/u/asl/opt/usr/openwin/lib ./configure --with-xpm-library=/u/asl/opt/usr/openwin/lib --with-xpm-includes=/u/asl/opt/usr/openwin/include/X11 --prefix=/u/asl --enable-extras
>
I get the following error (snippets):

> checking for XpmReadFileToXpmImage in -lXpm... no
>

...

---

From: Dan Espen <[email-masked]>
Date: Mon, 31 Jan 2000 14:27:48 -0500

> > usr/openwin/include/X11/X11:

If this is the way your installation looks, somethings wrong.

It should be:

usr/openwin/include/X11/xpm.h

I suggest starting over.  Get this part right before proceeding.

> > libXpm.a        libXpm.so@      libXpm.so.4.11

This part looks OK.  Strange.

> > LDFLAGS=-R/u/asl/opt/usr/openwin/lib ./configure --with-xpm-library=/u/asl/
> opt/usr/openwin/lib --with-xpm-includes=/u/asl/opt/usr/openwin/include/X11 --
> prefix=/u/asl --enable-extras

As both Paul and I indicated, the "X11" part is no good.  Get the xpm library
to install right first.

> > checking for XpmReadFileToXpmImage in -lXpm... no

As long as the include libs are messed up, I don't think its useful
to dig into this.

---

From: "Paul D. Smith" <[email-masked]>
Date: 31 Jan 2000 14:23:39 -0500

>> checking for XpmReadFileToXpmImage in -lXpm... no

OK.

Go look in the config.log file after a failed configure run.  Look
through it until you find where it's testing for this.

If that doesn't help you figure it out, send us that section of the log
file.

Double-check that you don't have another, older xpm library installed
somewhere earlier on your link path.

---

From: "Paul D. Smith" <[email-masked]>
Date: 31 Jan 2000 15:07:08 -0500

%% Dan Espen <[email-masked]> writes:

  >> > usr/openwin/include/X11/X11:

  de> If this is the way your installation looks, somethings wrong.

I agree with Dan that this is kind of bogus; however, it should work.

I've seen people put symlinks like X11 -> . in their include/X11
directories, so they don't have to worry about this.  Then you can use
include/X11/X11/X11/X11/X11/xpm.h and it'll still work.

Not that I'm recommending that in any way, mind you :).  Symlink loops
are all kinds of hassle.  It's easier to just get the flags right.

  de> usr/openwin/include/X11/xpm.h

  de> I suggest starting over.  Get this part right before proceeding.

You could just move the xpm.h file, you don't need to reinstall or
anything.  There's no magic about the placement of this header.

But, I don't _think_ that's your problem based on your description.

---

From: Drew Lebauer <[email-masked]>
Date: Mon, 31 Jan 2000 14:32:28 -0700

Ok, below is the extract from my config.log file:

> configure:4384: checking for XpmReadFileToXpmImage in -lXpm
> configure:4403: cc -o conftest -g  -R/u/asl/opt/usr/openwin/lib conftest.c -lXpm
>  -L/u/asl/opt/usr/openwin/lib -lXpm  -L/usr/openwin/lib -R/usr/openwin/lib  -lSM
>  -lICE -lX11 -lsocket  -lnsl  1>&5
> ld: fatal: library -lXpm: not found
> ld: fatal: File processing errors. No output written to conftest
> configure: failed program was:
> #line 4392 "configure"
> #include "confdefs.h"
> /* Override any gcc2 internal prototype to avoid an error.  */
> /* We use char because int might match the return type of a gcc2
>     builtin and then its argument prototype would still apply.  */
> char XpmReadFileToXpmImage();
>
> int main() {
> XpmReadFileToXpmImage()
> ; return 0; }
>

---

From: "Paul D. Smith" <[email-masked]>
Date: 31 Jan 2000 16:55:34 -0500

dl> Ok, below is the extract from my config.log file:
  >> configure:4403: cc -o conftest -g  -R/u/asl/opt/usr/openwin/lib conftest.c -lXpm -L/u/asl/opt/usr/openwin/lib -lXpm  -L/usr/openwin/lib -R/usr/openwin/lib  -lSM -lICE -lX11 -lsocket  -lnsl  1>&5

Weird; your link line has two -lXpm's.  The first one is before the
-L/u/asl/opt/usr/openwin/lib, so, it's not looking there for libXpm and
so it's not finding it, and it quits right there.

I vaguely recall this is a bug in the 2.2.x configure, where it puts
things in the wrong order during the test.  I'm pretty sure this is
fixed in the 2.3.x development sources.

Change your configure invocation to put both the -R and the -L in
LDFLAGS:

 $ LDFLAGS="-L/u/asl/opt/usr/openwin/lib -R/u/asl/opt/usr/openwin/lib" ./configure --with-xpm-library=/u/asl/opt/usr/openwin/lib --with-xpm-includes=/u/asl/opt/usr/openwin/include/X11 --prefix=/u/asl --enable-extras

and see if that helps.

---

From: Drew Lebauer <[email-masked]>
Date: Mon, 31 Jan 2000 15:13:38 -0700

Ah. Thanks, That does it. Well, actually I haven't built yet, but the summary reported at the end of running configure does seem to find the xpm now. Thanks.