Subject: | Prima 1.27 compile error on Fedora 10 due to GenericEvent definition in X.h |
The token GenericEvent is already defined in X.h
The file /usr/include/X11/X.h from xorg-x11-proto-devel-7.4-5.fc10.noarch
defines GenericEvent:
#define GenericEvent 35
This make the compilation barf, due to unintended expansion in
include/apricot.h line 457:
gcc -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/include/gdbm
-O2 -g -pipe -Wall -Wp,-fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -c -Iinclude
-Iinclude/generic
-I/usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi/CORE
-I/usr/local/include -I/usr/include/freetype2 -I/usr/include/gtk-2.0
-I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0
-I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1
-I/usr/include/libpng12 -DHAVE_CONFIG_H=1 -o unix/apc_clipboard.o
unix/apc_clipboard.c
In file included from include/unix/../guts.h:32,
from include/unix/guts.h:93,
from unix/apc_clipboard.c:29:
include/unix/../apricot.h:457: error: expected identifier or ‘(’ before
numeric constant
include/unix/../apricot.h:461: error: expected specifier-qualifier-list
before numeric constant
make: *** [unix/apc_clipboard.o] Error 1
It seems that the problem can be worked around by renaming GenericEvent
in include/apricot.h lines 457 and 461:
457c457
< } GenericEvent, *PGenericEvent;
---
Show quoted text
> } xxxGenericEvent, *PGenericEvent;
461c461
< GenericEvent gen;
---
Show quoted text> xxxGenericEvent gen;
regards
Poul Sørensen
uname:
Linux bjarne 2.6.27.15-170.2.24.fc10.x86_64 #1 SMP Wed Feb 11 23:14:31
EST 2009 x86_64 x86_64 x86_64 GNU/Linux
perl -V
Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
Platform:
osname=linux, osvers=2.6.18-92.1.18.el5,
archname=x86_64-linux-thread-multi
uname='linux x86-1.fedora.phx.redhat.com 2.6.18-92.1.18.el5 #1 smp
wed nov 5 09:00:19 est 2008 x86_64 x86_64 x86_64 gnulinux '
Prima-1.27