Hi,

Please consider this as a "report" rather than a "complaint" - and I'm not even sure that the problem lies with cmake. Faik it may be a plplot issue.

I'm using the 64-bit MinGW64 (gcc) cross-compiler to build plplot-5.9.6 on Windows Vista64 and noticed that CMAKE_Fortran_COMPILER and CMAKE_CXX_COMPILER options are not working as I expect.

With this particular compiler, the gcc, ar, g++ and gfortran executables are all prefixed with ' x86_64-w64-mingw32-'. There's no problem with

-DCMAKE_C_COMPILER:FILEPATH=C:/_64/mingw64/bin/x86_64-w64-mingw32-gcc.exe
and with
-DCMAKE_AR:FILEPATH=C:/_64/mingw64/bin/x86_64-w64-mingw32-ar.exe

But neither

-DCMAKE_CXX_COMPILER:FILEPATH=C:/_64/mingw64/bin/x86_64-w64-mingw32-g++.exe
nor
-DCMAKE_Fortran_COMPILER:FILEPATH=C:/_64/mingw64/bin/x86_64-w64-mingw32-gfortran.exe

enables the compiler in question to be found.

Attached is the output of running

cmake -G "MinGW Makefiles" -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=install -DCMAKE_AR:FILEPATH=C:/_64/mingw64/bin/x86_64-w64-mingw32-ar.exe -DCMAKE_C_COMPILER:FILEPATH=x86_64-w64-mingw32-gcc.exe -DBUILD_TEST=ON -DCMAKE_Fortran_COMPILER:FILEPATH=C:/_64/mingw64/bin/x86_64-w64-mingw32-gfortran.exe ..

I think the key bit is "The Fortran compiler identification is unknown". Why would that be the case for x86_64-w64-mingw32-g++.exe and x86_64-w64-mingw32-gfortran.exe, but not x86_64-w64-mingw32-gcc.exe and x86_64-w64-mingw32-ar.exe ?

