Subject: FVWM: Preprozessor error

From: [email-masked]
Date: Mon, 11 Nov 2002 10:02:36 +0100 (MET)

Hi,

I tried to compile fvwm (version 2.4.13) on my Mac
(Mac OS X 10.2.1, Compiler is gcc 3.1) and I got an
error ...

Here is the output :
menus.c:240: illegal expression, found 'void'
fvwm.h:120: parse error in conditional expression

It seems to me that the preprozessor doesn't like 
#if RETSIGTYPE != void

What can I do to compile fvwm ?
(And please, don't tell me that I should update my compile, I can't do it
...
And yes, I know that fvwm runs on Mac, since several poeple use an older
version. They didn`t compile it, they got a precompiled package ...)

Thanks for reading ...

-- 
Frederic Gobin
Georg-Wopfner-Str. 58
80939 Muenchen

Telefon : 089 / 32 36 91 13
Handy : 0170 / 804 68 52
eMail : mailto:[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: Wed, 13 Nov 2002 01:59:11 +0100

> (And please, don't tell me that I should update my compile, I can't do it

Well, if upgrading is out of the question, how about downgrading?
Are you maybe running a broken cpp?  Is it definitely the one that
comes with gcc?

> version. They didn`t compile it, they got a precompiled package ...)

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: Denis Perelyubskiy <[email-masked]>
Date: Tue, 12 Nov 2002 17:59:28 -0800

>Are you maybe running a broken cpp?  Is it definitely the one that
  [...]

I know next to nothing about the way fvwm is built (I know
it works when I ./configure/make it :) ), but it seems that
RETSIGTYPE is defined in config.h. Is that file dynamically
generated?

I could see how if that file is not present (or is for some
reason wrong) and RETSIGTYPE is not defined, you'd get an
error message, since preprocessor would see something like 
   #if != void

denis

-- 
// mailto: Denis Perelyubskiy <[email-masked]>
// icq   : 12359698
// PGP   : http://www.cs.ucla.edu/~denisp/files/pgp.asc
--
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: Wed, 13 Nov 2002 10:42:35 +0100

> error message, since preprocessor would see something like 

Then it should stop compiling when it reaches the

  #include "config.h"

line.

Bye

Dominik ^_^  ^_^

---

From: [email-masked]
Date: Tue, 19 Nov 2002 11:55:35 +0100 (MET)

> Then it should stop compiling when it reaches the

Hi there,

thanks for your help ...

I made it simple, I played preprocessor ...
I looked in config.h, found that RETSIGTYPE was defined as void and replaced
the corresponding lines in fvwm/fvwm.h.
Now the line looks like "#define SIGNAL_RETURN return"

After that little change, I can run make ...

... but I get another error :

Compiling of FvwmBacker stops with an error about undefined symbols :

gcc  -g -O2  -o FvwmBacker  FvwmBacker.o root_bits.o -L../../libs
-L/usr/X11R6/lib -lfvwm -lXpm         -lSM -lICE -lXext -lX11 -lm
ld: Undefined symbols:
_Pcmap
_Pdepth
_Pdpy
_Pvisual
make[3]: *** [FvwmBacker] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive-am] Error 2

What can I do here ?

(My goal is to write a little howto for compiling Fvwm 2.4.13 on Mac Os X
version 10.2.2 ...)

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 19 Nov 2002 12:31:45 +0100

> (My goal is to write a little howto for compiling Fvwm 2.4.13 on Mac Os X

Really, I think all you can do is to switch to a working compiler
and report the bugs to the gcc crew.

Bye

Dominik ^_^  ^_^

---

From: [email-masked]
Date: Tue, 19 Nov 2002 13:01:50 +0100 (MET)

> > > >   >> (And please, don't tell me that I should update my compile, I
> can't
> > > do it
> > > >   >

I know two things :
1) The actual version of gcc is 3.2
2) The version 3.1 for Mac Os X 10.2.2 is part of the devlopper tools ...

I don't know if it is possible to simpy upgrade gcc to 3.2 ...

And reporting Bugs ... not really a solution. Here's the result of gcc -v

Reading specs from /usr/libexec/gcc/darwin/ppc/3.1/specs
Thread model: posix
Apple Computer, Inc. GCC version 1161, based on gcc version 3.1 20020420
(prerelease)

