Bug 17981 - compile failures with git commit xalloc+memset(0) -> xcalloc
Summary: compile failures with git commit xalloc+memset(0) -> xcalloc
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-08 11:11 UTC by Lee Leahu
Modified: 2009-01-07 20:32 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
patch showing fixes to resolve compile errors (3.47 KB, patch)
2008-10-16 09:25 UTC, Lee Leahu
no flags Details | Splinter Review

Description Lee Leahu 2008-10-08 11:11:25 UTC
The basic error is:

error: macro "Xcalloc" requires 2 arguments, but only 1 given
In function 'kbdLinuxCreatePrivate':
warning: initialization from incompatible pointer type
  

This can be traced back to the following git commit:
  id - 8a5b89e8e184f4cbf33c6dee0b06e61d8f857576
  summary - xalloc+memset(0) -> xcalloc

  author	Adam Jackson <ajax@redhat.com>	2008-10-06 19:36:51
  committer	Adam Jackson <ajax@redhat.com>	2008-10-06 19:36:51
  tree	b042833775d237a3971eae7a7192400e064ad50d
  parent	0b7b89fbac0b3865b2cf51295c68a5f4c7523f28 (diff)


I'm using gcc version 4.1.2 and posix thread model.
Comment 1 Lee Leahu 2008-10-08 11:17:31 UTC
these compile errors are on amd athlon 3000+ (32bit)
a second computer running amd turion64 (64bit) had not errors using the same code

compiles were done under Gentoo linux.
Comment 2 Lee Leahu 2008-10-08 13:01:28 UTC
After exporting the changes from that commit and using diff / patch to revert those changes from my build directory, I was able to successfully compile xorg-server.



(In reply to comment #0)
> The basic error is:
> 
> error: macro "Xcalloc" requires 2 arguments, but only 1 given
> In function 'kbdLinuxCreatePrivate':
> warning: initialization from incompatible pointer type
> 
> 
> This can be traced back to the following git commit:
>   id - 8a5b89e8e184f4cbf33c6dee0b06e61d8f857576
>   summary - xalloc+memset(0) -> xcalloc
> 
>   author        Adam Jackson <ajax@redhat.com>  2008-10-06 19:36:51
>   committer     Adam Jackson <ajax@redhat.com>  2008-10-06 19:36:51
>   tree  b042833775d237a3971eae7a7192400e064ad50d
>   parent        0b7b89fbac0b3865b2cf51295c68a5f4c7523f28 (diff)
> 
> 
> I'm using gcc version 4.1.2 and posix thread model.
> 

Comment 3 Lee Leahu 2008-10-15 14:40:49 UTC
The following files still fail to compile:



error: macro "Xcalloc" requires 2 arguments, but only 1 given


hw/dmx/input/dmxmotion.c
hw/dmx/glxProxy/glxutil.c
hw/dmx/dmx.h
hw/dmx/dmxextension.c
Comment 4 Peter Hutterer 2008-10-16 00:35:50 UTC
grep can't find any Xcalloc in those files anymore.
Comment 5 Lee Leahu 2008-10-16 08:05:09 UTC
(In reply to comment #4)
> grep can't find any Xcalloc in those files anymore.
> 

I just re-pulled xorg-server from git and there are still Xcalloc errors found.  Please re-check:

i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../../include    -DHAVE_DIX_CONFIG_H -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I/usr/include/freetype2 -I/usr/include/pixman-1    -I../../../include -I../../../include -I../../../Xext -I../../../composite -I../../../damageext -I../../../xfixes -I../../../Xi -I../../../mi -I../../../miext/shadow  -I../../../miext/damage -I../../../render -I../../../randr -I../../../fb -I../../../hw/dmx -I/include -DHAVE_DMX_CONFIG_H  -I/usr/include/freetype2   -march=pentium3 -O0 -pipe -ggdb -MT dmxmap.o -MD -MP -MF .deps/dmxmap.Tpo -c -o dmxmap.o dmxmap.c
dmxmotion.c:116:76: error: macro "Xcalloc" requires 2 arguments, but only 1 given
dmxmotion.c: In function 'dmxPointerPutMotionEvent':
dmxmotion.c:116: warning: assignment from incompatible pointer type
make[3]: *** [dmxmotion.o] Error 1
make[3]: *** Waiting for unfinished jobs....
mv -f .deps/dmxmap.Tpo .deps/dmxmap.Po
make[3]: Leaving directory `/var/tmp/portage/x11-base/xorg-server-9999/work/xorg-server-9999/hw/dmx/input'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/x11-base/xorg-server-9999/work/xorg-server-9999/hw/dmx'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/x11-base/xorg-server-9999/work/xorg-server-9999/hw'
make: *** [all-recursive] Error 1
Comment 6 Lee Leahu 2008-10-16 09:25:38 UTC
Created attachment 19692 [details] [review]
patch showing fixes to resolve compile errors

The attached patch shows the fixes that had to be made to the latest git pull (Git Commit  d936a4235c9625bd41569cef3452dd086284e0d7) in order for the xorg-server to compile with DMX enabled.

These compile failures where introduced by Git Commit 8a5b89e8e184f4cbf33c6dee0b06e61d8f857576.

See http://cgit.freedesktop.org/xorg/xserver/commit/?id=8a5b89e8e184f4cbf33c6dee0b06e61d8f857576
Comment 7 Lee Leahu 2009-01-07 20:32:40 UTC
Confirming fixed in master with these commits:

5a072c55350f4b73d911ea6a2aeddad844924834
8d0cb507ae568c8da92f10ff1188d797bcaa3d1a


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.