<div>>> Hi all,</div><div>>></div><div>>> There are anyone who know how to install netcdf with cross compile? I</div><div>>> configured petsc with netcdf, but got error below:</div><div>>></div><div><br></div><div>>Send externalpackages./netcdf*/config.log</div><div><br></div><div>>  Thanks,</div><div><br></div><div>>  Matt</div><div><br></div><div>I attached the file config.log. </div><div><br></div><div>>></div><div>>> >===========================================================================>====</div><div>>>              Configuring PETSc to compile on your system</div><div>>></div><div>>></div><div>>> >===========================================================================>====</div><div>> >===========================================================================>====</div><div>>></div><div>>>                                                    ***** WARNING: MPI_DIR</div><div>>> found in enviornment variables - ignoring ******</div><div>>>></div><div>>></div><div>>>  >===========================================================================>====</div><div>>></div><div>>></div><div>>>  ===============================================================================</div><div>>></div><div>>>                                                              WARNING!</div><div>>> Compiling PETSc with no debugging, this should</div><div>>></div><div>>>                                                only be done for timing and</div><div>>> production runs. All development should</div><div>>></div><div>>>                      be done when configured using --with-debugging=1</div><div>></div><div>></div><div>> ===============================================================================</div><div>>></div><div>>></div><div>>>  ===============================================================================</div><div>>></div><div>>>                                                    Configuring NetCDF; this</div><div>>> may take several minutes</div><div>>></div><div>>></div><div>>>  ===============================================================================</div><div>>></div><div>>></div><div>>></div><div>>></div><div>>></div><div>>> *******************************************************************************</div><div>>>          UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log for</div><div>>> details):</div><div>>></div><div>>> -------------------------------------------------------------------------------</div><div>>> Error running make on NetCDF: Could not execute "cd</div><div>>> /projects/fako9399/petsc-3.3-p3/externalpackages/netcdf-4.1.1 &&</div><div>>> AR="/usr/bin/ar" ARFLAGS="cr"</div><div>>> CC="/curc/tools/free/redhat_5_x86_64/openmpi-1.4.3_ib/bin/mpicc" CFLAGS="</div><div>>> -fPIC  -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -O</div><div>>>  -I/curc/tools/free/redhat_5_x86_64/openmpi-1.4.3_ib/include</div><div>>> -I/curc/tools/free/redhat_5_x86_64/openmpi-1.4.3_ib/include -I."</div><div>>> CXX="/curc/tools/free/redhat_5_x86_64/openmpi-1.4.3_ib/bin/mpicxx"</div><div>>> CXXFLAGS="  -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -O</div><div>>> -fPIC   -I/curc/tools/free/redhat_5_x86_64/openmpi-1.4.3_ib/include</div><div>>> -I/curc/tools/free/redhat_5_x86_64/openmpi-1.4.3_ib/include -I."</div><div>>> FC="/curc/tools/free/redhat_5_x86_64/openmpi-1.4.3_ib/bin/mpif90" FCFLAGS="</div><div>>> -fPIC  -Wno-unused-variable -O</div><div>>> -I/curc/tools/free/redhat_5_x86_64/openmpi-1.4.3_ib/include</div><div>>> -I/curc/tools/free/redhat_5_x86_64/openmpi-1.4.3_ib/include -I."</div><div>>> F90="/curc/tools/free/redhat_5_x86_64/openmpi-1.4.3_ib/bin/mpif90"</div><div>>> ./configure --prefix=/projects/fako9399/petsc-3.3-p3/arch-linux264-cxx-opt</div><div>>> --libdir=/projects/fako9399/petsc-3.3-p3/arch-linux264-cxx-opt/lib</div><div>>> --disable-dap --enable-shared":</div><div>>> configure: netCDF 4.1.1</div><div>>> checking build system type... x86_64-unknown-linux-gnu</div><div>>> checking host system type... x86_64-unknown-linux-gnu</div><div>>> checking for a BSD-compatible install... /usr/bin/install -c</div><div>>> checking whether build environment is sane... yes</div><div>>> checking for a thread-safe mkdir -p... /bin/mkdir -p</div><div>>> checking for gawk... gawk</div><div>>> checking whether make sets $(MAKE)... yes</div><div>>> configure: checking user options</div><div>> >checking whether CXX is set to ''... no</div><div>>> checking whether FC is set to ''... no</div><div>>> checking whether F90 is set to ''... no</div><div>>> checking whether a NCIO_MINBLOCKSIZE was specified... 256</div><div>>> checking whether udunits is to be built... no</div><div>> >checking if fsync support is enabled... yes</div><div>>> checking whether extra valgrind tests should be run... no</div><div>>> checking whether libcf is to be built... no</div><div>>> checking whether reading of HDF4 SD files is to be enabled... no</div><div>>> checking whether to fetch some sample HDF4 files from Unidata ftp site to</div><div>> >test HDF4 reading (requires wget)... no</div><div>>> checking whether parallel I/O for classic and 64-bit offset files using</div><div>>> parallel-netcdf is to be enabled... no</div><div>> >checking whether a location for the parallel-netcdf library was</div><div>>> specified... no</div><div>>> checking whether new netCDF-4 C++ API is to be built... no</div><div>> >checking whether extra example tests should be run... no</div><div>> >checking whether parallel IO tests should be run... no</div><div>> >checking whether a location for the HDF5 library was specified...</div><div>>> checking whether a location for the ZLIB library was specified...</div><div>>> checking whether a location for the SZLIB library was specified...</div><div>>> checking whether a location for the HDF4 library was specified...</div><div>>> checking whether a default chunk size in bytes was specified... 4194304</div><div>> >checking whether a maximum per-variable cache size for HDF5 was</div><div>> >specified... 67108864</div><div>> >checking whether a number of chunks for the default per-variable cache was</div><div>>> specified... 10</div><div>>> checking whether a default file cache size for HDF5 was specified...</div><div>> >4194304</div><div>> >checking whether a default file cache maximum number of elements for HDF5</div><div>> >was specified... 1009</div><div>> >checking whether a default cache preemption for HDF5 was specified... 0.75</div><div>> >checking whether netCDF-4 logging is enabled... no</div><div>> >checking whether a path for curl-config was specified... no</div><div>> >checking whether a location for curl installation was specified... no</div><div>> >configure: checking whether a location for curl-config is in PATH... yes</div><div>> >checking whether DAP client is to be built... no</div><div>> >checking whether dap remote testing should be enabled (default on)... no</div><div>> >checking whether the time-consuming dap tests should be enabled (default</div><div>> >off)... no</div><div>> >checking whether a location for liboc was specified... no</div><div>>> checking whether netCDF extra tests should be run (developers only)... no</div><div>> >checking whether Fortran compiler(s) should be tested during configure...</div><div>> >yes</div><div>> >checking whether FFIO will be used... no</div><div>> >checking whether to skip C++, F77, or F90 APIs if compiler is broken... yes</div><div>> >checking whether only the C library is desired... no</div><div>>> checking whether examples should be built... yes</div><div>>> checking whether F77 API is desired... yes</div><div>> >checking whether any Fortran API is desired... yes</div><div>> >checking whether F90 API is desired... yes</div><div>> >checking whether fortran type sizes should be checked... yes</div><div>>> checking whether C API is desired... yes</div><div>>> checking where to get netCDF C-only library for separate fortran</div><div>>> libraries...</div><div>> >checking whether CXX API is desired... yes</div><div>> >checking whether v2 netCDF API should be built... yes</div><div>> >checking whether the ncgen/ncdump should be built... yes</div><div>>> checking whether large file (> 2GB) tests should be run... no</div><div>> >checking whether benchmaks should be run (experimental)... no</div><div>>> checking whether extreme numbers should be used in tests... yes</div><div>> >checking where to put large temp files if large file tests are run... .</div><div>> >checking whether a win32 DLL is desired... no</div><div>> >checking whether separate fortran libs are desired... yes</div><div>>> configure: finding C compiler</div><div>> >checking whether the C compiler works... yes</div><div>>> checking for C compiler default output file name... a.out</div><div>> >checking for suffix of executables...</div><div>> >checking whether we are cross compiling... configure: error: in</div><div>>> `/projects/fako9399/petsc-3.3-p3/externalpackages/netcdf-4.1.1':</div><div>> >configure: error: cannot run C compiled programs.</div><div>> >If you meant to cross compile, use `--host'.</div><div>> >See `config.log' for more details.</div><div>>></div><div>>> *******************************************************************************</div><div>>></div><div>> >The configure script is:</div><div>>></div><div>> >  ./configure --with-clanguage=cxx --with-shared-libraries=1</div><div>>> --with-dynamic-loading=1 --download-f-blas-lapack=1 --with-mpi-dir=$MPI_DIR</div><div>>> --known-mpi-shared-libraries=0 --with-batch=1  --download-parmetis=1</div><div>> >--download-metis=1 --with-64-bit-indices=1 --download-netcdf=1</div><div>> >--download-exodusii=1 --with-debugging=no  --download-ptscotch=1</div><div>>></div><div>>> I also attached the file configure.log</div><div>>></div><div>> >------------------</div><div>> >Fande Kong</div><div>>> ShenZhen Institutes of Advanced Technology</div><div>> >Chinese Academy of Sciences</div><div>>></div><div>>></div><div><br></div>