Subject: Problems compiling on Solaris

From: Danek Duvall <[email-masked]>
Date: Tue, 22 Feb 2000 15:04:04 -0800

Every once in a while, I get it into my head to try upgrading fvwm on my
Solaris box.  Here's the list of problems I've come across in the latest
snapshot (2/22):

1. The configure script fails to pick up xpm or readline because it tries
to link the test programs with `-lxpm -L/path/to/xpm -lxpm', and Solaris ld
doesn't know how to deal with the first `-lxpm'.  To get past this, I've
just found the appropriate places in the configure script and removed those
bits; I don't know how to fix that in configure.in or aclocal.m4.

2. STROKE_CODE(), with the stroke library not available, ends up giving you
an `empty declaration' warning in bindings.h, builtins.h, and events.h.

3. FvwmDragWell has a few gcc'isms, notably a whole bunch of `//'-style
comments, and one instance of an array being declared with a non-constant
initializer (line 302 of fvwmDragWell.c).

4. safemalloc.h doesn't end in a newline.  This only generates a warning.

5. FvwmPager.c initializes (and tests against) a few Pixel variables being
-1.  Pixel is typedefed as `unsigned long', and Solaris cc doesn't like
that.

The rest seems to compile fine.  I haven't actually run it yet, as I want
FvwmPager to work, and I'm not sure how to work around this error.  (If
someone figures this out before the next snapshot, send me a copy of the
patch so I can finish the build; I don't have immediate CVS access at
work.)

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

---

From: "Paul D. Smith" <[email-masked]>
Date: 22 Feb 2000 21:54:29 -0500

%% Danek Duvall <[email-masked]> writes:

  dd> 1. The configure script fails to pick up xpm or readline because
  dd> it tries to link the test programs with `-lxpm -L/path/to/xpm
  dd> -lxpm', and Solaris ld doesn't know how to deal with the first
  dd> `-lxpm'.  To get past this, I've just found the appropriate places
  dd> in the configure script and removed those bits; I don't know how
  dd> to fix that in configure.in or aclocal.m4.

Hmm.  Please provide the configure command line you used.  I build on
Solaris and I've not seen this problem since the 2.2.x days (and maybe
early 2.3.x).  I thought we'd stomped it...

  dd> 2. STROKE_CODE(), with the stroke library not available, ends up
  dd> giving you an `empty declaration' warning in bindings.h,
  dd> builtins.h, and events.h.

Again, hmm.  I don't use STROKE and I don't see these.  Maybe GCC isn't
being as picky here (we don't use Sun cc).  We'll check it out.

  dd> 3. FvwmDragWell has a few gcc'isms, notably a whole bunch of
  dd> `//'-style comments, and one instance of an array being declared
  dd> with a non-constant initializer (line 302 of fvwmDragWell.c).

Boo!

  dd> 4. safemalloc.h doesn't end in a newline.  This only generates a
  dd> warning.

Boo!

  dd> 5. FvwmPager.c initializes (and tests against) a few Pixel
  dd> variables being -1.  Pixel is typedefed as `unsigned long', and
  dd> Solaris cc doesn't like that.

Boo!

Thx for the report, someone'll fix those.

-- 
-------------------------------------------------------------------------------
 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-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Danek Duvall <[email-masked]>
Date: Tue, 22 Feb 2000 19:02:08 -0800

> early 2.3.x).  I thought we'd stomped it...

    CFLAGS=-O LDFLAGS=-R$prefix/lib PERL=/usr/bin/perl \
    ./configure --prefix=$prefix \
    --with-xpm-library=$prefix/lib --with-xpm-includes=$prefix/include \
    --with-readline-library=$prefix/lib --with-readline-includes=$prefix/include

(Where $prefix is a longish prefix I didn't want to have to type every
time.)

> [...]
> [...]
> [...]

Yeah, well ... gcc is nice in that it'll try really hard to accept almost
anything unless you tell it not to.  Though it probably would scream a bit
if -Wall and some of the other stricter flags were turned on (I forget
whether -ansi or -pedantic is the one to use).  And it can't hurt to have
other compilers checked ... :)

Thanks,
Danek

---

From: "Paul D. Smith" <[email-masked]>
Date: 22 Feb 2000 22:15:46 -0500

dd>     CFLAGS=-O LDFLAGS=-R$prefix/lib PERL=/usr/bin/perl \
  dd>     ./configure --prefix=$prefix \
  dd>     --with-xpm-library=$prefix/lib --with-xpm-includes=$prefix/include \
  dd>     --with-readline-library=$prefix/lib --with-readline-includes=$prefix/include

I'll look into it.

  dd> Yeah, well ... gcc is nice in that it'll try really hard to accept
  dd> almost anything unless you tell it not to.  Though it probably
  dd> would scream a bit if -Wall and some of the other stricter flags
  dd> were turned on (I forget whether -ansi or -pedantic is the one to
  dd> use).  And it can't hurt to have other compilers checked ... :)

I always use -Wall... maybe time to forage into other, more explicit -W
flags.

-ansi -pedantic can cause more problems than it finds, in some cases :-/.

Thx.

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 23 Feb 2000 14:03:39 +0100

> I always use -Wall... maybe time to forage into other, more explicit -W

Every tarball I make has passed a compile run with -Wall -Werror.
I tried all of the other -W flags already but couldn't find one
that I'd like to turn on.

> -ansi -pedantic can cause more problems than it finds, in some cases :-/.

I tried -pedantic once, but it mainly it complains about signed/unsigned
mismatches that are hard to fix.  My attempts in fixing them resulted
in a lot of hard to find new bugs.  I didn't try -ansi yet.

Bye

Dominik ^_^

-- 
Dominik Vogt, Agilent Technologies, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/464-4596, fax: 07031/464-3883, [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]