[MacPorts] #36055: Tiger PPC: xorg-server-1.13.0 fails to build on Tiger PPC because of multiple definitions of symbol _XkbFreeGeomOverlayKeys?

MacPorts noreply at macports.org
Wed Sep 11 14:19:09 PDT 2013


#36055: Tiger PPC: xorg-server-1.13.0 fails to build on Tiger PPC because of
multiple definitions of symbol _XkbFreeGeomOverlayKeys?
------------------------------+------------------------
  Reporter:  Peter_Dyballa@…  |      Owner:  jeremyhu@…
      Type:  defect           |     Status:  closed
  Priority:  Normal           |  Milestone:
 Component:  ports            |    Version:  2.1.2
Resolution:  wontfix          |   Keywords:  tiger
      Port:  xorg-server      |
------------------------------+------------------------

Comment (by Peter_Dyballa@…):

 Yesterday I tried to determine which functions from which files libraries
 actually stop the X server from building. First I looked at this group of
 multiple definitions:

 {{{
 ../../../dix/.libs/dixfonts.o definition of
 _DeleteFontClientID in section (__TEXT,__text)
 /opt/local/lib/libXfont.dylib(single module) definition of
 _DeleteFontClientID
 ../../../dix/.libs/dixfonts.o definition of
 _GetClientResolutions in section (__TEXT,__text)
 /opt/local/lib/libXfont.dylib(single module) definition of
 _GetClientResolutions
 ../../../dix/.libs/dixfonts.o definition of
 _GetDefaultPointSize in section (__TEXT,__text)
 /opt/local/lib/libXfont.dylib(single module) definition of
 _GetDefaultPointSize
 ../../../dix/.libs/dixfonts.o definition of
 _GetNewFontClientID in section (__TEXT,__text)
 /opt/local/lib/libXfont.dylib(single module) definition of
 _GetNewFontClientID
 ../../../dix/.libs/dixfonts.o definition of
 _RegisterFPEFunctions in section (__TEXT,__text)
 /opt/local/lib/libXfont.dylib(single module) definition of
 _RegisterFPEFunctions
 ../../../dix/.libs/dixfonts.o definition of
 _StoreFontClientFont in section (__TEXT,__text)
 /opt/local/lib/libXfont.dylib(single module) definition of
 _StoreFontClientFont
 ../../../dix/.libs/dixfonts.o definition of
 _client_auth_generation in section (__TEXT,__text)
 /opt/local/lib/libXfont.dylib(single module) definition of
 _client_auth_generation
 ../../../dix/.libs/dixfonts.o definition of
 _find_old_font in section (__TEXT,__text)
 /opt/local/lib/libXfont.dylib(single module) definition of
 _find_old_font
 ../../../dix/.libs/dixfonts.o definition of
 _init_fs_handlers in section (__TEXT,__text)
 /opt/local/lib/libXfont.dylib(single module) definition of
 _init_fs_handlers
 ../../../dix/.libs/dixfonts.o definition of
 _remove_fs_handlers in section (__TEXT,__text)
 /opt/local/lib/libXfont.dylib(single module) definition of
 _remove_fs_handlers
 }}}

 I located the functions in these files:

 {{{
 libXfont-1.4.6/src/stubs/findoldfnt.c                   xorg-server-
 devel-1.14.99.0/dix/dixfonts.c
 --------------------------------------------------------------------------------------------------
                                                         FontPtr
                                                         find_old_font(XID
 id)
                                                         {
 weak FontPtr                                                pointer pFont;
 find_old_font(FSID id)
 {
 dixLookupResourceByType(&pFont, id, RT_NONE, serverClient, DixReadAccess);
     return (FontPtr)NULL;                                   return
 (FontPtr) pFont;
 }                                                       }

 libXfont-1.4.6/src/stubs/getnewfntcid.c                 xorg-server-
 devel-1.14.99.0/dix/dixfonts.c
 --------------------------------------------------------------------------------------------------
                                                         _X_EXPORT
 weak Font                                               Font
 GetNewFontClientID(void)
 GetNewFontClientID(void)
 {                                                       {
     return (Font)0;                                         return
 FakeClientID(0);
 }                                                       }

 libXfont-1.4.6/src/stubs/stfntcfnt.c                    xorg-server-
 devel-1.14.99.0/dix/dixfonts.c
 --------------------------------------------------------------------------------------------------
                                                         _X_EXPORT
 weak int                                                int
 StoreFontClientFont(FontPtr pfont, Font id)
 StoreFontClientFont(FontPtr pfont, Font id)
 {                                                       {
     return 0;                                               return
 AddResource(id, RT_NONE, (pointer) pfont);
 }                                                       }

 libXfont-1.4.6/src/stubs/delfntcid.c                    xorg-server-
 devel-1.14.99.0/dix/dixfonts.c
 --------------------------------------------------------------------------------------------------
                                                         _X_EXPORT
                                                         void
 weak void
 DeleteFontClientID(Font id)
 DeleteFontClientID(Font id)                             {
 {
 FreeResource(id, RT_NONE);
 }                                                       }

 libXfont-1.4.6/src/stubs/initfshdl.c                    xorg-server-
 devel-1.14.99.0/dix/dixfonts.c
 --------------------------------------------------------------------------------------------------
                                                         _X_EXPORT
                                                         int
 init_fs_handlers(FontPathElementPtr fpe, BlockHandlerProcPtr
 block_handler)
                                                         {
                                                             /* if server
 has reset, make sure the b&w handlers are reinstalled */
                                                             if
 (last_server_gen < serverGeneration) {
 last_server_gen = serverGeneration;
 fs_handlers_installed = 0;
                                                             }
                                                             if
 (fs_handlers_installed == 0) {
                                                                 if
 (!RegisterBlockAndWakeupHandlers(block_handler,
 FontWakeup, (pointer) 0))
 weak int                                                            return
 AllocError;
 init_fs_handlers(FontPathElementPtr fpe,
 fs_handlers_installed++;
                  BlockHandlerProcPtr block_handler)         }
 {
 QueueFontWakeup(fpe);
   return Successful;                                        return
 Successful;
 }                                                       }

 libXfont-1.4.6/src/stubs/rmfshdl.c                      xorg-server-
 devel-1.14.99.0/dix/dixfonts.c
 --------------------------------------------------------------------------------------------------
                                                         _X_EXPORT
                                                         void
 remove_fs_handlers(FontPathElementPtr fpe, BlockHandlerProcPtr
 block_handler,
 Bool all)
                                                         {
                                                             if (all) {
                                                                 /* remove
 the handlers if no one else is using them */
                                                                 if
 (--fs_handlers_installed == 0) {
 weak void
 RemoveBlockAndWakeupHandlers(block_handler, FontWakeup,
 remove_fs_handlers(FontPathElementPtr fpe,
 (pointer) 0);
                    BlockHandlerProcPtr blockHandler,            }
                    Bool all)                                }
 {
 RemoveFontWakeup(fpe);
 }                                                       }

 libXfont-1.4.6/src/stubs/getdefptsize.c                 xorg-server-
 devel-1.14.99.0/dix/dixfonts.c
 --------------------------------------------------------------------------------------------------
                                                         _X_EXPORT
 weak int                                                int
 GetDefaultPointSize(void)
 GetDefaultPointSize(void)
 {                                                       {
     return 0;                                               return 120;
 }                                                       }

 libXfont-1.4.6/src/stubs/getcres.c                      xorg-server-
 devel-1.14.99.0/dix/dixfonts.c
 --------------------------------------------------------------------------------------------------
                                                         _X_EXPORT
                                                         FontResolutionPtr
 GetClientResolutions(int *num)
                                                         {
                                                             static struct
 _FontResolution res;
                                                             ScreenPtr
 pScreen;

                                                             pScreen =
 screenInfo.screens[0];
 res.x_resolution = (pScreen->width * 25.4) / pScreen->mmWidth;
                                                             /*
                                                              * XXX - we'll
 want this as long as bitmap instances are prevalent
                                                              so that we
 can match them from scalable fonts
                                                              */
                                                             if
 (res.x_resolution < 88)
 res.x_resolution = 75;
                                                             else
 res.x_resolution = 100;
 res.y_resolution = (pScreen->height * 25.4) / pScreen->mmHeight;
                                                             if
 (res.y_resolution < 88)
 res.y_resolution = 75;
                                                             else
 weak FontResolutionPtr
 res.y_resolution = 100;
 GetClientResolutions(int *num)                              res.point_size
 = 120;
 {                                                           *num = 1;
   return (FontResolutionPtr) 0;                             return &res;
 }                                                       }

 libXfont-1.4.6/src/stubs/regfpefunc.c                   xorg-server-
 devel-1.14.99.0/dix/dixfonts.c
 --------------------------------------------------------------------------------------------------
                                                         /*
                                                          * returns the
 type index of the new fpe
                                                          *
                                                          * should be
 called (only once!) by each type of fpe when initialized
                                                          */

                                                         _X_EXPORT
                                                         int
 RegisterFPEFunctions(NameCheckFunc name_func,
 InitFpeFunc init_func,
 FreeFpeFunc free_func,
 ResetFpeFunc reset_func,
 OpenFontFunc open_func,
 CloseFontFunc close_func,
 ListFontsFunc list_func,
 StartLfwiFunc start_lfwi_func,
 NextLfwiFunc next_lfwi_func,
 WakeupFpeFunc wakeup_func,
 ClientDiedFunc client_died,
 LoadGlyphsFunc load_glyphs,
 StartLaFunc start_list_alias_func,
 NextLaFunc next_list_alias_func, SetPathFunc set_path_func)
                                                         {
                                                             FPEFunctions
 *new;

                                                             /* grow the
 list */
                                                             new =
 (FPEFunctions *) realloc(fpe_functions,
 (num_fpe_types + 1) * sizeof(FPEFunctions));
                                                             if (!new)
                                                                 return -1;
                                                             fpe_functions
 = new;

 weak int
 fpe_functions[num_fpe_types].name_check = name_func;
 RegisterFPEFunctions(NameCheckFunc name_func,
 fpe_functions[num_fpe_types].open_font = open_func;
                      InitFpeFunc init_func,
 fpe_functions[num_fpe_types].close_font = close_func;
                      FreeFpeFunc free_func,
 fpe_functions[num_fpe_types].wakeup_fpe = wakeup_func;
                      ResetFpeFunc reset_func,
 fpe_functions[num_fpe_types].list_fonts = list_func;
                      OpenFontFunc open_func,
 fpe_functions[num_fpe_types].start_list_fonts_with_info = start_lfwi_func;
                      CloseFontFunc close_func,
 fpe_functions[num_fpe_types].list_next_font_with_info = next_lfwi_func;
                      ListFontsFunc list_func,
 fpe_functions[num_fpe_types].init_fpe = init_func;
                      StartLfwiFunc start_lfwi_func,
 fpe_functions[num_fpe_types].free_fpe = free_func;
                      NextLfwiFunc next_lfwi_func,
 fpe_functions[num_fpe_types].reset_fpe = reset_func;
                      WakeupFpeFunc wakeup_func,
 fpe_functions[num_fpe_types].client_died = client_died;
                      ClientDiedFunc client_died,
 fpe_functions[num_fpe_types].load_glyphs = load_glyphs;
                      LoadGlyphsFunc load_glyphs,
 fpe_functions[num_fpe_types].start_list_fonts_and_aliases =
                      StartLaFunc start_list_alias_func,
 start_list_alias_func;
                      NextLaFunc next_list_alias_func,
 fpe_functions[num_fpe_types].list_next_font_or_alias =
 next_list_alias_func;
                      SetPathFunc set_path_func)
 fpe_functions[num_fpe_types].set_path_hook = set_path_func;
 {
     return 0;                                               return
 num_fpe_types++;
 }                                                       }
 }}}

 Those I do not mention here are like StoreFontClientFont() or
 DeleteFontClientID() of libXfont, rather empty. I then used

 {{{
 #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1040
 #endif
 }}}

 in xorg-server-devel-1.14.99.0/dix/dixfonts.c to guard the mentioned
 functions from being compiled. It worked! (It seems to be a feature of
 MacPorts that the work directory is not removed when 'port upgrade' is
 invoked again.) The ten mentioned errors were removed, but I don't think
 that this is the proper way. Many of the listed functions in xorg-server-
 devel-1.14.99.0/dix/dixfonts.c seem to be useful, in contrast to their
 implementations in libXfont.

-- 
Ticket URL: <https://trac.macports.org/ticket/36055#comment:20>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list