building libgnomeprint2 on Mac OS X



(I'm not subscribed to this list.  Please cc me on any replies.)

I'm trying to install gnumeric 1.2.1 on a Mac OS X system with fink.  There
are several packages which are either not present in fink or are not recent
enough versions.  Libgnomeprint2 is one of them.  I'm trying to build 2.4.0
and encountered an error compiling gnome-print.c.  I configured like so:

    PKG_CONFIG_PATH="/Users/skip/local/lib/pkgconfig:/sw/lib/pkgconfig"
    LDFLAGS='-L/Users/skip/local/lib -L/sw/lib'
    CPPFLAGS='-I/Users/skip/local/include -I/sw/include -no-cpp-precomp'
    export PKG_CONFIG_PATH LDFLAGS CPPFLAGS
    ./configure --prefix=$HOME/local

That went fine.  during make I get this output (wrapped for readability):

    ...
    gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I/Users/skip/local/include \
        -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include \
        -I/sw/include/libart-2.0 -I/sw/include/pango-1.0 \
        -I/sw/include/libxml2 -I/sw/include -I/sw/include/freetype2 \
        -I/sw/include -DG_LOG_DOMAIN=\"GnomePrint\" 
        -DGNOMELOCALEDIR=\"/Users/skip/local/share/locale\" \
        -DBINDIR=\"/Users/skip/local/bin\" \
        -DDATADIR=\"/Users/skip/local/share\" \
        -DGNOME_PRINT_MODULES_DIR=\"/Users/skip/local/lib/libgnomeprint/2.4.0/modules\" \
        -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED \
        -DGTK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED \
        -DGNOME_DISABLE_DEPRECATED -I/Users/skip/local/include \
        -I/sw/include -no-cpp-precomp -g -O2 -Wall -Wmissing-prototypes \
        -Wnested-externs -Wpointer-arith -Wno-sign-compare \
        -c gnome-print.c -Wp,-MD,.deps/gnome-print.TPlo  -fno-common \
        -DPIC -o .libs/gnome-print.o
    In file included from gnome-print.c:41:
    /usr/include/sys/mman.h:158: parse error before "off_t"
    /usr/include/sys/mman.h:170: parse error before "caddr_t"
    /usr/include/sys/mman.h:171: parse error before '*' token
    make[3]: *** [gnome-print.lo] Error 1
    make[2]: *** [all-recursive] Error 1
    make[1]: *** [all-recursive] Error 1
    make: *** [all] Error 2

Line 158 of mman.h is a prototype for mmap():

    156: #ifndef _MMAP_DECLARED
    157: #define        _MMAP_DECLARED
    158: void * mmap __P((void *, size_t, int, int, int, off_t));
    159: #endif

I assume that off_t is not defined at this point.  Same thing for the
caddr_t parse error at line 170:

    168: #ifdef __APPLE_API_PRIVATE
    169: int    load_shared_file __P((char *, caddr_t, u_long,
    170:            caddr_t *, int, sf_mapping_t *, int *));
    171: int    reset_shared_file __P((caddr_t *, int, sf_mapping_t *));
    172: int    new_system_shared_regions __P((void));
    173: #endif /* __APPLE_API_PRIVATE */

Any suggestions?

Thanks,

-- 
Skip Montanaro
Got gigs? http://www.musi-cal.com/
          http://www.mojam.com/
Got spam? http://spambayes.sf.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]