Bug 24530

Summary: xtrap compile error
Product: xorg Reporter: Thomas Zimmermann <tzimmermann>
Component: * OtherAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Fixes Makefile.am none

Description Thomas Zimmermann 2009-10-14 10:59:21 UTC
Created attachment 30408 [details] [review]
Fixes Makefile.am

Hi,

compiling xtrap fails with


make[1]: Entering directory `/root/xorg/app/xtrap'
  CC     chparse.o
  CC     xtrapchar.o
  CC     XEKeybCtrl.o
  CC     xtrapproto.o
xtrapproto.c: In function 'main':
xtrapproto.c:75: warning: cast from pointer to integer of different size
  CC     xtrapin-xtrapin.o
xtrapin.c:93:37: error: X11/extensions/xtraplib.h: No such file or directory
xtrapin.c:94:38: error: X11/extensions/xtraplibp.h: No such file or directory
xtrapin.c:105: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'grabFlag'
xtrapin.c:108: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'optionTable'
xtrapin.c:116: error: expected specifier-qualifier-list before 'Time'

[... Tons of follow-up errors ...]

xtrapin.c: At top level:
xtrapin.c:234: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'found_input_rec'
  CC     xtrapin-XEKeybCtrl.o
make[1]: *** [xtrapin-xtrapin.o] Error 1
make[1]: *** Waiting for unfinished jobs....
XEKeybCtrl.c:107:37: error: X11/extensions/xtraplib.h: No such file or directory
XEKeybCtrl.c:108:38: error: X11/extensions/xtraplibp.h: No such file or directory
make[1]: *** [xtrapin-XEKeybCtrl.o] Error 1
make[1]: Leaving directory `/root/xorg/app/xtrap'
make: *** [all] Error 2


This is caused by the way that Makefile.am uses the variables AM_CFLAGS and trapin_CFLAGS: Those variables are mutual exclusive, which Makefile.am doesn't respect. See [1] for details.

Best regards, Thomas

[1] http://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html
Comment 1 Alan Coopersmith 2009-10-14 11:14:59 UTC
Oops, sorry about that.   Pushed your patch to git master.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.