Problem building 5.34.34 with VS12

Hello,
I am having trouble building Root5.34.34 from sources for Win7x64 using VS 12 (2013) and cmake 3.1.2.
I have path set to c:\windows\system32, then call vsvars32.bat for the VS12 toolchain and add . to the front.

I issue:
cmake -G"Visual Studio 12" ./root

and see some configuring happen but then it ends with errors caused by ZLIB. I don’t believe zlib should be found externally and it looks like some of the configuration logic does set builtin_zlib.
Do I need to configure something differently?

D:\root5.34.34_VS2013>cmake -G"Visual Studio 12" ./root
-- The C compiler identification is MSVC 18.0.40629.0
-- The CXX compiler identification is MSVC 18.0.40629.0
-- Check for working C compiler using: Visual Studio 12 2013
-- Check for working C compiler using: Visual Studio 12 2013 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 12 2013
-- Check for working CXX compiler using: Visual Studio 12 2013 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at cmake/modules/CheckCompiler.cmake:25 (if):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "MSVC" will no longer be dereferenced when the policy
  is set to NEW.  Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
  CMakeLists.txt:33 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- CMAKE_BUILD_TYPE: RelWithDebInfo
-- Performing Test CXX_HAS_Wno-array-bounds
-- Performing Test CXX_HAS_Wno-array-bounds - Failed
-- Performing Test CXX_HAS_Wno-strict-aliasing
-- Performing Test CXX_HAS_Wno-strict-aliasing - Failed
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Performing Test CXX_HAS_Wno_deprecated_declarations
-- Performing Test CXX_HAS_Wno_deprecated_declarations - Failed
-- ROOT Platform: win32
-- ROOT Architecture: win32
-- Build Type: RelWithDebInfo
-- Compiler Flags: -nologo -ID:/root5.34.34_VS2013/root/build/win -FIw32pragma.h -FIsehmap.h -MD -GR -EHsc- -W3 -wd4244 -D_WIN32 /MP
-- Looking for ZLib
-- Could NOT find ZLIB (missing:  ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Zlib not found. Switching on builtin_zlib option
-- Looking for Freetype
-- Could NOT find Freetype (missing:  FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS)
-- FreeType not found. Switching on builtin_freetype option
-- Looking for PCRE
-- PCRE not found. Switching on builtin_pcre option
-- Looking for LZMA
-- LZMA not found. Switching on builtin_lzma option
-- Building LZMA version 5.0.3 included in ROOT itself
-- Could NOT find GIF (missing:  GIF_LIBRARY GIF_INCLUDE_DIR)
-- Could NOT find TIFF (missing:  TIFF_LIBRARY TIFF_INCLUDE_DIR)
-- Could NOT find ZLIB (missing:  ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Could NOT find PNG (missing:  PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
-- Could NOT find JPEG (missing:  JPEG_LIBRARY JPEG_INCLUDE_DIR)
-- Looking for GSL
-- Could NOT find GSL (missing:  GSL_INCLUDE_DIR GSL_LIBRARY) (Required is at least version "1.10")
-- GSL not found. Set variable GSL_DIR to point to your GSL installation
--                Alternatively, you can also enable the option 'builtin_gsl' to build the GSL libraries internally'
--                For the time being switching OFF 'mathmore' option
-- Looking for Python
-- Could NOT find PythonInterp (missing:  PYTHON_EXECUTABLE)
-- Could NOT find PythonLibs (missing:  PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
-- Python not found. Switching off python option
-- Looking for GCCXML
-- Looking for OpenGL
-- Found OpenGL: opengl32
-- Looking for Graphviz
-- Could NOT find GRAPHVIZ (missing:  GRAPHVIZ_INCLUDE_DIR GRAPHVIZ_cdt_LIBRARY GRAPHVIZ_gvc_LIBRARY GRAPHVIZ_graph_LIBRARY GRAPHVIZ_pathplan_LIBRARY)
-- Graphviz not found. Switching off gviz option
-- Looking for Bonjour
-- Checking whether Bonjour/Avahi is supported
-- Bonjour not found. Switching off bonjour option
-- Looking for Kerberos 5
-- Could NOT find KRB5 (missing:  KRB5_LIBRARY KRB5_INCLUDE_DIR)
-- Kerberos 5 not found. Switching off krb5 option
-- Looking for LibXml2
-- Could NOT find LibXml2 (missing:  LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
-- LibXml2 not found. Switching off xml option
-- Looking for OpenSSL
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing:  OPENSSL_LIBRARIES OPENSSL_INCLUDE_DIR)

-- OpenSSL not found. Switching off ssl option
-- Looking for Castor
-- Castor not found. Switching off castor/rfio option
-- Looking for MySQL
-- Could NOT find MYSQL (missing:  MYSQL_INCLUDE_DIR MYSQL_LIBRARIES)
-- MySQL not found. Switching off mysql option
-- Looking for Oracle
-- Oracle not found.
-- Oracle: You can specify includes: -DORACLE_PATH_INCLUDES=/usr/include/oracle/10.2.0.3/client
--    currently found includes:
-- Oracle: You can specify libs: -DORACLE_PATH_LIB=/usr/lib/oracle/10.2.0.3/client/lib
--    currently found libs: ORACLE_LIBRARY_OCCI-NOTFOUND;ORACLE_LIBRARY_CLNTSH-NOTFOUND;ORACLE_LIBRARY_LNNZ-NOTFOUND
-- Oracle not found. Switching off oracle option
-- Looking for ODBC
-- Looking for PostgreSQL
-- Could NOT find PostgreSQL (missing:  POSTGRESQL_INCLUDE_DIR POSTGRESQL_LIBRARIES)
-- PostgreSQL not found. Switching off pgsql option
-- Looking for SQLite
-- Could NOT find Sqlite (missing:  SQLITE_INCLUDE_DIR SQLITE_LIBRARIES)
-- SQLite not found. Switching off sqlite option
-- Looking for Pythia6
-- Pythia6 not found. Switching off pythia6 option
-- Looking for Pythia8
-- Could NOT find Pythia8 (missing:  PYTHIA8_INCLUDE_DIR PYTHIA8_LIBRARY)
-- Pythia8 not found. Switching off pythia8 option
-- Looking for FFTW3
-- FFTW3 not found. Switching off fftw3 option
-- Looking for CFITSIO
-- Could NOT find CFITSIO (missing:  CFITSIO_INCLUDE_DIR CFITSIO_LIBRARY)
-- CFITSIO not found. You can enable the option 'builtin_cfitsio' to build the library internally'
--                    For the time being switching off 'fitsio' option
-- Support Shadow password not found. Switching off shadowpw option
-- Alien API not found. Set variable ALIEN_DIR to point to your Alien installation
-- For the time being switching OFF 'alien' option
-- Monalisa not found. Set variable MONALISA_DIR to point to your Monalisa installation
-- For the time being switching OFF 'monalisa' option
-- Looking for XROOTD
-- XROOTD not found. Set environment variable XRDSYS to point to your XROOTD installation
--                   Alternatively, you can also enable the option 'builtin_xrootd' to build XROOTD  internally'
--                   For the time being switching OFF 'xrootd' option
-- Could NOT find GFAL (missing:  GFAL_INCLUDE_DIR SRM_IFCE_INCLUDE_DIR GFAL_LIBRARIES)
-- GFAL library not found. Set variable GFAL_DIR to point to your gfal installation
                      and the variable SRM_IFCE_DIR to the srm_ifce installation
-- For the time being switching OFF 'gfal' option
-- Could NOT find DCAP (missing:  DCAP_INCLUDE_DIR DCAP_LIBRARY)
-- dCap library not found. Set variable DCAP_DIR to point to your dCache installation
-- For the time being switching OFF 'dcache' option
-- Could NOT find LDAP (missing:  LDAP_INCLUDE_DIR LDAP_LIBRARY)
-- ldap library not found. Set variable LDAP_DIR to point to your ldap installation
-- For the time being switching OFF 'ldap' option
-- >>> Option 'chirp' not implemented yet! Signal your urgency to pere.mato@cern.ch
-- >>> Option 'glite' not implemented yet! Signal your urgency to pere.mato@cern.ch
-- >>> Option 'hdfs' not implemented yet! Signal your urgency to pere.mato@cern.ch
-- >>> Option 'pch' not implemented yet! Signal your urgency to pere.mato@cern.ch
-- >>> Option 'sapdb' not implemented yet! Signal your urgency to pere.mato@cern.ch
-- >>> Option 'srp' not implemented yet! Signal your urgency to pere.mato@cern.ch
-- Enabled support for:  asimage astiff builtin_afterimage builtin_ftgl builtin_freetype builtin_glew builtin_pcre builtin_zlib builtin_lzma cintex exceptions e
xplicitlink fortran genvector odbc opengl reflex shared thread tmva
-- Performing Test CXX_HAS_Wno_strict_aliasing
-- Performing Test CXX_HAS_Wno_strict_aliasing - Failed
-- Performing Test CXX_HAS_Wno_ignored_qualifiers
-- Performing Test CXX_HAS_Wno_ignored_qualifiers - Failed
-- Performing Test CXX_HAS_Wno_potentially_evaluated_expression
-- Performing Test CXX_HAS_Wno_potentially_evaluated_expression - Failed
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
ZLIB_LIBRARY (ADVANCED)
    linked by target "Core" in directory D:/root5.34.34_VS2013/root/core
    linked by target "Graf" in directory D:/root5.34.34_VS2013/root/graf2d/graf
    linked by target "Postscript" in directory D:/root5.34.34_VS2013/root/graf2d/postscript
    linked by target "ASImageGui" in directory D:/root5.34.34_VS2013/root/graf2d/asimage
    linked by target "ASImage" in directory D:/root5.34.34_VS2013/root/graf2d/asimage
    linked by target "FTGL" in directory D:/root5.34.34_VS2013/root/graf3d/ftgl

-- Configuring incomplete, errors occurred!
See also "D:/root5.34.34_VS2013/CMakeFiles/CMakeOutput.log".
See also "D:/root5.34.34_VS2013/CMakeFiles/CMakeError.log".

Thank you for your help!
Brian

Hi Brian,

I just tried with the head of v5-34-00-patches, and it looks fine:

[code]C:\Users\bellenot\build\temp>cmake -G"Visual Studio 12" …\git\v5-34-00-patch
es
– The C compiler identification is MSVC 18.0.40302.0
– The CXX compiler identification is MSVC 18.0.40302.0
– Check for working C compiler using: Visual Studio 12 2013
– Check for working C compiler using: Visual Studio 12 2013 – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working CXX compiler using: Visual Studio 12 2013
– Check for working CXX compiler using: Visual Studio 12 2013 – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
CMake Warning (dev) at cmake/modules/CheckCompiler.cmake:24 (if):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run “cmake --help-policy CMP0054” for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.

Quoted variables like “MSVC” will no longer be dereferenced when the policy
is set to NEW. Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
CMakeLists.txt:33 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

– CMAKE_BUILD_TYPE: RelWithDebInfo
– Performing Test CXX_HAS_Wno-array-bounds
– Performing Test CXX_HAS_Wno-array-bounds - Failed
– Performing Test CXX_HAS_Wno-strict-aliasing
– Performing Test CXX_HAS_Wno-strict-aliasing - Failed
– Looking for include file pthread.h
– Looking for include file pthread.h - not found
– Found Threads: TRUE
– Performing Test CXX_HAS_Wno_deprecated_declarations
– Performing Test CXX_HAS_Wno_deprecated_declarations - Failed
– ROOT Platform: win32
– ROOT Architecture: win32
– Build Type: RelWithDebInfo
– Compiler Flags: -nologo -IC:/Users/bellenot/git/v5-34-00-patches/build/win -F
Iw32pragma.h -FIsehmap.h -MD -GR -EHsc- -W3 -wd4244 -D_WIN32 /MP -O2 -Z7
– Looking for ZLib
– Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
– Zlib not found. Switching on builtin_zlib option
– Looking for Freetype
– Could NOT find Freetype (missing: FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS)
– FreeType not found. Switching on builtin_freetype option
– Looking for PCRE
– PCRE not found. Switching on builtin_pcre option
– Looking for LZMA
– LZMA not found. Switching on builtin_lzma option
– Building LZMA version 5.0.3 included in ROOT itself
– Could NOT find GIF (missing: GIF_LIBRARY GIF_INCLUDE_DIR)
– Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR)
– Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
– Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
– Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
– Looking for GSL
– Could NOT find GSL (missing: GSL_INCLUDE_DIR GSL_LIBRARY) (Required is at le
ast version “1.10”)
– GSL not found. Set variable GSL_DIR to point to your GSL installation
– Alternatively, you can also enable the option ‘builtin_gsl’ to
build the GSL libraries internally’
– For the time being switching OFF ‘mathmore’ option
– Looking for Python
– Found PythonInterp: C:/Python27/python.exe (found version “2.7.6”)
– Found Python interpreter version 2.7
– Found PythonLibs: C:/Python27/libs/python27.lib (found version “2.7.6”)
– Looking for GCCXML
– Looking for OpenGL
– Found OpenGL: opengl32
– Looking for Graphviz
– Could NOT find GRAPHVIZ (missing: GRAPHVIZ_INCLUDE_DIR GRAPHVIZ_cdt_LIBRARY
GRAPHVIZ_gvc_LIBRARY GRAPHVIZ_graph_LIBRARY GRAPHVIZ_pathplan_LIBRARY)
– Graphviz not found. Switching off gviz option
– Looking for Bonjour
– Checking whether Bonjour/Avahi is supported
– Bonjour not found. Switching off bonjour option
– Looking for Kerberos 5
– Could NOT find KRB5 (missing: KRB5_LIBRARY KRB5_INCLUDE_DIR)
– Kerberos 5 not found. Switching off krb5 option
– Looking for LibXml2
– Could NOT find LibXml2 (missing: LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
– LibXml2 not found. Switching off xml option
– Looking for OpenSSL
– Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the sys
tem variable OPENSSL_ROOT_DIR (missing: OPENSSL_LIBRARIES OPENSSL_INCLUDE_DIR)

– OpenSSL not found. Switching off ssl option
– Looking for Castor
– Castor not found. Switching off castor/rfio option
– Looking for MySQL
– Could NOT find MYSQL (missing: MYSQL_INCLUDE_DIR MYSQL_LIBRARIES)
– MySQL not found. Switching off mysql option
– Looking for Oracle
– Oracle not found.
– Oracle: You can specify includes: -DORACLE_PATH_INCLUDES=/usr/include/oracle/
10.2.0.3/client
– currently found includes:
– Oracle: You can specify libs: -DORACLE_PATH_LIB=/usr/lib/oracle/10.2.0.3/clie
nt/lib
– currently found libs: ORACLE_LIBRARY_OCCI-NOTFOUND;ORACLE_LIBRARY_CLNTSH-N
OTFOUND;ORACLE_LIBRARY_LNNZ-NOTFOUND
– Oracle not found. Switching off oracle option
– Looking for ODBC
– Looking for PostgreSQL
– Could NOT find PostgreSQL (missing: POSTGRESQL_INCLUDE_DIR POSTGRESQL_LIBRAR
IES)
– PostgreSQL not found. Switching off pgsql option
– Looking for SQLite
– Could NOT find Sqlite (missing: SQLITE_INCLUDE_DIR SQLITE_LIBRARIES)
– SQLite not found. Switching off sqlite option
– Looking for Pythia6
– Pythia6 not found. Switching off pythia6 option
– Looking for Pythia8
– Could NOT find Pythia8 (missing: PYTHIA8_INCLUDE_DIR PYTHIA8_LIBRARY)
– Pythia8 not found. Switching off pythia8 option
– Looking for FFTW3
– FFTW3 not found. Switching off fftw3 option
– Looking for CFITSIO
– Could NOT find CFITSIO (missing: CFITSIO_INCLUDE_DIR CFITSIO_LIBRARY)
– CFITSIO not found. You can enable the option ‘builtin_cfitsio’ to build the l
ibrary internally’
– For the time being switching off ‘fitsio’ option
– Support Shadow password not found. Switching off shadowpw option
– Alien API not found. Set variable ALIEN_DIR to point to your Alien installati
on
– For the time being switching OFF ‘alien’ option
– Monalisa not found. Set variable MONALISA_DIR to point to your Monalisa insta
llation
– For the time being switching OFF ‘monalisa’ option
– Looking for XROOTD
– XROOTD not found. Set environment variable XRDSYS to point to your XROOTD ins
tallation
– Alternatively, you can also enable the option ‘builtin_xroo
td’ to build XROOTD internally’
– For the time being switching OFF ‘xrootd’ option
– Could NOT find GFAL (missing: GFAL_INCLUDE_DIR SRM_IFCE_INCLUDE_DIR GFAL_LIB
RARIES)
– GFAL library not found. Set variable GFAL_DIR to point to your gfal installat
ion
and the variable SRM_IFCE_DIR to the srm_ifce installation

– For the time being switching OFF ‘gfal’ option
– Could NOT find DCAP (missing: DCAP_INCLUDE_DIR DCAP_LIBRARY)
– dCap library not found. Set variable DCAP_DIR to point to your dCache install
ation
– For the time being switching OFF ‘dcache’ option
– Could NOT find LDAP (missing: LDAP_INCLUDE_DIR LDAP_LIBRARY)
– ldap library not found. Set variable LDAP_DIR to point to your ldap installat
ion
– For the time being switching OFF ‘ldap’ option
– >>> Option ‘chirp’ not implemented yet! Signal your urgency to pere.mato@cern
.ch
– >>> Option ‘glite’ not implemented yet! Signal your urgency to pere.mato@cern
.ch
– >>> Option ‘hdfs’ not implemented yet! Signal your urgency to pere.mato@cern.
ch
– >>> Option ‘pch’ not implemented yet! Signal your urgency to pere.mato@cern.c
h
– >>> Option ‘sapdb’ not implemented yet! Signal your urgency to pere.mato@cern
.ch
– >>> Option ‘srp’ not implemented yet! Signal your urgency to pere.mato@cern.c
h
– Enabled support for: asimage astiff builtin_afterimage builtin_ftgl builtin_
freetype builtin_glew builtin_pcre builtin_zlib builtin_lzma cintex exceptions e
xplicitlink fortran genvector odbc opengl python reflex shared thread tmva vdt
– Performing Test CXX_HAS_Wno_strict_aliasing
– Performing Test CXX_HAS_Wno_strict_aliasing - Failed
– Performing Test CXX_HAS_Wno_ignored_qualifiers
– Performing Test CXX_HAS_Wno_ignored_qualifiers - Failed
– Performing Test CXX_HAS_Wno_potentially_evaluated_expression
– Performing Test CXX_HAS_Wno_potentially_evaluated_expression - Failed
– Configuring done
– Generating done
– Build files have been written to: C:/Users/bellenot/build/temp

C:\Users\bellenot\build\temp>cmake --version
cmake version 3.2.2[/code]
One difference is the version of CMake (3.2.2). But be careful, I know that some of the latest versions of CMake have problems too… :frowning:

Cheers, Bertrand.

Hi Bertrand,

That fixed it. cmake 3.2.2 allowed me to complete configuration and then build.
As you suggested I had also previously failed with a later version, cmake 3.4.3.

Thank you,
Brian