[cfe-dev] config errors while building libpng 1.5.10

naren.mehra at gmail.com naren.mehra at gmail.com
Sun May 13 23:06:31 PDT 2012


Hi Everbody,

I am trying to build libpng 1.5.10 with clang but am getting errors during
configuration:

My config_target reads:
=================

export INSTALL_DIR="/home/nsmehra/Downloads/libpng-1.5.10/BUILD_clang"
export CC=clang
export CPP=clang++
export CPPFLAGS="-x c++"

./configure --build=$BUILD --host=$HOST --prefix=$INSTALL_DIR


Heres output for the configure command :
=============================

source config_target.sh
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... unsupported
checking for style of include used by make... GNU
checking dependency style of clang... gcc3
checking dependency style of clang... gcc3
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking how to print strings... printf
checking for ld used by clang... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking how to run the C preprocessor... clang++
configure: error: in `/home/nsmehra/Downloads/libpng-1.5.10':
configure: error: C preprocessor "clang++" fails sanity check
See `config.log' for more details



and finally heres my config.log output:
===========================

  $ ./configure --build= --host=
--prefix=/home/nsmehra/Downloads/libpng-1.5.10/BUILD_clang

## --------- ##
## Platform. ##
## --------- ##

hostname = samsung-linux-pc
uname -m = i686
uname -r = 3.2.0-24-generic-pae
uname -s = Linux
uname -v = #37-Ubuntu SMP Wed Apr 25 10:47:59 UTC 2012

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/lib/lightdm/lightdm
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2321: checking for a BSD-compatible install
configure:2389: result: /usr/bin/install -c
configure:2400: checking whether build environment is sane
configure:2450: result: yes
configure:2591: checking for a thread-safe mkdir -p
configure:2630: result: /bin/mkdir -p
configure:2643: checking for gawk
configure:2673: result: no
configure:2643: checking for mawk
configure:2659: found /usr/bin/mawk
configure:2670: result: mawk
configure:2681: checking whether make sets $(MAKE)
configure:2703: result: yes
configure:2784: checking whether to enable maintainer-specific portions of
Makefiles
configure:2793: result: no
configure:2872: checking for gcc
configure:2899: result: clang
configure:3128: checking for C compiler version
configure:3137: clang --version >&5
Ubuntu clang version 3.0-6ubuntu3 (tags/RELEASE_30/final) (based on LLVM
3.0)
Target: i386-pc-linux-gnu
Thread model: posix
configure:3148: $? = 0
configure:3137: clang -v >&5
Ubuntu clang version 3.0-6ubuntu3 (tags/RELEASE_30/final) (based on LLVM
3.0)
Target: i386-pc-linux-gnu
Thread model: posix
configure:3148: $? = 0
configure:3137: clang -V >&5
clang: error: argument to '-V' is missing (expected 1 value)
clang: error: no input files
configure:3148: $? = 1
configure:3137: clang -qversion >&5
clang: error: no input files
configure:3148: $? = 1
configure:3168: checking whether the C compiler works
configure:3190: clang  -x c++  conftest.c  >&5
configure:3194: $? = 0
configure:3242: result: yes
configure:3245: checking for C compiler default output file name
configure:3247: result: a.out
configure:3253: checking for suffix of executables
configure:3260: clang -o conftest  -x c++  conftest.c  >&5
configure:3264: $? = 0
configure:3286: result:
configure:3308: checking whether we are cross compiling
configure:3316: clang -o conftest  -x c++  conftest.c  >&5
configure:3320: $? = 0
configure:3327: ./conftest
configure:3331: $? = 0
configure:3346: result: no
configure:3351: checking for suffix of object files
configure:3373: clang -c  -x c++ conftest.c >&5
configure:3377: $? = 0
configure:3398: result: o
configure:3402: checking whether we are using the GNU C compiler
configure:3421: clang -c  -x c++ conftest.c >&5
configure:3421: $? = 0
configure:3430: result: yes
configure:3439: checking whether clang accepts -g
configure:3459: clang -c -g -x c++ conftest.c >&5
configure:3459: $? = 0
configure:3500: result: yes
configure:3517: checking for clang option to accept ISO C89
configure:3581: clang  -c -g -O2 -x c++ conftest.c >&5
conftest.c:18:17: error: use of undeclared identifier 'p'
static char *e (p, i)
                ^
conftest.c:18:22: error: expected ';' after top level declarator
static char *e (p, i)
                     ^
                     ;
conftest.c:21:1: error: expected unqualified-id
{
^
conftest.c:57:8: error: use of undeclared identifier 'f'
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
       ^
conftest.c:57:39: error: use of undeclared identifier 'f'
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
                                      ^
5 errors generated.
configure:3581: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libpng"
| #define PACKAGE_TARNAME "libpng"
| #define PACKAGE_VERSION "1.5.10"
| #define PACKAGE_STRING "libpng 1.5.10"
| #define PACKAGE_BUGREPORT "png-mng-implement at lists.sourceforge.net"
| #define PACKAGE_URL ""
| #define PACKAGE "libpng"
| #define VERSION "1.5.10"
| /* end confdefs.h.  */
| #include <stdarg.h>
| #include <stdio.h>
| #include <sys/types.h>
| #include <sys/stat.h>
| /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
| struct buf { int x; };
| FILE * (*rcsopen) (struct buf *, struct stat *, int);
| static char *e (p, i)
|      char **p;
|      int i;
| {
|   return p[i];
| }
| static char *f (char * (*g) (char **, int), char **p, ...)
| {
|   char *s;
|   va_list v;
|   va_start (v,p);
|   s = g (p, va_arg (v,int));
|   va_end (v);
|   return s;
| }
|
| /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
|    function prototypes and stuff, but not '\xHH' hex character constants.
|    These don't provoke an error unfortunately, instead are silently
treated
|    as 'x'.  The following induces an error, until -std is added to get
|    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
|    array size at least.  It's necessary to write '\x00'==0 to get
something
|    that's true only with -std.  */
| int osf4_cc_array ['\x00' == 0 ? 1 : -1];
|
| /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro
parameters
|    inside strings and character constants.  */
| #define FOO(x) 'x'
| int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
|
| int test (int i, double x);
| struct s1 {int (*f) (int a);};
| struct s2 {int (*f) (double a);};
| int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int),
int, int);
| int argc;
| char **argv;
| int
| main ()
| {
| return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
|   ;
|   return 0;
| }
configure:3581: clang -qlanglvl=extc89 -c -g -O2 -x c++ conftest.c >&5
clang: warning: argument unused during compilation: '-qlanglvl=extc89'
conftest.c:18:17: error: use of undeclared identifier 'p'
static char *e (p, i)
                ^
conftest.c:18:22: error: expected ';' after top level declarator
static char *e (p, i)
                     ^
                     ;
