Bug 29109

Summary: --disable-mitshm is broken
Product: xorg Reporter: Michael Olbrich <m.olbrich>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
patch to fix the problem none

Description Michael Olbrich 2010-07-16 05:37:25 UTC
using --disable-mitshm results in:

  CCLD   Xorg                                                                                                                                          
./.libs/libxorg.a(sdksyms.o):(.data.rel+0xa10): undefined reference to `ShmRegisterFuncs'                                                              
./.libs/libxorg.a(sdksyms.o):(.data.rel+0xa14): undefined reference to `ShmRegisterFbFuncs'                                                            
./.libs/libxorg.a(sdksyms.o):(.data.rel+0xa18): undefined reference to `ShmSegType'                                                                    
./.libs/libxorg.a(sdksyms.o):(.data.rel+0xa1c): undefined reference to `ShmCompletionCode'                                                             
./.libs/libxorg.a(sdksyms.o):(.data.rel+0xa20): undefined reference to `BadShmSegCode'                                                                 
collect2: ld returned 1 exit status                                                                                                                    

the problen is that sdksyms.sh includes shmint.h unconditionally. This should probably be:

#ifdef MITSHM
#include "shmint.h"
#endif

or something like that.
Comment 1 Julien Cristau 2010-07-16 05:42:21 UTC
On Fri, Jul 16, 2010 at 05:37:25 -0700, bugzilla-daemon@freedesktop.org wrote:

> the problen is that sdksyms.sh includes shmint.h unconditionally. This should
> probably be:
> 
> #ifdef MITSHM
> #include "shmint.h"
> #endif
> 
> or something like that.
> 
If you've tested that, please send a patch to xorg-devel@lists.x.org,
per http://www.x.org/wiki/Development/Documentation/SubmittingPatches

Thanks.
Comment 2 Michael Olbrich 2010-07-29 04:03:15 UTC
Created attachment 37435 [details] [review]
patch to fix the problem

I sent this to xorg-devel@lists.x.org as requested. I'm adding the patch here, so it won't get lost.
Comment 3 Adam Jackson 2018-06-11 21:23:50 UTC
commit 8b29addc30163bb7ba74c74351f312aac02f049a
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Sun Oct 9 04:00:41 2011 -0700

    loader: when creating sdksyms.c only include shmint.h if MITSHM is enabled #29109
    
    https://bugs.freedesktop.org/show_bug.cgi?id=29109
    
    When configured with --disable-mitshm the symbols declared in shmint.h
    do not exist. By guarding the include with '#ifdef MITSHM' these
    symbols are skipped when generating sdksyms.c with --disable-mitshm.
    
    Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>

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.