[petsc-users] Error compiling Petsc-3.3 and metis using Visual C++ 2008

Mengda Wu wumengda at gmail.com
Sun Jul 22 14:45:24 CDT 2012


Hi All,

   I am trying to compiling Petsc-3.3 using VC2008. The command I am using
under cygwin command window is

./config/configure.py --with-cc='cl' --with-fc=0  --with-cxx='cl'
--with-debugging=0 --download-f2cblaslapack --download-metis
--with-sowing=0 --with-c2html -CFLAGS='-MD -wd4996' -CXXFLAGS='-MD -wd4996'

   f2cblaslapack is compiled fine. But the metis step has some errors
(extracted from configure.log). BTW, I am using Cygwin's cmake.

===========================================================================================
Error running configure on METIS: Could not execute "cd
/cygdrive/c/Library/Petsc/petsc-3.3/externalpackages/metis-5.0.2-p3/arch-mswin-c-opt
&& /usr/bin/cmake ..
-DCMAKE_INSTALL_PREFIX=/cygdrive/c/Library/Petsc/petsc-3.3/arch-mswin-c-opt
-DCMAKE_VERBOSE_MAKEFILE=1 -DGKLIB_PATH=../GKlib
-DCMAKE_C_COMPILER="/cygdrive/c/Library/Petsc/petsc-3.3/bin/win32fe/win32fe
cl" -DCMAKE_C_FLAGS:STRING="-MD -wd4996 -O2 "
-DMETIS_USE_DOUBLEPRECISION=1":
-- The C compiler identification is unknown
-- The CXX compiler identification is MSVC
-- Check for working C compiler:
/cygdrive/c/Library/Petsc/petsc-3.3/bin/win32fe/win32fe cl
-- Check for working C compiler:
/cygdrive/c/Library/Petsc/petsc-3.3/bin/win32fe/win32fe cl -- broken
-- Configuring incomplete, errors occurred!
CMake Warning at /usr/share/cmake-2.8.7/Modules/Platform/CYGWIN.cmake:15
(message):
  CMake no longer defines WIN32 on Cygwin!

  (1) If you are just trying to build this project, ignore this warning or
  quiet it by setting CMAKE_LEGACY_CYGWIN_WIN32=0 in your environment or in
  the CMake cache.  If later configuration or build errors occur then this
  project may have been written under the assumption that Cygwin is WIN32.
  In that case, set CMAKE_LEGACY_CYGWIN_WIN32=1 instead.

  (2) If you are developing this project, add the line

    set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is
required

  at the top of your top-level CMakeLists.txt file or set the minimum
  required version of CMake to 2.8.4 or higher.  Then teach your project to
  build on Cygwin without WIN32.
Call Stack (most recent call first):
  /usr/share/cmake-2.8.7/Modules/CMakeSystemSpecificInformation.cmake:36
(INCLUDE)
  CMakeLists.txt:2 (project)


CMake Error: your C compiler:
"/cygdrive/c/Library/Petsc/petsc-3.3/bin/win32fe/win32fe cl" was not
found.   Please set CMAKE_C_COMPILER to a valid compiler path or name.
CMake Error: Internal CMake error, TryCompile configure of cmake failed
CMake Error at /usr/share/cmake-2.8.7/Modules/CMakeTestCCompiler.cmake:52
(MESSAGE):
  The C compiler "/cygdrive/c/Library/Petsc/petsc-3.3/bin/win32fe/win32fe
cl"
  is not able to compile a simple test program.

  It fails with the following output:





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)


CMake Error: your C compiler:
"/cygdrive/c/Library/Petsc/petsc-3.3/bin/win32fe/win32fe cl" was not
found.   Please set CMAKE_C_COMPILER to a valid compiler path or name.
*******************************************************************************
  File "./config/configure.py", line 311, in petsc_configure
    framework.configure(out = sys.stdout)
  File
"/cygdrive/c/Library/Petsc/petsc-3.3/config/BuildSystem/config/framework.py",
line 933, in configure
    child.configure()
  File
"/cygdrive/c/Library/Petsc/petsc-3.3/config/BuildSystem/config/package.py",
line 526, in configure
    self.executeTest(self.configureLibrary)
  File
"/cygdrive/c/Library/Petsc/petsc-3.3/config/BuildSystem/config/base.py",
line 115, in executeTest
    ret = apply(test, args,kargs)
  File
"/cygdrive/c/Library/Petsc/petsc-3.3/config/BuildSystem/config/package.py",
line 453, in configureLibrary
    for location, directory, lib, incl in self.generateGuesses():
  File
"/cygdrive/c/Library/Petsc/petsc-3.3/config/BuildSystem/config/package.py",
line 229, in generateGuesses
    d = self.checkDownload(1)
  File
"/cygdrive/c/Library/Petsc/petsc-3.3/config/BuildSystem/config/package.py",
line 320, in checkDownload
    return self.getInstallDir()
  File
"/cygdrive/c/Library/Petsc/petsc-3.3/config/BuildSystem/config/package.py",
line 184, in getInstallDir
    return os.path.abspath(self.Install())
  File
"/cygdrive/c/Library/Petsc/petsc-3.3/config/PETSc/packages/metis.py", line
76, in Install
    raise RuntimeError('Error running configure on METIS: '+str(e))




Mengda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120722/2d41c389/attachment-0001.html>


More information about the petsc-users mailing list