conftest.c:21:1: error: expected unqualified-id
{
^
conftest.c:57:8: error: use of undeclared identifier 'f'
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
       ^
conftest.c:57:39: error: use of undeclared identifier 'f'
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
                                      ^
5 errors generated.
configure:3581: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libpng"
| #define PACKAGE_TARNAME "libpng"
| #define PACKAGE_VERSION "1.5.10"
| #define PACKAGE_STRING "libpng 1.5.10"
| #define PACKAGE_BUGREPORT "png-mng-implement at lists.sourceforge.net"
| #define PACKAGE_URL ""
| #define PACKAGE "libpng"
| #define VERSION "1.5.10"
| /* end confdefs.h.  */
| #include <stdarg.h>
| #include <stdio.h>
| #include <sys/types.h>
| #include <sys/stat.h>
| /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
| struct buf { int x; };
| FILE * (*rcsopen) (struct buf *, struct stat *, int);
| static char *e (p, i)
|      char **p;
|      int i;
| {
|   return p[i];
| }
| static char *f (char * (*g) (char **, int), char **p, ...)
| {
|   char *s;
|   va_list v;
|   va_start (v,p);
|   s = g (p, va_arg (v,int));
|   va_end (v);
|   return s;
| }
|
| /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
|    function prototypes and stuff, but not '\xHH' hex character constants.
|    These don't provoke an error unfortunately, instead are silently
treated
|    as 'x'.  The following induces an error, until -std is added to get
|    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
|    array size at least.  It's necessary to write '\x00'==0 to get
something
|    that's true only with -std.  */
| int osf4_cc_array ['\x00' == 0 ? 1 : -1];
|
| /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro
parameters
|    inside strings and character constants.  */
| #define FOO(x) 'x'
| int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
|
| int test (int i, double x);
| struct s1 {int (*f) (int a);};
| struct s2 {int (*f) (double a);};
| int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int),
int, int);
| int argc;
| char **argv;
| int
| main ()
| {
| return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
|   ;
|   return 0;
| }
configure:3581: clang -qlanglvl=ansi -c -g -O2 -x c++ conftest.c >&5
clang: warning: argument unused during compilation: '-qlanglvl=ansi'
conftest.c:18:17: error: use of undeclared identifier 'p'
static char *e (p, i)
                ^
conftest.c:18:22: error: expected ';' after top level declarator
static char *e (p, i)
                     ^
                     ;
conftest.c:21:1: error: expected unqualified-id
{
^
conftest.c:57:8: error: use of undeclared identifier 'f'
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
       ^
conftest.c:57:39: error: use of undeclared identifier 'f'
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
                                      ^
5 errors generated.
configure:3581: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libpng"
| #define PACKAGE_TARNAME "libpng"
| #define PACKAGE_VERSION "1.5.10"
| #define PACKAGE_STRING "libpng 1.5.10"
| #define PACKAGE_BUGREPORT "png-mng-implement at lists.sourceforge.net"
| #define PACKAGE_URL ""
| #define PACKAGE "libpng"
| #define VERSION "1.5.10"
| /* end confdefs.h.  */
| #include <stdarg.h>
| #include <stdio.h>
| #include <sys/types.h>
| #include <sys/stat.h>
| /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
| struct buf { int x; };
| FILE * (*rcsopen) (struct buf *, struct stat *, int);
| static char *e (p, i)
|      char **p;
|      int i;
| {
|   return p[i];
| }
| static char *f (char * (*g) (char **, int), char **p, ...)
| {
|   char *s;
|   va_list v;
|   va_start (v,p);
|   s = g (p, va_arg (v,int));
|   va_end (v);
|   return s;
| }
|
| /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
|    function prototypes and stuff, but not '\xHH' hex character constants.
|    These don't provoke an error unfortunately, instead are silently
treated
|    as 'x'.  The following induces an error, until -std is added to get
|    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
|    array size at least.  It's necessary to write '\x00'==0 to get
something
|    that's true only with -std.  */
| int osf4_cc_array ['\x00' == 0 ? 1 : -1];
|
| /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro
parameters
|    inside strings and character constants.  */
| #define FOO(x) 'x'
| int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
|
| int test (int i, double x);
| struct s1 {int (*f) (int a);};
| struct s2 {int (*f) (double a);};
| int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int),
int, int);
| int argc;
| char **argv;
| int
| main ()
| {
| return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
|   ;
|   return 0;
| }
configure:3581: clang -std -c -g -O2 -x c++ conftest.c >&5
clang: warning: argument unused during compilation: '-std'
conftest.c:18:17: error: use of undeclared identifier 'p'
static char *e (p, i)
                ^
conftest.c:18:22: error: expected ';' after top level declarator
static char *e (p, i)
                     ^
                     ;
conftest.c:21:1: error: expected unqualified-id
{
^
conftest.c:57:8: error: use of undeclared identifier 'f'
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
       ^
conftest.c:57:39: error: use of undeclared identifier 'f'
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
                                      ^
5 errors generated.
configure:3581: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libpng"
| #define PACKAGE_TARNAME "libpng"
| #define PACKAGE_VERSION "1.5.10"
| #define PACKAGE_STRING "libpng 1.5.10"
| #define PACKAGE_BUGREPORT "png-mng-implement at lists.sourceforge.net"
| #define PACKAGE_URL ""
| #define PACKAGE "libpng"
| #define VERSION "1.5.10"
| /* end confdefs.h.  */
| #include <stdarg.h>
| #include <stdio.h>
| #include <sys/types.h>
| #include <sys/stat.h>
| /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
| struct buf { int x; };
| FILE * (*rcsopen) (struct buf *, struct stat *, int);
| static char *e (p, i)
|      char **p;
|      int i;
| {
|   return p[i];
| }
| static char *f (char * (*g) (char **, int), char **p, ...)
| {
|   char *s;
|   va_list v;
|   va_start (v,p);
|   s = g (p, va_arg (v,int));
|   va_end (v);
|   return s;
| }
|
| /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
|    function prototypes and stuff, but not '\xHH' hex character constants.
|    These don't provoke an error unfortunately, instead are silently
treated
|    as 'x'.  The following induces an error, until -std is added to get
|    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
|    array size at least.  It's necessary to write '\x00'==0 to get
something
|    that's true only with -std.  */
| int osf4_cc_array ['\x00' == 0 ? 1 : -1];
|
| /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro
parameters
|    inside strings and character constants.  */
| #define FOO(x) 'x'
| int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
|
| int test (int i, double x);
| struct s1 {int (*f) (int a);};
| struct s2 {int (*f) (double a);};
| int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int),
int, int);
| int argc;
| char **argv;
| int
| main ()
| {
| return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
|   ;
|   return 0;
| }
configure:3581: clang -Ae -c -g -O2 -x c++ conftest.c >&5
clang: warning: argument unused during compilation: '-A e'
conftest.c:18:17: error: use of undeclared identifier 'p'
static char *e (p, i)
                ^
conftest.c:18:22: error: expected ';' after top level declarator
static char *e (p, i)
                     ^
                     ;
conftest.c:21:1: error: expected unqualified-id
{
^
conftest.c:57:8: error: use of undeclared identifier 'f'
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
       ^
conftest.c:57:39: error: use of undeclared identifier 'f'
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
                                      ^
5 errors generated.
configure:3581: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libpng"
| #define PACKAGE_TARNAME "libpng"
| #define PACKAGE_VERSION "1.5.10"
| #define PACKAGE_STRING "libpng 1.5.10"
| #define PACKAGE_BUGREPORT "png-mng-implement at lists.sourceforge.net"
| #define PACKAGE_URL ""
| #define PACKAGE "libpng"
| #define VERSION "1.5.10"
| /* end confdefs.h.  */
| #include <stdarg.h>
| #include <stdio.h>
| #include <sys/types.h>
| #include <sys/stat.h>
| /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
| struct buf { int x; };
| FILE * (*rcsopen) (struct buf *, struct stat *, int);
| static char *e (p, i)
|      char **p;
|      int i;
| {
|   return p[i];
| }
| static char *f (char * (*g) (char **, int), char **p, ...)
| {
|   char *s;
|   va_list v;
|   va_start (v,p);
|   s = g (p, va_arg (v,int));
|   va_end (v);
|   return s;
| }
|
| /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
|    function prototypes and stuff, but not '\xHH' hex character constants.
|    These don't provoke an error unfortunately, instead are silently
treated
|    as 'x'.  The following induces an error, until -std is added to get
|    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
|    array size at least.  It's necessary to write '\x00'==0 to get
something
|    that's true only with -std.  */
| int osf4_cc_array ['\x00' == 0 ? 1 : -1];
|
| /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro
parameters
|    inside strings and character constants.  */
| #define FOO(x) 'x'
| int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
|
| int test (int i, double x);
| struct s1 {int (*f) (int a);};
| struct s2 {int (*f) (double a);};
| int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int),
int, int);
| int argc;
| char **argv;
| int
| main ()
| {
| return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
|   ;
|   return 0;
| }
configure:3581: clang -Aa -D_HPUX_SOURCE -c -g -O2 -x c++ conftest.c >&5
clang: warning: argument unused during compilation: '-A a'
conftest.c:18:17: error: use of undeclared identifier 'p'
static char *e (p, i)
                ^
