building CUPS under AIX 5.3/snprintf

Anonymous anonymous at easysw.com
Wed Mar 23 14:00:26 PST 2005


I got no replies from this Forum on the compilation issue I described.  We went with the pre-build binaries from easysw.com instead - well worth the $10.

> Hello,
>
> Trying to get CUPS to build under AIX 5.3 - trying being the operative word :)
>
> We purchased a license for the native AIX C compiler but don't (yet) have the native C++ compiler.  Most of CUPS compiles fine - but we are running into some issues with the way our AIX development box was configured with the built-in g++ balking on pdftops.cxx because of a definition of snprintf in stdio.h not being seen.  See below:
>
> Compiling pdftops.cxx...
> pdftops.cxx: In function `int main(int, char**)':
> pdftops.cxx:280: error: `snprintf' undeclared (first use this function)
> pdftops.cxx:280: error: (Each undeclared identifier is reported only once for
>    each function it appears in.)
> make: 1254-004 The error code from the last command is 1.
>
> /usr/include/stdio.h contains:
>
> #if (_XOPEN_SOURCE >= 500) || defined(_ISOC99_SOURCE)
> extern int  snprintf(char *__restrict__, size_t, const char *__restrict__, ...);
> #endif /* _XOPEN_SOURCE >= 500 */
>
> while /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.3.2/inclu
> de/stdio.h contains:
>
> #if (_XOPEN_SOURCE == 500)
> extern int  snprintf(char *, size_t, const char *, ...);
> #endif /* _XOPEN_SOURCE == 500 */
>
> What are the rest of you AIXers out there doing to build from source?  I just tried setting CXXFLAGS=-D_XOPEN_SOURCE=500 to no avail...  I think I need another way to get the snprintf() definition to show up to the g++ compiler.
>
> thanks,
>
> Vince
>
>
>





More information about the cups mailing list