[cairo] Cairo-1.6.0 on solaris10 build failure

Dean Brundage Dean.Brundage at Sun.COM
Mon Apr 14 08:25:45 PDT 2008


Andreas Tobler wrote:
> Carl Worth wrote:
>> On Fri, 11 Apr 2008 14:46:25 -0500, Dean Brundage wrote:
>>> Please provide some pointers on this build failure.  Thanks.
>>>
>>> cairo-ps-surface.c: In function `_cairo_ps_surface_emit_header':
>>> cairo-ps-surface.c:110: error: too few arguments to function `ctime_r'
>>>
>>> The man page for ctim_r says it takes three arguments:
>>> char *ctime_r(const time_t *clock, char *buf, int buflen);
>>
>> Not "the" man page. There are obviously more than one. The one on my
>> system says:
>>
>>     char *ctime_r(const time_t *timep, char *buf);
>>
>> ...
>>
>> CONFORMING TO
>>     POSIX.1-2001.   C89  and C99 specify asctime(), ctime(), gmtime(), 
>> local‐
>>     time(), and mktime()
>>
>> NOTES
>>     The four functions asctime(), ctime(), gmtime() and localtime() 
>> return  a
>>     pointer  to  static data and hence are not thread-safe. 
>> Thread-safe ver‐
>>     sions asctime_r(), ctime_r(), gmtime_r() and localtime_r() are 
>> specified
>>     by SUSv2, and available since libc 5.2.5.
>>
>> Suggested fix, anyone?
> 
> You might try to compile with:
>  -D_POSIX_PTHREAD_SEMANTICS | -D_POSIX_C_SOURCE=199506L
> 
> Should help

Thanks for the reply Andreas.  Here is how I got cairo to build:

#!/usr/bin/sh

SOFTDIST_DIR=/usr/dist/share
OS=`uname -r`
ARCH="sun4"

PACKAGE=cairographics
VERSION=1.6.0

PREFIX="${SOFTDIST_DIR}/${PACKAGE},v${VERSION}"

GNUMAKE=gmake; export GNUMAKE
PKG_CONFIG_PATH="${SOFTDIST_DIR}/pixman,v0.10.0/${OS}-lib.${ARCH}/pkgconfig:${SOFTDIST_DIR}/libfreetype,v2.3.5/${OS}-lib.${ARCH}/pkgconfig:${SOFTDIST_DIR}/fontconfig,v2.5.0/${OS}-lib.${ARCH}/pkgconfig"; 
export PKG_CONFIG_PATH

# Use SunStudio compiler because g++ uses , as some sort of delimiter
CC="${SOFTDIST_DIR}/sunstudio_sparc/SUNWspro/bin/cc"; export CC
CXX="${SOFTDIST_DIR}/sunstudio_sparc/SUNWspro/bin/CC"; export CXX

CXXFLAGS="-D_POSIX_PTHREAD_SEMANTICS"; export CXXFLAGS
CFLAGS="-D_POSIX_PTHREAD_SEMANTICS"; export CFLAGS

# sed barfs in configure because it uses , to delimit substitutions
# Change the problematic ones (those that use our PREFIX) to ! instead
patch -N configure < ../../../codebase/cairographics/package/configure.patch

./configure --prefix=${PREFIX} \
             --bindir=${PREFIX}/${OS}-bin.${ARCH} \
             --libdir=${PREFIX}/${OS}-lib.${ARCH} \
             --includedir=${PREFIX}/${OS}-include.${ARCH} \
             --mandir=${PREFIX}/doc/man \
             --enable-freetype=yes


--Dean
--
Unscrambler of eggs.
x31613 / (408) 404-6094
-------------------------------------------------------------------------------
Ours is the age that is proud of machines that think and suspicious of people
who try to.
   - H. Mumford Jones


























































NOTICE: This message including any attachments is confidential information of 
Sun Microsystems, Inc. Disclosure, copying or distribution is prohibited 
without permission of Sun. If you are not the intended recipient, please reply 
to the sender and then delete this message.  This is a PRIVATE message. If you 
are not the intended recipient, please delete without copying and kindly advise 
us by e-mail of the mistake in delivery. NOTE: Regardless of content, this 
e-mail shall not operate to bind CSC to any order or other contract unless 
pursuant to explicit written agreement or government initiative expressly 
permitting the use of e-mail for such purpose.


More information about the cairo mailing list