conftest.c:18:22: error: expected ';' after top level declarator
static char *e (p, i)
                     ^
                     ;
conftest.c:21:1: error: expected unqualified-id
{
^
conftest.c:57:8: error: use of undeclared identifier 'f'
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
       ^
conftest.c:57:39: error: use of undeclared identifier 'f'
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
                                      ^
5 errors generated.
configure:3581: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libpng"
| #define PACKAGE_TARNAME "libpng"
| #define PACKAGE_VERSION "1.5.10"
| #define PACKAGE_STRING "libpng 1.5.10"
| #define PACKAGE_BUGREPORT "png-mng-implement at lists.sourceforge.net"
| #define PACKAGE_URL ""
| #define PACKAGE "libpng"
| #define VERSION "1.5.10"
| /* end confdefs.h.  */
| #include <stdarg.h>
| #include <stdio.h>
| #include <sys/types.h>
| #include <sys/stat.h>
| /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
| struct buf { int x; };
| FILE * (*rcsopen) (struct buf *, struct stat *, int);
| static char *e (p, i)
|      char **p;
|      int i;
| {
|   return p[i];
| }
| static char *f (char * (*g) (char **, int), char **p, ...)
| {
|   char *s;
|   va_list v;
|   va_start (v,p);
|   s = g (p, va_arg (v,int));
|   va_end (v);
|   return s;
| }
|
| /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
|    function prototypes and stuff, but not '\xHH' hex character constants.
|    These don't provoke an error unfortunately, instead are silently
treated
|    as 'x'.  The following induces an error, until -std is added to get
|    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
|    array size at least.  It's necessary to write '\x00'==0 to get
something
|    that's true only with -std.  */
| int osf4_cc_array ['\x00' == 0 ? 1 : -1];
|
| /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro
parameters
|    inside strings and character constants.  */
| #define FOO(x) 'x'
| int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
|
| int test (int i, double x);
| struct s1 {int (*f) (int a);};
| struct s2 {int (*f) (double a);};
| int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int),
int, int);
| int argc;
| char **argv;
| int
| main ()
| {
| return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
|   ;
|   return 0;
| }
configure:3581: clang -Xc -D__EXTENSIONS__ -c -g -O2 -x c++ conftest.c >&5
clang: warning: argument unused during compilation: '-Xc'
conftest.c:18:17: error: use of undeclared identifier 'p'
static char *e (p, i)
                ^
conftest.c:18:22: error: expected ';' after top level declarator
static char *e (p, i)
                     ^
                     ;
