[cairo] cairo 1.8.6 error: Macro name PACKAGE_VERSION cannot be redefined

Shailendra Jain shailen.n.jain at gmail.com
Thu Mar 5 03:52:54 PST 2009


Hi,

   While running configure script for Cairo 1.8.6 on AIX, I got the below
error.

configure:12762: checking how to run the C preprocessor
configure:12878: result: /usr/vac/bin/xlc_r -E
configure:12907: /usr/vac/bin/xlc_r -E  conftest.c
"conftest.c", line 19.9: 1506-213 (S) Macro name PACKAGE_VERSION cannot be
redefined.
"conftest.c", line 19.9: 1506-358 (I) "PACKAGE_VERSION" is defined on line 4
of conftest.c.
"conftest.c", line 20.9: 1506-213 (S) Macro name PACKAGE_STRING cannot be
redefined.
"conftest.c", line 20.9: 1506-358 (I) "PACKAGE_STRING" is defined on line 5
of conftest.c.
"conftest.c", line 21.9: 1506-213 (S) Macro name PACKAGE_NAME cannot be
redefined.
"conftest.c", line 21.9: 1506-358 (I) "PACKAGE_NAME" is defined on line 2 of
conftest.c.
"conftest.c", line 22.9: 1506-213 (S) Macro name PACKAGE_TARNAME cannot be
redefined.
"conftest.c", line 22.9: 1506-358 (I) "PACKAGE_TARNAME" is defined on line 3
of conftest.c.
configure:12913: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "cairo"
| #define PACKAGE_TARNAME "cairo"
| #define PACKAGE_VERSION "1.8.6"
| #define PACKAGE_STRING "cairo 1.8.6"
| #define PACKAGE_BUGREPORT "
http://bugs.freedesktop.org/enter_bug.cgi?product=cairo"
| #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
| #define LT_OBJDIR ".libs/"
| #define PACKAGE_VERSION USE_cairo_version_OR_cairo_version_string_INSTEAD
| #define PACKAGE_STRING USE_cairo_version_OR_cairo_version_string_INSTEAD
| #define PACKAGE_NAME USE_cairo_INSTEAD
| #define PACKAGE_TARNAME USE_cairo_INSTEAD
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|                    Syntax error


To eliminate the above error I had made changes in the 2 files. Can someone
advise if these changes are appropriate ?

1. ./configure

     Removed the below lines from the configure script.


cat >>confdefs.h <<\_ACEOF
#define PACKAGE_VERSION USE_cairo_version_OR_cairo_version_string_INSTEAD
_ACEOF

cat >>confdefs.h <<\_ACEOF
#define PACKAGE_STRING USE_cairo_version_OR_cairo_version_string_INSTEAD
_ACEOF

cat >>confdefs.h <<\_ACEOF
#define PACKAGE_NAME USE_cairo_INSTEAD
_ACEOF

cat >>confdefs.h <<\_ACEOF
#define PACKAGE_TARNAME USE_cairo_INSTEAD
_ACEOF

2. ./build/configure.ac.version

    Removed the below lines.

dnl Disable autoconf's version macros.  We try hard to not rebuild the
entire
dnl library just because version changed.  The PACKAGE_VERSION* stuff in
dnl config.h is negating all the effort.
AC_DEFINE(PACKAGE_VERSION,
[USE_cairo_version_OR_cairo_version_string_INSTEAD])
AC_DEFINE(PACKAGE_STRING,
[USE_cairo_version_OR_cairo_version_string_INSTEAD])
AC_DEFINE(PACKAGE_NAME,         [USE_cairo_INSTEAD])
AC_DEFINE(PACKAGE_TARNAME,      [USE_cairo_INSTEAD])

Regards,
Shailendra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20090305/cbe33dee/attachment-0001.html 


More information about the cairo mailing list