(I've omitted specifying the CXX argument above - but when I do specify it, output is essentially the same as for Fortran.)

I should add that this is not actually a "show-stopper". If I create copies of the fortran and g++ executables named 'gfortran.exe' and 'g++.exe', then everything works fine - but that's a somewhat hackish solution.

Btw, my gcc compiler version is currently 4.6.0, and I got the same behaviour with 4.4.4.

If there's something else I can do/try to help solve this, I'm quite happy to oblige.

Cheers,
Rob
-- The C compiler identification is GNU
-- Check for working C compiler: C:/_64/mingw64/bin/x86_64-w64-mingw32-gcc.exe
-- Check for working C compiler: C:/_64/mingw64/bin/x86_64-w64-mingw32-gcc.exe 
-- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- CMake version = 2.8.1
-- WARNING: bash shell not found, ctest will not work properly
-- Checking whether system has ANSI C header files
-- Looking for include files StandardHeadersExist
-- Looking for include files StandardHeadersExist - found
-- Performing Test memchrExists
-- Performing Test memchrExists - Success
-- Performing Test freeExists
-- Performing Test freeExists - Success
-- Check for whether ctype.h macros work on characters with the
  high bit set.
-- High-bit characters - work
-- ANSI C header files - found
-- Looking for include files PL_HAVE_UNISTD_H
-- Looking for include files PL_HAVE_UNISTD_H - found
-- Looking for include files HAVE_TERMIOS_H
-- Looking for include files HAVE_TERMIOS_H - not found.
-- Looking for include files PL_HAVE_STDINT_H
-- Looking for include files PL_HAVE_STDINT_H - found
-- Looking for crt_externs.h
-- Looking for crt_externs.h - not found
-- Performing Test HAVE_SYS_WAIT_H
-- Performing Test HAVE_SYS_WAIT_H - Failed
-- Looking for DIR in sys/types.h;dirent.h
-- Looking for DIR in sys/types.h;dirent.h - found
-- Check for signal return type in <signal.h>
-- Check for signal handler return type type void  - found
-- Looking for popen
-- Looking for popen - found
-- Looking for usleep
-- Looking for usleep - found
-- Looking for mkstemp
-- Looking for mkstemp - not found
-- Looking for mkstemp
-- Looking for mkstemp - not found
-- Looking for _NSGetArgc
-- Looking for _NSGetArgc - not found
-- Looking for finite
-- Looking for finite - found
-- Looking for isnan
-- Looking for isnan - found
-- Looking for isinf
-- Looking for isinf - found
-- Looking for snprintf
-- Looking for snprintf - found
-- SWIG was not found. Please specify Swig executable location
-- Found Perl: C:/cygwin/bin/perl.exe
-- Looking for pkg-config - not found
-- WARNING: Install-tree build will be disabled.
-- X11_FOUND = -- X11_INCLUDE_DIR = -- X11_COMPILE_FLAGS = -- X11_LIBRARIES = -- The C compiler identification is GNU
-- Check for working C compiler: C:/_64/mingw64/bin/x86_64-w64-mingw32-gcc.exe
-- Check for working C compiler: C:/_64/mingw64/bin/x86_64-w64-mingw32-gcc.exe 
-- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- CMAKE_GENERATOR = MinGW Makefiles
-- The CXX compiler identification is unknown
-- Check for working CXX compiler: g++.exe
CMake Error at 
C:/_32/cmake/share/cmake-2.8/Modules/Platform/Windows-g++.cmake:1 (INCLUDE):
 include could not find load file:

   C:/_32/cmake/share/cmake-2.8/Modules/Platform/Windows-gcc.cmake
Call Stack (most recent call first):
 C:/_32/cmake/share/cmake-2.8/Modules/CMakeCXXInformation.cmake:57 (INCLUDE)
 CMakeLists.txt:3 (PROJECT)


CMake Error: your CXX compiler: "g++.exe" was not found.   Please set 
CMAKE_CXX_COMPILER to a valid compiler path or name.
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Check for working CXX compiler: g++.exe -- broken
CMake Error at 
C:/_32/cmake/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake:45 (MESSAGE):
 The C++ compiler "g++.exe" 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:19 (enable_language)


CMake Error: your CXX compiler: "g++.exe" was not found.   Please set 
CMAKE_CXX_COMPILER to a valid compiler path or name.
-- Configuring incomplete, errors occurred!
-- WARNING: no working C++ compiler so disabling C++ bindings and examples.
-- The C compiler identification is GNU
-- Check for working C compiler: C:/_64/mingw64/bin/x86_64-w64-mingw32-gcc.exe
-- Check for working C compiler: C:/_64/mingw64/bin/x86_64-w64-mingw32-gcc.exe 
-- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- CMAKE_GENERATOR = MinGW Makefiles
-- The Fortran compiler identification is unknown
CMake Error: your Fortran compiler: "CMAKE_Fortran_COMPILER-NOTFOUND" was not 
found.   Please set CMAKE_Fortran_COMPILER to a valid compiler path or name.
-- Configuring incomplete, errors occurred!
-- WARNING: no working Fortran compiler so disabling Fortran bindings and 
examples.
-- WARNING: Java requires shared libraries. Disabling java bindings
-- WARNING: Python requires shared libraries. Disabling Python bindings
-- WARNING: Octave requires working C++ compiler to build.  Disabling octave 
bindings
-- Looking for include paths and libraries for Tcl/Tk
-- Could NOT find Tclsh  (missing:  TCL_TCLSH)
-- Could NOT find TCL  (missing:  TCL_LIBRARY TCL_INCLUDE_PATH)
-- Could NOT find TCLTK  (missing:  TCL_LIBRARY TCL_INCLUDE_PATH TK_LIBRARY 
TK_INCLUDE_PATH)
-- Could NOT find TK  (missing:  TK_LIBRARY TK_INCLUDE_PATH)
-- Looking for include paths and libraries for Tcl/Tk - not found
-- WARNING: Disabling everything that is Tcl/Tk related
-- WARNING: Disabling Perl/PDL examples because BUILD_SHARED_LIBS=OFF
-- The C compiler identification is GNU
-- Check for working C compiler: C:/_64/mingw64/bin/x86_64-w64-mingw32-gcc.exe
-- Check for working C compiler: C:/_64/mingw64/bin/x86_64-w64-mingw32-gcc.exe 
-- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- CMAKE_GENERATOR = MinGW Makefiles
CMake Error: your Ada compiler: "CMAKE_Ada_COMPILER-NOTFOUND" was not found.   
Please set CMAKE_Ada_COMPILER to a valid compiler path or name.
-- Configuring incomplete, errors occurred!
-- WARNING: no working Ada compiler so disabling Ada bindings and examples.
-- WARNING: Lua requires shared libraries. Disabling Lua bindings
-- The C compiler identification is GNU
-- Check for working C compiler: C:/_64/mingw64/bin/x86_64-w64-mingw32-gcc.exe
-- Check for working C compiler: C:/_64/mingw64/bin/x86_64-w64-mingw32-gcc.exe 
-- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- CMAKE_GENERATOR = MinGW Makefiles
-- D Compiler Install Prefix (use D_PATH env var to override): CMAKE_D_COMPI
CMake Error: your D compiler: "CMAKE_D_COMPILER-NOTFOUND" was not found.   
Please set CMAKE_D_COMPILER to a valid compiler path or name.
-- Configuring incomplete, errors occurred!
-- WARNING: no working D compiler so disabling D bindings and examples.
-- Check for NaN awareness in C compiler
-- Check for NaN awareness in C compiler - found
-- WARNING: qhull library not found.  Setting HAVE_QHULL to OFF.
-- WARNING: pango not found because pkg-config not available.
-- WARNING: Shared libraries not built. Setting ENABLE_DYNDRIVERS OFF.
-- WARNING: pkg-config not found. Setting cairo drivers to OFF.
-- WARNING: ENABLE_tk OFF.  Setting PLD_tk, PLD_ntk, and PLD_tkwin OFF.
-- WARNING: no working C++ compiler so setting psttf device to OFF.
-- WARNING: no working C++ compiler so disabling all qt devices.
-- WARNING: PLD_extqt is OFF so setting ENABLE_qt to OFF.
-- WARNING: ENABLE_python is OFF so setting ENABLE_pyqt4 to OFF.
-- Looking for gdi32 header and library
-- Looking for gdi32 header and library - found
-- WARNING: no working C++ compiler so setting all wxwidgets devices to OFF.
-- WARNING: no working C++ compiler so setting ENABLE_wxwidgets to OFF.
-- WARNING: OCaml requires shared libraries. Disabling ocaml bindings
-- WARNING: validate target will not be available to check for syntax errors in 
the PLplot DocBook documentation because onsgmls was not found.
-- WARNING: pkg-config not found so plplotcanvas_demo, plplotcanvas_animation,  
extXdrawable_demo, and ext-cairo-test not built.

Summary of CMake build system results for PLplot

Install location variables which can be set by the user:
CMAKE_INSTALL_PREFIX:      C:/_64/comp/plplot-5.9.6/staticbuild3/install
CMAKE_INSTALL_EXEC_PREFIX  C:/_64/comp/plplot-5.9.6/staticbuild3/install
CMAKE_INSTALL_BINDIR       C:/_64/comp/plplot-5.9.6/staticbuild3/install/bin
CMAKE_INSTALL_DATADIR      C:/_64/comp/plplot-5.9.6/staticbuild3/install/share
CMAKE_INSTALL_LIBDIR       C:/_64/comp/plplot-5.9.6/staticbuild3/install/lib
CMAKE_INSTALL_INCLUDEDIR   C:/_64/comp/plplot-5.9.6/staticbuild3/install/include
CMAKE_INSTALL_INFODIR      
C:/_64/comp/plplot-5.9.6/staticbuild3/install/share/info
CMAKE_INSTALL_MANDIR       
C:/_64/comp/plplot-5.9.6/staticbuild3/install/share/man

Derived install location variables:
DATA_DIR        C:/_64/comp/plplot-5.9.6/staticbuild3/install/share/plplot5.9.6
LIB_DIR         C:/_64/comp/plplot-5.9.6/staticbuild3/install/lib
INCLUDE_DIR     C:/_64/comp/plplot-5.9.6/staticbuild3/install/include/plplot
BIN_DIR         C:/_64/comp/plplot-5.9.6/staticbuild3/install/bin
TCL_DIR         
C:/_64/comp/plplot-5.9.6/staticbuild3/install/share/plplot5.9.6/tcl
ADA_INCLUDE_DIR 
C:/_64/comp/plplot-5.9.6/staticbuild3/install/share/ada/adainclude/plplotadad
ADA_LIB_DIR     
C:/_64/comp/plplot-5.9.6/staticbuild3/install/lib/ada/adalib/plplotadad
PYTHON_INSTDIR  
DRV_DIR         
C:/_64/comp/plplot-5.9.6/staticbuild3/install/lib/plplot5.9.6/driversd
DOC_DIR         C:/_64/comp/plplot-5.9.6/staticbuild3/install/share/doc/plplot
MAN_DIR         C:/_64/comp/plplot-5.9.6/staticbuild3/install/share/man
INFO_DIR        C:/_64/comp/plplot-5.9.6/staticbuild3/install/share/info

Other important CMake variables:

CMAKE_SYSTEM_NAME:      Windows
UNIX:                   
WIN32:                  1
APPLE:                  
MSVC:                           (MSVC_VERSION:  )
MINGW:                  1
MSYS:                   
CYGWIN:                 
BORLAND:                
WATCOM:
SWIG_FOUND:             FALSE
PERL_FOUND:             TRUE
X11_FOUND:              

CMAKE_BUILD_TYPE:       
CMAKE_C_COMPILER CMAKE_C_FLAGS: C:/_64/mingw64/bin/x86_64-w64-mingw32-gcc.exe LIB_TAG: d

ENABLE_DYNDRIVERS:      OFF
DRIVERS_LIST: mem;null;ps;svg;wingcc;xfig
DEVICES_LIST: mem;null;ps;svg;wingcc;xfig

Library options:
BUILD_SHARED_LIBS:      OFF             PL_DOUBLE:      ON

Optional libraries:
HAVE_QHULL:             OFF             WITH_CSA:       ON
HAVE_FREETYPE:                          HAVE_PTHREAD:   
HAVE_AGG:               

Language Bindings:
ENABLE_f77:             OFF             ENABLE_f95:             OFF
ENABLE_cxx:             OFF             ENABLE_java:            OFF
ENABLE_python:          OFF             ENABLE_octave:          OFF
ENABLE_tcl:             OFF             ENABLE_itcl:            OFF
ENABLE_tk:              OFF             ENABLE_itk:             OFF
ENABLE_pdl:             OFF             ENABLE_wxwidgets:       OFF
ENABLE_ada:             OFF             ENABLE_d:               OFF
ENABLE_ocaml:           OFF             ENABLE_lua:             OFF
ENABLE_qt:              OFF             ENABLE_pyqt4:           OFF

-- Configuring done
-- Generating done
-- Build files have been written to: C:/_64/comp/plplot-5.9.6/staticbuild3
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to