conftest.c:21:1: error: expected unqualified-id
{
^
conftest.c:57:8: error: use of undeclared identifier 'f'
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
       ^
conftest.c:57:39: error: use of undeclared identifier 'f'
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
                                      ^
5 errors generated.
configure:3581: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libpng"
| #define PACKAGE_TARNAME "libpng"
| #define PACKAGE_VERSION "1.5.10"
| #define PACKAGE_STRING "libpng 1.5.10"
| #define PACKAGE_BUGREPORT "png-mng-implement at lists.sourceforge.net"
| #define PACKAGE_URL ""
| #define PACKAGE "libpng"
| #define VERSION "1.5.10"
| /* end confdefs.h.  */
| #include <stdarg.h>
| #include <stdio.h>
| #include <sys/types.h>
| #include <sys/stat.h>
| /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
| struct buf { int x; };
| FILE * (*rcsopen) (struct buf *, struct stat *, int);
| static char *e (p, i)
|      char **p;
|      int i;
| {
|   return p[i];
| }
| static char *f (char * (*g) (char **, int), char **p, ...)
| {
|   char *s;
|   va_list v;
|   va_start (v,p);
|   s = g (p, va_arg (v,int));
|   va_end (v);
|   return s;
| }
|
| /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
|    function prototypes and stuff, but not '\xHH' hex character constants.
|    These don't provoke an error unfortunately, instead are silently
treated
|    as 'x'.  The following induces an error, until -std is added to get
|    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
|    array size at least.  It's necessary to write '\x00'==0 to get
something
|    that's true only with -std.  */
| int osf4_cc_array ['\x00' == 0 ? 1 : -1];
|
| /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro
parameters
|    inside strings and character constants.  */
| #define FOO(x) 'x'
| int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
|
| int test (int i, double x);
| struct s1 {int (*f) (int a);};
| struct s2 {int (*f) (double a);};
| int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int),
int, int);
| int argc;
| char **argv;
| int
| main ()
| {
| return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
|   ;
|   return 0;
| }
configure:3597: result: unsupported
configure:3625: checking for style of include used by make
configure:3653: result: GNU
configure:3679: checking dependency style of clang
configure:3790: result: gcc3
configure:3814: checking dependency style of clang
configure:3923: result: gcc3
configure:3942: checking build system type
configure:3956: result: i686-pc-linux-gnu
configure:3976: checking host system type
configure:3989: result: i686-pc-linux-gnu
configure:4009: checking for a sed that does not truncate output
configure:4073: result: /bin/sed
configure:4091: checking for grep that handles long lines and -e
configure:4149: result: /bin/grep
configure:4154: checking for egrep
configure:4216: result: /bin/grep -E
configure:4221: checking for fgrep
configure:4283: result: /bin/grep -F
configure:4310: checking how to print strings
configure:4337: result: printf
configure:4370: checking for ld used by clang
configure:4437: result: /usr/bin/ld
configure:4444: checking if the linker (/usr/bin/ld) is GNU ld
configure:4459: result: yes
configure:4476: checking how to run the C preprocessor
configure:4546: result: clang++
configure:4566: clang++ -x c++ conftest.c
conftest.c:16:8: error: unknown type name 'Syntax'
                     Syntax error
                     ^
conftest.c:16:20: error: expected ';' after top level declarator
                     Syntax error
                                 ^
                                 ;
2 errors generated.
configure:4566: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libpng"
| #define PACKAGE_TARNAME "libpng"
| #define PACKAGE_VERSION "1.5.10"
| #define PACKAGE_STRING "libpng 1.5.10"
| #define PACKAGE_BUGREPORT "png-mng-implement at lists.sourceforge.net"
| #define PACKAGE_URL ""
| #define PACKAGE "libpng"
| #define VERSION "1.5.10"
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|              Syntax error
configure:4566: clang++ -x c++ conftest.c
conftest.c:16:8: error: unknown type name 'Syntax'
                     Syntax error
                     ^
conftest.c:16:20: error: expected ';' after top level declarator
                     Syntax error
                                 ^
                                 ;
2 errors generated.
configure:4566: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libpng"
| #define PACKAGE_TARNAME "libpng"
| #define PACKAGE_VERSION "1.5.10"
| #define PACKAGE_STRING "libpng 1.5.10"
| #define PACKAGE_BUGREPORT "png-mng-implement at lists.sourceforge.net"
| #define PACKAGE_URL ""
| #define PACKAGE "libpng"
| #define VERSION "1.5.10"
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|              Syntax error
configure:4596: error: in `/home/nsmehra/Downloads/libpng-1.5.10':
configure:4598: error: C preprocessor "clang++" fails sanity check
See `config.log' for more details

===========================

Have you guys seen  these kinds of error before ? What am I missing here ?
Pls let me know.

Regards,
Naren Mehra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120514/968f8f14/attachment.html>


More information about the cfe-dev mailing list