Bug 1883 - compile errors on s390(x) in xc/programs/Xserver/Xext/xvmc.c
Summary: compile errors on s390(x) in xc/programs/Xserver/Xext/xvmc.c
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xext (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Thomas Hellström
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-22 05:57 UTC by Stefan Dirsch
Modified: 2004-11-22 20:47 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
xvmc.c.diff (654 bytes, patch)
2004-11-22 06:20 UTC, Stefan Dirsch
no flags Details | Splinter Review

Description Stefan Dirsch 2004-11-22 05:57:57 UTC
I get compile errors in xc/programs/Xserver/Xext/xvmc.c on s390(x):
implicit declaration of shmat/shmdt and undefined SHM_RDONLY 

And fixing these by including <sys/shm.h> in xvmc.c results in an undefined
reference to xf86getpagesize when linking the static Server. I'm quite sure that
this will happen to all architecutures, which build only static servers.

I'm currently testing a workaround and will attach it later.
Comment 1 Stefan Dirsch 2004-11-22 06:04:06 UTC
These compile errors are related to the latest changes in xvmc.c (1.2 --> 1.3):

Added support for automatic loading of the correct hardware
XvMC driver. This involves a protocol extension of the
XvMC protocol. The XvMC revision number was bumped.
Comment 2 Stefan Dirsch 2004-11-22 06:05:56 UTC
reassigning ...
Comment 3 Stefan Dirsch 2004-11-22 06:20:06 UTC
Created attachment 1324 [details] [review]
xvmc.c.diff

Workaround to fix build on s390(x).
Comment 4 Thomas Hellström 2004-11-22 10:58:01 UTC
Hmm,
The test for SHM presence should be improved, an I'll work out a patch for that.

However, the getpagesize() should be available according to (xf86_ansic.h),
or have I misunderstood something.


/*
 * These things are always required by drivers (but not by libc_wrapper.c),
 * even for a static server because some OSs don't provide them.
 */

extern int xf86getpagesize(void);
extern void xf86usleep(unsigned long);
extern void xf86getsecs(long *, long *);
#ifndef DONT_DEFINE_WRAPPERS
#undef getpagesize
#define getpagesize()		xf86getpagesize()
#undef usleep
#define usleep(ul)		xf86usleep(ul)
#undef getsecs
#define getsecs(a, b)		xf86getsecs(a, b)
#endif
#endif /* _XF86_ANSIC_H */



I believe a better workaround is to disable the local check for your particular
OS, since it is only a hint anyway. Is there an OS define I can use?

/Tomas
Comment 5 Stefan Dirsch 2004-11-22 12:29:33 UTC
Hmm ... OS define is 's390Architecture' and 's390xArchitecture'. 
Comment 6 Thomas Hellström 2004-11-23 09:32:20 UTC
(In reply to comment #5)
> Hmm ... OS define is 's390Architecture' and 's390xArchitecture'. 

I've commited a fix now that gets rid of the getpagesize() call altogether.
Could you try it out and close the bug if it works?

/Thomas
Comment 7 Stefan Dirsch 2004-11-23 15:47:12 UTC
Build on s390(x) works fine now. Thanks! 


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.