This is more strange, when I change the name from "putchar" to "myputchar", I can overcome this error.<br>But this is a ugly work around. Maybe it is just a conflict with the default putchar function.<br>
<br>Please can anyone give me an advice?<br><br>Thanks<br><br>BAO<br><div class="gmail_quote">On Tue, Mar 1, 2011 at 7:18 PM, bao bui <span dir="ltr"><<a href="mailto:buiqbao@gmail.com">buiqbao@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I am trying to compile pdf-filters with buildroot. I got the error when compiling pdftopdf.cxx<br>
<br>/usr/include/poppler/goo/GooString.h:38: note: the mangling of 'va_list' has changed in GCC 4.4<br>In file included from P2PObject.h:32,<br>
from P2PCatalog.h:36,<br> from P2PCatalog.cxx:32:<br>P2POutputStream.h:48: error: expected identifier before '(' token<br>P2POutputStream.h:48: error: expected identifier before '(' token<br>
<br>This error occurs at the putchar function.<br><br>This is strange because I can compile with native g++ for x86 without error<br><br>Please help! I am running out of idea<br><br>Below is the P2POutputStream.h file:<br>
<br>/*<br><br>Copyright (c) 2006-2007, BBR Inc. All rights reserved.<br><br>Permission is hereby granted, free of charge, to any person obtaining<br>a copy of this software and associated documentation files (the<br>"Software"), to deal in the Software without restriction, including<br>
without limitation the rights to use, copy, modify, merge, publish,<br>distribute, sublicense, and/or sell copies of the Software, and to<br>permit persons to whom the Software is furnished to do so, subject to<br>the following conditions:<br>
<br>The above copyright notice and this permission notice shall be included<br>in all copies or substantial portions of the Software.<br><br>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,<br>EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF<br>
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.<br>IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY<br>CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,<br>TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE<br>
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.<br><br>*/<br>/*<br> P2POutputStream.h<br> pdftopdf stream for output<br>*/<br>#ifndef _P2POUTPUTSTREAM_H_<br>#define _P2POUTPUTSTREAM_H_<br><br>#include "goo/gtypes.h"<br>
<br>#include <config.h><br>#ifndef HAVE_ZLIB_H<br>#undef HAVE_LIBZ<br>#endif<br>#include <stdio.h><br>#ifdef HAVE_LIBZ<br>#include <zlib.h><br>#endif<br><br>class P2POutputStream {<br>public:<br> P2POutputStream(FILE *fpA);<br>
~P2POutputStream();<br> int write(const void *buf, int n);<br> int putchar(char c);<br> int printf(const char *format, ...);<br> <br> <br><br> int puts(const char *str);<br> int getPosition() { return position; }<br>
GBool canDeflate() {<br>#ifdef HAVE_LIBZ<br> return gTrue;<br>#else<br> return gFalse;<br>#endif<br> }<br> void startDeflate();<br> void endDeflate();<br>private:<br> FILE *fp;<br> /* output position */<br> int position;<br>
#ifdef HAVE_LIBZ<br> z_stream zstream;<br> GBool deflating;<br>#endif<br>};<br><br>#endif<br><br><br><br>And below is the Makedefs file:<br><br>#<br># "$Id: Makedefs.in 7242 2008-01-22 22:37:21Z mike $"<br>#<br>
# Common makefile definitions for the Common UNIX Printing System (CUPS).<br>#<br># Copyright 2007-2008 by Apple Inc.<br># Copyright 1997-2007 by Easy Software Products, all rights reserved.<br>#<br># These coded instructions, statements, and computer programs are the<br>
# property of Apple Inc. and are protected by Federal copyright<br># law. Distribution and use rights are outlined in the file "LICENSE.txt"<br># which should have been included with this file. If this file is<br>
# file is missing or damaged, see the license at "<a href="http://www.cups.org/" target="_blank">http://www.cups.org/</a>".<br>#<br><br>#<br># Programs...<br>#<br><br>AR = /home/bao/work/buildroot/output/staging/usr/bin/arm-unknown-linux-uclibcgnueabi-ar<br>
AWK = gawk<br>CC = /home/bao/work/buildroot/output/staging/usr/bin/arm-unknown-linux-uclibcgnueabi-gcc --sysroot=/home/bao/work/buildroot/output/staging<br>CXX = /home/bao/work/buildroot/output/staging/usr/bin/arm-unknown-linux-uclibcgnueabi-g++ --sysroot=/home/bao/work/buildroot/output/staging<br>
DSO = $(CC)<br>HTMLDOC = <br>INSTALL = /usr/bin/install -c<br>LD = /home/bao/work/buildroot/output/staging/usr/bin/arm-unknown-linux-uclibcgnueabi-ld --sysroot=/home/bao/work/buildroot/output/staging<br>
LIBTOOL = <br>LN = /bin/ln -sf<br>MV = /bin/mv<br>PHPCONFIG = <br>RANLIB = /home/bao/work/buildroot/output/staging/usr/bin/arm-unknown-linux-uclibcgnueabi-ranlib<br>RM = /bin/rm -f<br>
RMDIR = /bin/rmdir<br>SED = /bin/sed<br>SHELL = /bin/sh<br>STRIP = /home/bao/work/buildroot/output/staging/usr/bin/arm-unknown-linux-uclibcgnueabi-strip<br><br>#<br># Installation programs...<br>
#<br><br>INSTALL_BIN = $(LIBTOOL) $(INSTALL) -m 755<br>INSTALL_CONFIG = $(INSTALL) -m 640<br>INSTALL_DATA = $(INSTALL) -m 644<br>INSTALL_DIR = $(INSTALL) -d<br>INSTALL_LIB = $(LIBTOOL) $(INSTALL) -m 755<br>
INSTALL_MAN = $(INSTALL) -m 644<br>INSTALL_SCRIPT = $(INSTALL) -m 755<br><br>#<br># Default user, group, and system groups for the scheduler...<br>#<br><br>CUPS_USER = lp<br>CUPS_GROUP = lp<br>CUPS_SYSTEM_GROUPS = lpadmin sys root<br>
CUPS_PRIMARY_SYSTEM_GROUP = lpadmin<br><br>#<br># Default permissions...<br>#<br><br>CUPS_CONFIG_FILE_PERM = 640<br>CUPS_LOG_FILE_PERM = 644<br><br>#<br># Languages to install...<br>#<br><br>LANGUAGES = da de es et fi fr he id it ja ko nl no pl pt pt_BR ru sv zh zh_TW <br>
INSTALL_LANGUAGES = install-languages<br>UNINSTALL_LANGUAGES = uninstall-languages<br><br>#<br># Libraries...<br>#<br><br>LIBCUPS = libcups.so.2<br>LIBCUPSIMAGE = libcupsimage.so.2<br>LIBJPEG = -ljpeg<br>
LIBLDAP = <br>LIBMALLOC = <br>LIBPAPER = <br>LIBPNG = -lpng<br>LIBSLP = <br>LIBGSSAPI = <br>LIBTIFF = -ltiff<br>LIBZ = -lz<br><br>#<br># Install static libraries?<br>
#<br><br>INSTALLSTATIC = <br><br>#<br># Program options...<br>#<br># ARCHFLAGS Defines the default architecture build options.<br># ARCH32FLAGS Defines the 32-bit architecture build options, used<br># when compiling separate 32/64-bit libraries.<br>
# ARCH64FLAGS Defines the 64-bit architecture build options, used<br># when compiling separate 32/64-bit libraries.<br># OPTIM Defines the common compiler optimization/debugging options<br># for all architectures.<br>
# OPTIONS Defines other compile-time options (currently only -DDEBUG<br># for extra debug info)<br>#<br><br>ALL_CFLAGS = -Ifontembed -I.. -D_CUPS_SOURCE $(CFLAGS) $(SSLFLAGS) \<br> -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT $(OPTIONS)<br>
ALL_CXXFLAGS = -Ioprs -Iopvp -I../opvp -I../.. -I.. -D_CUPS_SOURCE $(CXXFLAGS) $(SSLFLAGS) \<br> -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT $(OPTIONS)<br>ARCHFLAGS = <br>
ARFLAGS = crvs<br>
BACKLIBS = <br>CFLAGS = -I/usr/include/poppler -I/usr/include/poppler -I/usr/include/poppler -pipe -O2 -mtune=arm920t -march=armv4t -mabi=aapcs-linux -msoft-float -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/home/bao/work/buildroot/output/staging/usr/include -I/home/bao/work/buildroot/output/staging/include -I/home/bao/work/buildroot/output/staging/usr/include/python2.4<br>
COMMONLIBS = -lpthread -lm -lcrypt <br>CUPSDLIBS = <br>CXXFLAGS = -I/usr/include/poppler -I/usr/include/poppler -I/usr/include/poppler -DPDFTOPDF -pipe -O2 -mtune=arm920t -march=armv4t -mabi=aapcs-linux -msoft-float -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/home/bao/work/buildroot/output/staging/usr/include -I/home/bao/work/buildroot/output/staging/include<br>
CXXLIBS = <br>DSOFLAGS = -Wl,-soname,`basename $@` -shared $(OPTIM)<br>DSOLIBS = $(LIBTIFF) $(LIBPNG) $(LIBJPEG) $(LIBZ) $(COMMONLIBS)<br>DNSSDLIBS = <br>FONTS = fonts<br>IMGLIBS = <br>
IMGFILTERS = imagetops imagetoraster<br>LAUNCHDLIBS = <br>LDFLAGS = -L../cups -L../filter \<br> -L/home/bao/work/buildroot/output/staging/lib -L/home/bao/work/buildroot/output/staging/usr/lib $(OPTIM)<br>
LEGACY_BACKENDS = parallel scsi<br>LIBCUPSORDER = libcups.order<br>LIBCUPSIMAGEORDER = libcupsimage.order<br>LINKCUPS = -lcups $(SSLLIBS)<br>LINKCUPSIMAGE = -lcupsimage<br>LIBS = $(LINKCUPS) $(COMMONLIBS)<br>
LCMS_LIBS = -llcms $(LIBS)<br>FONTCONFIG_LIBS = -lfontconfig $(LIBS)<br>FREETYPE_LIBS = -lfreetype $(LIBS)<br>IJS_LIBS = -lijs $(LIBS)<br>POPPLER_LIBS = -lpoppler -llcms $(LIBS)<br>OPTIM = -Wall -Wno-format-y2k -fPIC -g -D_GNU_SOURCE<br>
OPTIONS =<br>PAMLIBS = <br>PAP = <br>PDFTOPS = <br>PHPDIR = <br>SSLFLAGS = -DOPENSSL_DISABLE_OLD_DES_SUPPORT<br>SSLLIBS = -lssl -lcrypto<br><br>#<br># Separate 32/64-bit library support...<br>
#<br><br>ARCH32FLAGS = <br>DSO32FLAGS = -Wl,-soname,`basename $@` -shared $(OPTIM)<br>INSTALL32 = <br>LIB32CUPS = <br>LIB32CUPSIMAGE = <br>LIB32DIR = $(BUILDROOT)<br>UNINSTALL32 = <br>
<br>ARCH64FLAGS = <br>DSO64FLAGS = -Wl,-soname,`basename $@` -shared $(OPTIM)<br>INSTALL64 = <br>LIB64CUPS = <br>LIB64CUPSIMAGE = <br>LIB64DIR = $(BUILDROOT)<br>UNINSTALL64 = <br>
<br>#<br># Directories...<br>#<br># The first section uses the GNU names (which are *extremely*<br># difficult to find in a makefile because they are lowercase...)<br># We have to define these first because autoconf uses ${prefix}<br>
# and ${exec_prefix} for most of the other directories...<br>#<br># The "datarootdir" variable may not get defined if you are using<br># a version of autoconf prior to 2.60.<br>#<br># This is immediately followed by definition in ALL CAPS for the<br>
# needed directories...<br>#<br><br>bindir = /usr/bin<br>datadir = /usr/share<br>datarootdir = /usr/share<br>exec_prefix = /usr<br>includedir = ${prefix}/include<br>infodir = ${datarootdir}/info<br>
libdir = /usr/lib<br>libexecdir = ${exec_prefix}/libexec<br>localstatedir = /var<br>mandir = ${datarootdir}/man<br>oldincludedir = /usr/include<br>prefix = /usr<br>sbindir = /usr/sbin<br>
sharedstatedir = ${prefix}/com<br>srcdir = .<br>sysconfdir = /etc<br>top_srcdir = .<br><br>BUILDROOT = $(DSTROOT)<br><br>AMANDIR = $(BUILDROOT)${datarootdir}/man<br>BINDIR = $(BUILDROOT)/usr/bin<br>
CACHEDIR = $(BUILDROOT)/var/cache/cups<br>DATADIR = $(BUILDROOT)/usr/share/cups<br>DOCDIR = $(BUILDROOT)/usr/share/doc/cups<br>ICONDIR = /usr/share/icons<br>INCLUDEDIR = $(BUILDROOT)$(includedir)<br>
INITDIR = /etc<br>INITDDIR = <br>LIBDIR = $(BUILDROOT)$(libdir)<br>LOCALEDIR = $(BUILDROOT)/usr/share/locale<br>LOGDIR = $(BUILDROOT)/var/log/cups<br>MANDIR = $(BUILDROOT)${datarootdir}/man<br>
MENUDIR = /usr/share/applications<br>PMANDIR = $(BUILDROOT)${datarootdir}/man<br>RCLEVELS = 2 3 5<br>RCSTART = 81<br>RCSTOP = 36<br>REQUESTS = $(BUILDROOT)/var/spool/cups<br>
SBINDIR = $(BUILDROOT)/usr/sbin<br>SERVERBIN = $(BUILDROOT)/usr/lib/cups<br>SERVERROOT = $(BUILDROOT)/etc/cups<br>STATEDIR = $(BUILDROOT)/var/run/cups<br>XINETD = <br><br>MAN1EXT = 1.gz<br>
MAN5EXT = 5.gz<br>MAN7EXT = 7.gz<br>MAN8EXT = 8.gz<br>MAN8DIR = 8<br><br>PAMDIR = <br>PAMFILE = pam.std<br><br>DEFAULT_LAUNCHD_CONF = <br>DBUSDIR = /etc/dbus-1<br>
<br><br>#<br># Rules...<br>#<br><br>.SILENT:<br>.SUFFIXES: .1 .1.gz .1m .1m.gz .5 .5.gz .7 .7.gz .8 .8.gz .a .c .cxx .h .man .o .32.o .64.o .gz<br><br>.c.o:<br> echo Compiling $<...<br> $(CC) $(ARCHFLAGS) $(OPTIM) $(ALL_CFLAGS) -c $<<br>
<br>.c.32.o:<br> echo Compiling 32-bit $<...<br> $(CC) $(ARCH32FLAGS) $(OPTIM) $(ALL_CFLAGS) -c -o $@ $<<br><br>.c.64.o:<br> echo Compiling 64-bit $<...<br> $(CC) $(ARCH64FLAGS) $(OPTIM) $(ALL_CFLAGS) -c -o $@ $<<br>
<br>.cxx.o:<br> echo Compiling $<...<br> $(CXX) $(ARCHFLAGS) $(OPTIM) $(ALL_CXXFLAGS) -c $<<br><br>.man.1 .man.1m .man.5 .man.7 .man.8:<br> echo Linking $<...<br> $(RM) $@<br> $(LN) $< $@<br><br>
.man.1.gz .man.1m.gz .man.5.gz .man.7.gz .man.8.gz .man.gz:<br> echo -n Compressing $<...<br> $(RM) $@<br> gzip -v9 <$< >$@<br><br><br>#<br># End of "$Id: Makedefs.in 7242 2008-01-22 22:37:21Z mike $"<br>
#<br>
</blockquote></div><br>