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