Subject: Re: pkg/33686 (fontconfig-2.3.2 fails build)
To: None <tron@NetBSD.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org,>
From: S <scole@sdf.lonestar.org>
List: pkgsrc-bugs
Date: 06/27/2006 03:15:05
The following reply was made to PR pkg/33686; it has been noted by GNATS.

From: S <scole@sdf.lonestar.org>
To: NetBSD GNATS <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/33686 (fontconfig-2.3.2 fails build)
Date: Mon, 26 Jun 2006 20:09:56 -0700

 Ok, I did a cvs update and still got the same failure to build.
 
 I watched the configure stage a little more closely and noticed that when
 the build fails, FT_Get_Next_Char is not being detected:
 
 checking for getopt_long... yes
 checking for iconv... no
 checking for FT_Get_Next_Char... no
 checking for FT_Get_BDF_Property... yes
 checking for FT_Get_PS_Font_Info... yes
 checking for FT_Has_PS_Glyph_Names... yes
 checking for FT_Get_X11_Font_Format... yes
 checking for FT_Bitmap_Size.y_ppem... yes
 
 
 When I set USE_BUILTIN.freetype2 and H_FREETYPE2, FT_GetNext_Char gets detected
 ...
 checking for FT_Get_Next_Char... yes
 ...
 
 Here is a snippet from config.log when failing:
 *********************************
 configure:20785: checking for FT_Get_Next_Char
 configure:20842: gcc -pipe -o conftest -O2 -I/Volumes/NetBSD/pkg/include -I/usr/include 
 -I/Volumes/NetBSD/pkg/include/freetype2 -I/Volumes/NetBSD/pkg/include/freetype2 
 -I/Volumes/NetBSD/pkg/include -no-cpp-precomp -I/Volumes/NetBSD/pkg/include -I/usr/include 
 -I/Volumes/NetBSD/pkg/include/freetype2 -L/Volumes/NetBSD/pkg/lib -L/usr/lib conftest.c 
 -liconv -L/Volumes/NetBSD/pkg/lib -lfreetype -lz >&5
 ld: Undefined symbols:
 _ATSFontFindFromName
 _ATSFontGetFileSpecification
 _CFStringCreateWithCString
 _CloseResFile
 _CopyPascalStringToC
 _FMCreateFontFamilyInstanceIterator
 _FMCreateFontFamilyIterator
 _FMDisposeFontFamilyInstanceIterator
 _FMDisposeFontFamilyIterator
 _FMGetFontContainer
 _FMGetFontFamilyName
 _FMGetNextFontFamily
 _FMGetNextFontFamilyInstance
 _FSGetCatalogInfo
 _FSGetForkCBInfo
 _FSOpenResFile
 _FSOpenResourceFile
 _FSPathMakeRef
 _FSRefMakePath
 _FSpMakeFSRef
 _Get1IndResource
 _Get1Resource
 _GetHandleSize
 _GetResInfo
 _GetResource
 _HLock
 _HUnlock
 _HomeResFile
 _ReleaseResource
 _ResError
 _UseResFile
 configure:20848: $? = 1
 configure: failed program was:
 | /* confdefs.h.  */
 | 
 | #define PACKAGE_NAME ""
 | #define PACKAGE_TARNAME ""
 | #define PACKAGE_VERSION ""
 | #define PACKAGE_STRING ""
 | #define PACKAGE_BUGREPORT ""
 | #define PACKAGE "fontconfig"
 | #define VERSION "2.3.2"
 | #define STDC_HEADERS 1
 | #define HAVE_SYS_TYPES_H 1
 | #define HAVE_SYS_STAT_H 1
 | #define HAVE_STDLIB_H 1
 | #define HAVE_STRING_H 1
 | #define HAVE_MEMORY_H 1
 | #define HAVE_STRINGS_H 1
 | #define HAVE_INTTYPES_H 1
 | #define HAVE_STDINT_H 1
 | #define HAVE_UNISTD_H 1
 | #define HAVE_DLFCN_H 1
 | #ifdef __cplusplus
 | void exit (int);
 | #endif
 | #define HAVE_DIRENT_H 1
 | #define STDC_HEADERS 1
 | #define HAVE_FCNTL_H 1
 | #define HAVE_STDLIB_H 1
 | #define HAVE_STRING_H 1
 | #define HAVE_UNISTD_H 1
 | #define HAVE_ICONV_H 1
 | #define HAVE_VPRINTF 1
 | #define HAVE_GETEUID 1
 | #define HAVE_GETUID 1
 | #define HAVE_LINK 1
 | #define HAVE_MEMMOVE 1
 | #define HAVE_MEMSET 1
 | #define HAVE_MKSTEMP 1
 | #define HAVE_STRCHR 1
 | #define HAVE_STRRCHR 1
 | #define HAVE_STRTOL 1
 | #define HAVE_GETOPT 1
 | #define HAVE_GETOPT_LONG 1
 | /* end confdefs.h.  */
 | /* Define FT_Get_Next_Char to an innocuous variant, in case <limits.h> declares 
 FT_Get_Next_Char.
 |    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 | #define FT_Get_Next_Char innocuous_FT_Get_Next_Char
 | 
 | /* System header to define __stub macros and hopefully few prototypes,
 |     which can conflict with char FT_Get_Next_Char (); below.
 |     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 |     <limits.h> exists even on freestanding compilers.  */
 | 
 | #ifdef __STDC__
 | # include <limits.h>
 | #else
 | # include <assert.h>
 | #endif
 | 
 | #undef FT_Get_Next_Char
 | 
 | /* Override any gcc2 internal prototype to avoid an error.  */
 | #ifdef __cplusplus
 | extern "C"
 | {
 | #endif
 | /* We use char because int might match the return type of a gcc2
 |    builtin and then its argument prototype would still apply.  */
 | char FT_Get_Next_Char ();
 | /* The GNU C library defines this for functions which it implements
 |     to always fail with ENOSYS.  Some functions are actually named
 |     something starting with __ and the normal name is an alias.  */
 | #if defined (__stub_FT_Get_Next_Char) || defined (__stub___FT_Get_Next_Char)
 | choke me
 | #else
 | char (*f) () = FT_Get_Next_Char;
 | #endif
 | #ifdef __cplusplus
 | }
 | #endif
 | 
 | int
 | main ()
 | {
 | return f != FT_Get_Next_Char;
 |   ;
 |   return 0;
 | }
 ....
 *********************************
 
 and here is when it passes:
 
 *********************************
 configure:20785: checking for FT_Get_Next_Char
 configure:20842: gcc -pipe -o conftest -O2 -I/Volumes/NetBSD/pkg/include -I/usr/include 
 -I/usr/X11R6/include/freetype2 -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 
 -no-cpp-precomp -I/Volumes/NetBSD/pkg/include -I/usr/include -I/usr/X11R6/include/freetype2 
 -L/Volumes/NetBSD/pkg/lib -L/usr/lib -L/usr/X11R6/lib conftest.c -liconv -L/usr/X11R6/lib 
 -lfreetype >&5
 configure:20848: $? = 0
 configure:20851: test -z 			 || test ! -s conftest.err
 configure:20854: $? = 0
 configure:20857: test -s conftest
 configure:20860: $? = 0
 configure:20872: result: yes
 *********************************
 
 Also I noticed that when I set USE_BUILTIN.freetype2 and H_FREETYPE2, the pkg x11-links
 is required, otherwise it is not.  Even with x11-links installed, the build will fail unless
 USE_BUILTIN.freetype2 and H_FREETYPE2 are set.  Is there any other info that might be useful
 I can provide?
 
 Thank you for your help