>Iván Gómez <igomez@xxxxxxxxxx> wrote: > >I'm trying to compile the clamav pakage on solaris 9 with the gcc >enviroment installed form sunfreeware: > >autoconf (GNU Autoconf) 2.57 > >Reading specs from /usr/local/lib/gcc/i386-pc-solaris2.9/3.4.6/specs >Configured with: ../configure --with-as=/usr/ccs/bin/as >--with-ld=/usr/ccs/bin/ld --enable-shared >--enable-languages=c,c++,f77 >Thread model: posix >gcc version 3.4.6 > >I'm trying to compile it like: >./configure CC=gcc CFLAGS="-O2 -Wl,-R,/usr/local/lib >-Wl,-R,/opt/QNDgmp/lib -L/opt/QNDgmp/lib >-L/usr/local/lib" CPPFLAGS="-O2" --with-ld=/usr/local/bin/ld >CPPFLAGS="-I/opt/QNDgmp/include" > >but it comes to the following error: > >checking for cc option to accept ISO C89... unsupported >checking dependency style of cc... gcc3 >checking for a sed that does not truncate output... /usr/bin/sed >checking for grep that handles long lines and -e... /usr/xpg4/bin/grep >checking for egrep... /usr/xpg4/bin/grep -E >checking for ld used by cc... /usr/ccs/bin/ld >checking if the linker (/usr/ccs/bin/ld) is GNU ld... no >checking for /usr/ccs/bin/ld option to reload object files... -r >checking for BSD-compatible nm... /usr/local/bin/nm -B >checking how to recognize dependent libraries... pass_all >checking how to run the C preprocessor... /lib/cpp >configure: error: C preprocessor "/lib/cpp" fails sanity check >See `config.log' for more details. > > > >where config.log: >configure:3896: checking for cc option to accept ISO C89 >configure:3970: cc -c -g -Wl,-R,/usr/local/lib -Wl,-R,/usr/lib >-Wl,-R,/usr/ccs/lib >-Wl,-R,/usr/share/lib -Wl,-R,/opt/QNDgmp/lib -L/opt/QNDgmp/lib -L/ >usr/local/lib -L/usr/lib -L/usr/ccs/lib -L/usr/share/lib -I/opt/QNDgmp/include >-I/usr/local/lib/gcc/i386-pc-solaris2.9/3.4.6/include/ conftest.c >&5 >In file included from conftest.c:11: >/usr/local/lib/gcc/i386-pc-solaris2.9/3.4.6/include/stdio.h:36:27: >iso/stdio_iso.h: No such file or >directory >In file included from conftest.c:11: >/usr/local/lib/gcc/i386-pc-solaris2.9/3.4.6/include/stdio.h:107: >error: `__longlong_t' does not name >a type >........ >usr/local/lib/gcc/i386-pc-solaris2.9/3.4.6/include/sys/types.h:573:24: >sys/select.h: No such file or >directory >conftest.c:13:22: sys/stat.h: No such file or directory >conftest.c:16: error: expected constructor, destructor, or type >conversion before '*' token >conftest.c:17: error: `p' was not declared in this scope >conftest.c:17: error: `i' was not declared in this scope >conftest.c:18: error: initializer expression list treated as compound >expression >conftest.c:18: error: expected `,' or `;' before "char" >conftest.c:20: error: expected unqualified-id before '{' token >conftest.c:50: error: `FILE' has not been declared >conftest.c:50: error: ISO C++ forbids declaration of `parameter' with no type >conftest.c: In function `int main()': >conftest.c:56: error: cannot convert `char*' to `char*(*)(char**, >int)' for argument `1' to `char* >f(char*(*)(char**, int), char**, ...)' >conftest.c:56: error: cannot convert `char*' to `char*(*)(char**, >int)' for argument `1' to `char* >f(char*(*)(char**, int), char**, ...)' >configure:3976: $? = 1 >configure: failed program was: >| /* confdefs.h. */ >| #define PACKAGE_NAME "clamav" >| #define PACKAGE_T >........ >configure:3970: cc -qlanglvl=extc89 -c -g -Wl,-R,/usr/local/lib >-Wl,-R,/usr/lib -Wl,-R,/usr/ccs/lib >-Wl,-R,/usr/share/lib -Wl,-R,/opt/QNDgmp/lib -L/op >t/QNDgmp/lib -L/usr/local/lib -L/usr/lib -L/usr/ccs/lib >-L/usr/share/lib -I/opt/QNDgmp/include >-I/usr/local/lib/gcc/i386-pc-solaris2.9/3.4.6/include/ c >onftest.c >&5 >cc: unrecognized option `-qlanglvl=extc89' >.......... >configure:3970: cc -qlanglvl=ansi -c -g -Wl,-R,/usr/local/lib >-Wl,-R,/usr/lib -Wl,-R,/usr/ccs/lib >-Wl,-R,/usr/share/lib -Wl,-R,/opt/QNDgmp/lib -L/opt/ >QNDgmp/lib -L/usr/local/lib -L/usr/lib -L/usr/ccs/lib -L/usr/share/lib >-I/opt/QNDgmp/include >-I/usr/local/lib/gcc/i386-pc-solaris2.9/3.4.6/include/ con >ftest.c >&5 >cc: unrecognized option `-qlanglvl=ansi' >............. >configure:5107: /lib/cpp -I/opt/QNDgmp/include >-I/usr/local/lib/gcc/i386-pc-solaris2.9/3.4.6/include/ conftest.c >"conftest.c", line 13: Can't find include file assert.h The contents of the SHELL and PATH environment variables should help to determine whether that configure script is finding a SunOS program in /usr/bin or /usr/ccs/bin, or one of the older GNU compilers from the Solaris supplemental software disk, which changed their location from /opt/sfw to /usr/sfw - (sometime between Solaris 8 and Solaris 10, I skipped a version, so I'm not certain exactly when), and the sunfreeware.org package, which is in /usr/local. The PATH must be set correctly for the *login* shell. You might need to set it in /etc/profile, /etc/cshrc. The GNU configure script should not depend on a particular version of the compiler as well as cpp, and as, but, of course, the configure script has to find the same tools during the build process. It is actually flexible enough that you can switch tool chains rather quickly. YMMV - this solves 90 percent of the issues I have with compiler version skew. ---------------------------------------------------------------------------- Ctalk Project Home Page: http://ctalk-lang.sourceforge.net Mailing List: ctalk-lang-announce@xxxxxxxxxxxxxxxxxxxxx ----------------------------------------------------------------------------