-- 
Frederic Gobin
Georg-Wopfner-Str. 58
80939 Muenchen

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 19 Nov 2002 13:56:51 +0100

> > On Tue, Nov 19, 2002 at 11:55:35AM +0100, [email-masked] wrote:
[snip]
> I don't know if it is possible to simpy upgrade gcc to 3.2 ...

gcc-3.2 wouldn't help either.  We already have several reports of
compiler bugs that prevent 3.2 from compiling fvwm properly.
Isn't 2.95.x available for the Mac too?

> Apple Computer, Inc. GCC version 1161, based on gcc version 3.1 20020420

:-P

Bye

Dominik ^_^  ^_^

---

From: [email-masked]
Date: Tue, 19 Nov 2002 14:11:39 +0100 (MET)

> > > > (My goal is to write a little howto for compiling Fvwm 2.4.13 on Mac
> Os
> > > X
> > > > version 10.2.2 ...)
> > > 
GCC 2.95.x is part of the older devlopper tools ... of course, they on run
on Mac OS X 10.1.x ...
As said bevore, GCC 3.1 is the only processor available for me ...

-- 
Frederic Gobin
Georg-Wopfner-Str. 58
80939 Muenchen

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 19 Nov 2002 14:47:26 +0100

[snip]

[snip]

> GCC 2.95.x is part of the older devlopper tools ... of course, they run
> on Mac OS X 10.1.x ...
> As said before, GCC 3.1 is the only preprocessor available for me ...

Well, if the only available cpp is broken, you basically have no
working gcc at all, right?  I can't think of anything else but to
live with it or let someone else compile it with a working
compiler.

Bye

Dominik ^_^  ^_^

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 19 Nov 2002 14:17:43 +0000

> Isn't 2.95.x available for the Mac too?

I just want to clarify that 2 reports we have about gcc-3.x are Mac
related. On other platforms any recent gcc version (2.96 or 3.2) may be
used to build fvwm. At least this is what I use for the last 2 years.

Regards,
Mikhael.

---

From: [email-masked]
Date: Tue, 19 Nov 2002 16:24:32 +0100 (MET)

> live with it or let someone else compile it with a working

Why broken ? I compiled mysql without problems ...
blackbox and some other tools are just fine ...

But I want fvwm as windowmanager for XDarwin (Xfree on Mac OS X)

-- 
Frederic Gobin
Georg-Wopfner-Str. 58
80939 Muenchen

---

From: Peter McAlpine <[email-masked]>
Date: Tue, 19 Nov 2002 10:56:19 -0500

> blackbox and some other tools are just fine ...

Maybe broken is a bit too strong of a word... but it's definately
buggy. fvwm has bugs, but it's still useable the vast majority of the
time. Same with your compiler, useable most of the time, but not all
the time.

peter
-- 
Peter McAlpine
[email-masked]

---

From: Dan Espen <[email-masked]>
Date: Tue, 19 Nov 2002 11:14:57 -0500

> But I want fvwm as windowmanager for XDarwin (Xfree on Mac OS X)

You reported that this wouldn't preprocess:

#if RETSIGTYPE != void

It looks valid to me.

Then you reported that you got this linker error:

Those symbols should have been in libfvwm.a, located in
../../libs.  They are defined in libs/PictureBase.c.
(I'm not sure what adds the "_", but I think they are normal.)

Anyway, it just looks like your compiler isn't working.

We've had other users report successful Fvwm compiles on MacOS.

-- 
Dan Espen                           E-mail: [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 19 Nov 2002 17:41:56 +0100

> blackbox and some other tools are just fine ...

  Broken = unable to compile/preprocess perfectly legal code

How else would you call that?

Bye

Dominik ^_^  ^_^

---

From: [email-masked]
Date: Tue, 19 Nov 2002 17:41:42 +0100 (MET)

> We've had other users report successful Fvwm compiles on MacOS.

I got it !!!
My fix for the preprocessor error :
   I did it myself (fvwm/fvwm.h: lines 120-124)
My fix for those undefined symbols :
   In modules/FvwmBacker I changed the Makefile :
all:
        echo "Removed !!!"
(Means : I don't have the FvwmBacker Module)

But with these changes, I can compile it ...

-- 
Frederic Gobin
Georg-Wopfner-Str. 58
80939 Muenchen