Hello all, i have been trying to get started with libMesh since a few weeks. Everything ran very well until i enabled the complex option. i downloaded latest version of libMesh code via svn, and compiled petsc-3.0.0-p3 by using following configuration -------------------------------------------------------------- $./config/configure.py --with-cc=gcc \ --with-fc=gfortran \ --with-cxx=g++ \ --with-mpi-compilers=0 \ --with-shared=1 \ --with-debugging=1 \ --download-mpich=1 \ --download-f-blas-lapack=1 \ --with-scalar-type=complex $make all test --------------------------------------------------------------
everything seemed to work, so i carried on configuring libmesh ------------------------------------------------------------------------- $CXX=g++ CC=gcc F77=gfortran ./configure --enable-complex --enable-ifem $make ------------------------------------------------------------------------- during the compilation, it pops up the error message ------------------------------------------------------------------------- Compiling C++ (in optimized mode) src/base/libmesh.C... In file included from /home/ping/programs/petsc-3.0.0-p3/include/petsc.h:353, from /home/ping/programs/libmesh/include/numerics/petsc_macro.h:83, from src/base/libmesh.C:38: /home/ping/programs/petsc-3.0.0-p3/include/petscmath.h:92: error: expected initializer before ‘PetscScalar’ /home/ping/programs/petsc-3.0.0-p3/include/petscmath.h:181: error: ‘PetscScalar’ does not name a type ... ‘PetscScalar’ is undefined and so on (reasonable) ... ------------------------------------------------------------------------- i traced back to the 'petscmath.h', line 92 is simply a typedef form 'double complex' to ‘PetscScalar’, and also the comments tells that the c compiler must support c90. So i checked the output of libMesh configure. well the problem has been already stated: "checking for gcc option to accept ISO C89... none needed". I read the GNU compiler document, it says that the gcc default standard sould be c90. since there is possibility they have already updated to c99, i also tried to append CFALGS='ansi' (so as std=c89, std=iso9899:1990) while configuring libMesh. The configure reported either "checking for gcc option to accept ISO C89... unsppored" or "checking whether we are using the GNU C compiler... no", and compilation stops at the same spot. i am running gcc 4.3.2 under kubuntu 8.10. am i using the wrong compiler or just didn't configure it right? would be really appreciated if someone can drop me a hint!! Best regards Ping -- Mit freundlichen Grüßen M.Sc. Ping Rong Technische Universität Hamburg-Harburg Institut für Modellierung und Berechnung Denickestraße 17 21073 Hamburg DE 17 Raum 3031 Tel.: ++49 - (0)40 - 42878 2749 Fax: ++49 - (0)40 - 42878 43533 ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Libmesh-devel mailing list Libmesh-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-devel