On 2008-08-28 12:55-0000 trc wrote: > Hi, > > Here is a bug report for a problem I encountered when trying to build PLPlot. > > Problem Summary > --------------- > > When building PLPlot > using a CMake 2.6 generator which specifies a default fortran compiler > eg Visual Studio 9 2008 (and probably earlier versions) > but with no Fortran compiler actually installed, > CMake fails and cannot generate project. > > A number of solutions which require further work, are proposed at the > end of this report. Some could be implemented in the PLPlot CMake > configuration, others in CMake itself. > > Impact - Minor, probably limited to Microsoft Visual Studio users who > do not have a Fortran compiler installed. > > A workaround to the problem is for the user to disable f77 and f95. > eg cmake -G "Visual Studio 9 2008" -DENABLE_f77=OFF -DENABLE_f95=OFF .... > > > Details > ------- > > System configuration: > Windows XP with Microsoft Visual Studio 9 2008 Express Edition > PLPLot - svn head (ie 5.9.0+ revision 8718) > CMake 2.6.1 > > The specific problem: > -------------------- > > When cmake v2.6.1 is run from the subdirectory plplot/builds/vc9_FortranError >> cmake -G "Visual Studio 9 2008" ../.. > CMake fails. The full output is attached but the relevent messages are > > --------------------------------------------- > > < ... preceding checks snipped ... > > > -- Check for working Fortran compiler: ifort > -- Check for working Fortran compiler: ifort -- broken > CMake Error at C:/Program Files/CMake > 2.6/share/cmake-2.6/Modules/CMakeTestFortranCompiler.cmake:25 (MESSAGE): > The Fortran compiler "ifort" is not able to compile a simple test program. > It fails with the following output: > > Change Dir: C:/home/kz/plplot/builds/vc9_NoFortran/CMakeFiles/CMakeTmp > > Run Build Command:C:\PROGRA~1\MICROS~1.0\Common7\IDE\VCExpress.exe > CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec > > Microsoft (R) Visual C++ Express Edition Version 9.0.21022.8. > > Copyright (C) Microsoft Corp 2007. All rights reserved. > > > 'C:\home\kz\plplot\builds\vc9_NoFortran\CMakeFiles\CMakeTmp\cmTryCompileExec.vfproj' > cannot be opened because its project type (.vfproj) is not supported by > this version of Visual Studio. > > < ... Visual Studio Usage information snipped ... > > > > CMake will not be able to correctly generate this project. > Call Stack (most recent call first): > cmake/modules/fortran.cmake:47 (enable_language) > cmake/modules/plplot.cmake:305 (include) > CMakeLists.txt:55 (include)
[...] Hi Terrence: Thanks for your bug report. Superficially, the above two lines: -- Check for working Fortran compiler: ifort -- Check for working Fortran compiler: ifort -- broken would normally mean that ifort was found on your system, but it didn't work. However, you have stated there is no fortran installed on your system, and ifort is first on the list of possible Fortran compilers in CMakeDetermineFortranCompiler.cmake so it is quite possible you have found a bug in CMake-2.6.x where it incorrectly attempts to force the first compiler on the list when no fortran is installed. CMakeDetermineFortranCompiler.cmake from 2.6.1 has logic that is complicated by a lot of different cases. For example, results strongly depend on which CMake generator is being used and whether you have Visual Studio or not. This whole area has been reworked for CMake-2.6.x which normally is a huge improvement over 2.4.x for Fortran. However, something may have slipped through the cracks so that 2.6.x doesn't handle the "no Fortran" case properly for your particular generator and your particular Visual Studio. Just to confirm this is a general CMake-2.6.x issue, do you get the same results with the following one-line CMakeLists.txt file? project(test Fortran) If so, this test takes PLplot completely out of the equation, and I would strongly urge you to take the results of that one-line test to the CMake mailing list. (BTW, that list is normally most helpful.) When you report there, you should make clear that ifort is definitely not installed anywhere on your system. While this issue is getting resolved, please enjoy PLplot using the workaround of specifically disabling Fortran. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel