Cmake build witk zlib errors

Hi HDF Group

I am having some trouble using the Cmake build to build the latest HDF5 in Windows

What I did:

1) created a folder inside the root distribution
2) opened a command prompt
3) typed

T:\hdf5-1.8.10-patch1\build>cmake .. -D"SZIP_INCLUDE_DIR:PATH=T:\szip\src" -D"SZIP_LIBRARY:FILEPATH=T:\szip\all\lib\Debug\szlib.lib" -D"ZLIB_INCLUDE_DIR:PATH=T:\zlib-1.2.3" -D"ZLIB
_LIBRARY:FILEPATH=T:\zlib-1.2.3\projects\visualc6\Win32_LIB_Debug\zlibd.lib"

after some messages, these warnings

-- Building for: Visual Studio 10
etc
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:
    SZIP_INCLUDE_DIR
    SZIP_LIBRARY
    ZLIB_INCLUDE_DIR
    ZLIB_LIBRARY
-- Build files have been written to: T:/hdf5-1.8.10-patch1/build

4) Opened the generated Visual Studio projects, that have a neat feature of all the HDF5 sublibraries (like H5A, H5D) having their own virtual folder (well done)
5) Build all
6) Compile errors because the zlib and szip headers were not found

2>..\..\src\H5Z.c(33): fatal error C1083: Cannot open include file: 'szlib.h': No such file or directory
2> H5Zdeflate.c
2>..\..\src\H5Zdeflate.c(35): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory

I followed the instructions on the file /release_docs/Cmake.txt

that says

cmake -C <sourcepath>/config/cmake/cacheinit.cmake -G "<generator>" [-D<options>] <sourcepath>
        <options> is:
            * SZIP_INCLUDE_DIR:PATH=<path to szip includes directory>
            * SZIP_LIBRARY:FILEPATH=<path to szip/library file>
            * ZLIB_INCLUDE_DIR:PATH=<path to zlib includes directory>
            * ZLIB_LIBRARY:FILEPATH=<path to zlib/library file>
            * <HDF5OPTION>:BOOL=[ON | OFF]

when doing

T:\hdf5-1.8.10-patch1\build>cmake -C ../config/cmake/cacheinit.cmake
loading initial cache file ../config/cmake/cacheinit.cmake

there was this error message

CMake Error: The source directory "T:/hdf5-1.8.10-patch1/config/cmake/cacheinit.cmake" is a file, not a directory.
Specify --help for usage, or press the help button on the CMake GUI.

Thank you in advance for any help on this

···

------
Pedro Vicente, Earth System Science
University of California, Irvine
http://www.ess.uci.edu/

Hi HDF Group

I am having some trouble using the Cmake build to build the latest HDF5 in
Windows

What I did:

...

I followed the instructions on the file /release_docs/Cmake.txt

that says

cmake -C <sourcepath>/config/cmake/cacheinit.cmake -G "<generator>"
[-D<options>] <sourcepath>
        <options> is:
            * SZIP_INCLUDE_DIR:PATH=<path to szip includes directory>
            * SZIP_LIBRARY:FILEPATH=<path to szip/library file>
            * ZLIB_INCLUDE_DIR:PATH=<path to zlib includes directory>
            * ZLIB_LIBRARY:FILEPATH=<path to zlib/library file>
            * <HDF5OPTION>:BOOL=[ON | OFF]

when doing

T:\hdf5-1.8.10-patch1\build>cmake -C ../config/cmake/cacheinit.cmake

add " ." ({space}{dot}) at end of command

···

On Friday, March 29, 2013 09:48:19 AM Pedro Vicente wrote:

loading initial cache file ../config/cmake/cacheinit.cmake

there was this error message

CMake Error: The source directory
"T:/hdf5-1.8.10-patch1/config/cmake/cacheinit.cmake" is a file, not a
directory.
Specify --help for usage, or press the help button on the CMake GUI.

Thank you in advance for any help on this

------
Pedro Vicente, Earth System Science
University of California, Irvine
http://www.ess.uci.edu/

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Hi Allen

when doing

T:\hdf5-1.8.10-patch1\build>cmake -C ../config/cmake/cacheinit.cmake

add " ." ({space}{dot}) at end of command

ah, I missed that dot
I guess you actually mean 2 dots (folder beneath), since when I did one dot I get an error

my build path is

T:\hdf5-1.8.10-patch1\build

anyway , I did

T:\hdf5-1.8.10-patch1\build>cmake -C ../config/cmake/cacheinit.cmake .. -D"SZIP_INCLUDE_DIR:PATH=T:\szip\src" -D"SZIP_LIBRARY:FILEPATH=T:\szip\all\lib\Debug\szlib.lib" -D"ZLIB_INCL
UDE_DIR:PATH=T:\zlib-1.2.3" -D"ZLIB_LIBRARY:FILEPATH=T:\zlib-1.2.3\projects\visualc6\Win32_LIB_Debug\zlibd.lib" > out.txt

where the zlib and szip are my own szip and zlib locations

I get errors and warnings
It seems that

1) my zlib and szip locations are not detected
2) it complains that I don't have the Fortran compiler (I don't) and gives an error because of this

this seems like a bug in the Cmake build maybe?

the relevant messages are:

loading initial cache file ../config/cmake/cacheinit.cmake
CMake Warning at CMakeLists.txt:562 (FIND_PACKAGE):
  Could not find a package configuration file provided by "ZLIB" with any of
  the following names:

    zlibConfig.cmake
    zlib-config.cmake

  Add the installation prefix of "ZLIB" to CMAKE_PREFIX_PATH or set
  "ZLIB_DIR" to a directory containing one of the above files. If "ZLIB"
  provides a separate development package or SDK, be sure it has been
  installed.

CMake Warning at CMakeLists.txt:606 (FIND_PACKAGE):
  Could not find a package configuration file provided by "SZIP" with any of
  the following names:

    szipConfig.cmake
    szip-config.cmake

  Add the installation prefix of "SZIP" to CMAKE_PREFIX_PATH or set
  "SZIP_DIR" to a directory containing one of the above files. If "SZIP"
  provides a separate development package or SDK, be sure it has been
  installed.

CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestFortranCompiler.cmake:54 (message):
  The Fortran compiler "ifort" is not able to compile a simple test program.

  It fails with the following output:

   Change Dir: T:/hdf5-1.8.10-patch1/build/CMakeFiles/CMakeTmp

T:\hdf5-1.8.10-patch1\build\CMakeFiles\CMakeTmp\cmTryCompileExec4230441850.vfproj'
  cannot be opened because its project type (.vfproj) is not supported by
  this version of the application.

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  config/cmake/HDF5UseFortran.cmake:5 (ENABLE_LANGUAGE)
  CMakeLists.txt:752 (INCLUDE)

-- Checking IF alignment restrictions are strictly enforced... yes
-- Found ZLIB: T:/zlib-1.2.3/projects/visualc6/Win32_LIB_Debug/zlibd.lib (found version "1.2.3")
-- Filter ZLIB is ON
-- Looking for SZIP_BUILT_AS_DYNAMIC_LIB
-- Looking for SZIP_BUILT_AS_DYNAMIC_LIB - not found
-- Filter SZIP is ON
-- Check for working Fortran compiler using: Visual Studio 10
-- Check for working Fortran compiler using: Visual Studio 10 -- broken
-- Configuring incomplete, errors occurred!

···

------
Pedro Vicente, Earth System Science
University of California, Irvine
http://www.ess.uci.edu/

----- Original Message ----- From: "Allen D Byrne" <byrn@hdfgroup.org>
To: <hdf-forum@hdfgroup.org>
Cc: <help@hdfgroup.org>
Sent: Friday, March 29, 2013 11:40 AM
Subject: Re: [Hdf-forum] Cmake build witk zlib errors

On Friday, March 29, 2013 09:48:19 AM Pedro Vicente wrote:

Hi HDF Group

I am having some trouble using the Cmake build to build the latest HDF5 in
Windows

What I did:

...

I followed the instructions on the file /release_docs/Cmake.txt

that says

cmake -C <sourcepath>/config/cmake/cacheinit.cmake -G "<generator>"
[-D<options>] <sourcepath>
        <options> is:
            * SZIP_INCLUDE_DIR:PATH=<path to szip includes directory>
            * SZIP_LIBRARY:FILEPATH=<path to szip/library file>
            * ZLIB_INCLUDE_DIR:PATH=<path to zlib includes directory>
            * ZLIB_LIBRARY:FILEPATH=<path to zlib/library file>
            * <HDF5OPTION>:BOOL=[ON | OFF]

when doing

T:\hdf5-1.8.10-patch1\build>cmake -C ../config/cmake/cacheinit.cmake

add " ." ({space}{dot}) at end of command

loading initial cache file ../config/cmake/cacheinit.cmake

there was this error message

CMake Error: The source directory
"T:/hdf5-1.8.10-patch1/config/cmake/cacheinit.cmake" is a file, not a
directory.
Specify --help for usage, or press the help button on the CMake GUI.

Thank you in advance for any help on this

------
Pedro Vicente, Earth System Science
University of California, Irvine
http://www.ess.uci.edu/

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Did you try configuring with a clean build directory?

···

On Mar 30, 2013, at 12:05 PM, Pedro Vicente wrote:

Hi Allen

when doing

T:\hdf5-1.8.10-patch1\build>cmake -C ../config/cmake/cacheinit.cmake

add " ." ({space}{dot}) at end of command

ah, I missed that dot
I guess you actually mean 2 dots (folder beneath), since when I did one dot I get an error

my build path is

T:\hdf5-1.8.10-patch1\build

anyway , I did

T:\hdf5-1.8.10-patch1\build>cmake -C ../config/cmake/cacheinit.cmake .. -D"SZIP_INCLUDE_DIR:PATH=T:\szip\src" -D"SZIP_LIBRARY:FILEPATH=T:\szip\all\lib\Debug\szlib.lib" -D"ZLIB_INCL
UDE_DIR:PATH=T:\zlib-1.2.3" -D"ZLIB_LIBRARY:FILEPATH=T:\zlib-1.2.3\projects\visualc6\Win32_LIB_Debug\zlibd.lib" > out.txt

where the zlib and szip are my own szip and zlib locations

I get errors and warnings
It seems that

1) my zlib and szip locations are not detected
2) it complains that I don't have the Fortran compiler (I don't) and gives an error because of this

this seems like a bug in the Cmake build maybe?

the relevant messages are:

loading initial cache file ../config/cmake/cacheinit.cmake
CMake Warning at CMakeLists.txt:562 (FIND_PACKAGE):
Could not find a package configuration file provided by "ZLIB" with any of
the following names:

  zlibConfig.cmake
  zlib-config.cmake

Add the installation prefix of "ZLIB" to CMAKE_PREFIX_PATH or set
"ZLIB_DIR" to a directory containing one of the above files. If "ZLIB"
provides a separate development package or SDK, be sure it has been
installed.

CMake Warning at CMakeLists.txt:606 (FIND_PACKAGE):
Could not find a package configuration file provided by "SZIP" with any of
the following names:

  szipConfig.cmake
  szip-config.cmake

Add the installation prefix of "SZIP" to CMAKE_PREFIX_PATH or set
"SZIP_DIR" to a directory containing one of the above files. If "SZIP"
provides a separate development package or SDK, be sure it has been
installed.

CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestFortranCompiler.cmake:54 (message):
The Fortran compiler "ifort" is not able to compile a simple test program.

It fails with the following output:

Change Dir: T:/hdf5-1.8.10-patch1/build/CMakeFiles/CMakeTmp

T:\hdf5-1.8.10-patch1\build\CMakeFiles\CMakeTmp\cmTryCompileExec4230441850.vfproj'
cannot be opened because its project type (.vfproj) is not supported by
this version of the application.

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
config/cmake/HDF5UseFortran.cmake:5 (ENABLE_LANGUAGE)
CMakeLists.txt:752 (INCLUDE)

-- Checking IF alignment restrictions are strictly enforced... yes
-- Found ZLIB: T:/zlib-1.2.3/projects/visualc6/Win32_LIB_Debug/zlibd.lib (found version "1.2.3")
-- Filter ZLIB is ON
-- Looking for SZIP_BUILT_AS_DYNAMIC_LIB
-- Looking for SZIP_BUILT_AS_DYNAMIC_LIB - not found
-- Filter SZIP is ON
-- Check for working Fortran compiler using: Visual Studio 10
-- Check for working Fortran compiler using: Visual Studio 10 -- broken
-- Configuring incomplete, errors occurred!

------
Pedro Vicente, Earth System Science
University of California, Irvine
http://www.ess.uci.edu/

----- Original Message ----- From: "Allen D Byrne" <byrn@hdfgroup.org>
To: <hdf-forum@hdfgroup.org>
Cc: <help@hdfgroup.org>
Sent: Friday, March 29, 2013 11:40 AM
Subject: Re: [Hdf-forum] Cmake build witk zlib errors

On Friday, March 29, 2013 09:48:19 AM Pedro Vicente wrote:

Hi HDF Group

I am having some trouble using the Cmake build to build the latest HDF5 in
Windows

What I did:

...

I followed the instructions on the file /release_docs/Cmake.txt

that says

cmake -C <sourcepath>/config/cmake/cacheinit.cmake -G "<generator>"
[-D<options>] <sourcepath>
       <options> is:
           * SZIP_INCLUDE_DIR:PATH=<path to szip includes directory>
           * SZIP_LIBRARY:FILEPATH=<path to szip/library file>
           * ZLIB_INCLUDE_DIR:PATH=<path to zlib includes directory>
           * ZLIB_LIBRARY:FILEPATH=<path to zlib/library file>
           * <HDF5OPTION>:BOOL=[ON | OFF]

when doing

T:\hdf5-1.8.10-patch1\build>cmake -C ../config/cmake/cacheinit.cmake

add " ." ({space}{dot}) at end of command

loading initial cache file ../config/cmake/cacheinit.cmake

there was this error message

CMake Error: The source directory
"T:/hdf5-1.8.10-patch1/config/cmake/cacheinit.cmake" is a file, not a
directory.
Specify --help for usage, or press the help button on the CMake GUI.

Thank you in advance for any help on this

------
Pedro Vicente, Earth System Science
University of California, Irvine
http://www.ess.uci.edu/

___________________________________________________________
Mike Jackson Principal Software Engineer
BlueQuartz Software Dayton, Ohio
mike.jackson@bluequartz.net www.bluequartz.net

Yes two dots.
When using the supplied cacheinit.cmake file, you must alter the default
settings, create your own default settings file, or not use the file and just
define your settings on the command line.

Allen

···

On Saturday, March 30, 2013 09:05:17 AM Pedro Vicente wrote:

Hi Allen

>> when doing
>>
>> T:\hdf5-1.8.10-patch1\build>cmake -C ../config/cmake/cacheinit.cmake
>
> add " ." ({space}{dot}) at end of command

ah, I missed that dot
I guess you actually mean 2 dots (folder beneath), since when I did one dot
I get an error

my build path is

T:\hdf5-1.8.10-patch1\build

anyway , I did

T:\hdf5-1.8.10-patch1\build>cmake -C ../config/cmake/cacheinit.cmake
.. -D"SZIP_INCLUDE_DIR:PATH=T:\szip\src"
-D"SZIP_LIBRARY:FILEPATH=T:\szip\all\lib\Debug\szlib.lib" -D"ZLIB_INCL
UDE_DIR:PATH=T:\zlib-1.2.3"
-D"ZLIB_LIBRARY:FILEPATH=T:\zlib-1.2.3\projects\visualc6\Win32_LIB_Debug\zl
ibd.lib"
> out.txt

where the zlib and szip are my own szip and zlib locations

I get errors and warnings
It seems that

1) my zlib and szip locations are not detected
2) it complains that I don't have the Fortran compiler (I don't) and gives
an error because of this

this seems like a bug in the Cmake build maybe?

the relevant messages are:

loading initial cache file ../config/cmake/cacheinit.cmake
CMake Warning at CMakeLists.txt:562 (FIND_PACKAGE):
  Could not find a package configuration file provided by "ZLIB" with any of
the following names:

    zlibConfig.cmake
    zlib-config.cmake

  Add the installation prefix of "ZLIB" to CMAKE_PREFIX_PATH or set
  "ZLIB_DIR" to a directory containing one of the above files. If "ZLIB"
  provides a separate development package or SDK, be sure it has been
  installed.

CMake Warning at CMakeLists.txt:606 (FIND_PACKAGE):
  Could not find a package configuration file provided by "SZIP" with any of
the following names:

    szipConfig.cmake
    szip-config.cmake

  Add the installation prefix of "SZIP" to CMAKE_PREFIX_PATH or set
  "SZIP_DIR" to a directory containing one of the above files. If "SZIP"
  provides a separate development package or SDK, be sure it has been
  installed.

CMake Error at C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/CMakeTestFortranCompiler.cmake:54 (message):
  The Fortran compiler "ifort" is not able to compile a simple test program.

  It fails with the following output:

   Change Dir: T:/hdf5-1.8.10-patch1/build/CMakeFiles/CMakeTmp

T:\hdf5-1.8.10-patch1\build\CMakeFiles\CMakeTmp\cmTryCompileExec4230441850.v
fproj' cannot be opened because its project type (.vfproj) is not supported
by this version of the application.

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  config/cmake/HDF5UseFortran.cmake:5 (ENABLE_LANGUAGE)
  CMakeLists.txt:752 (INCLUDE)

-- Checking IF alignment restrictions are strictly enforced... yes
-- Found ZLIB: T:/zlib-1.2.3/projects/visualc6/Win32_LIB_Debug/zlibd.lib
(found version "1.2.3")
-- Filter ZLIB is ON
-- Looking for SZIP_BUILT_AS_DYNAMIC_LIB
-- Looking for SZIP_BUILT_AS_DYNAMIC_LIB - not found
-- Filter SZIP is ON
-- Check for working Fortran compiler using: Visual Studio 10
-- Check for working Fortran compiler using: Visual Studio 10 -- broken
-- Configuring incomplete, errors occurred!

------
Pedro Vicente, Earth System Science
University of California, Irvine
http://www.ess.uci.edu/

----- Original Message -----
From: "Allen D Byrne" <byrn@hdfgroup.org>
To: <hdf-forum@hdfgroup.org>
Cc: <help@hdfgroup.org>
Sent: Friday, March 29, 2013 11:40 AM
Subject: Re: [Hdf-forum] Cmake build witk zlib errors

> On Friday, March 29, 2013 09:48:19 AM Pedro Vicente wrote:
>> Hi HDF Group
>>
>> I am having some trouble using the Cmake build to build the latest HDF5
>> in
>> Windows
>
>> What I did:
> ...
>
>> I followed the instructions on the file /release_docs/Cmake.txt
>>
>> that says
>>
>> cmake -C <sourcepath>/config/cmake/cacheinit.cmake -G "<generator>"
>>
>> [-D<options>] <sourcepath>
>>
>> <options> is:
>> * SZIP_INCLUDE_DIR:PATH=<path to szip includes directory>
>> * SZIP_LIBRARY:FILEPATH=<path to szip/library file>
>> * ZLIB_INCLUDE_DIR:PATH=<path to zlib includes directory>
>> * ZLIB_LIBRARY:FILEPATH=<path to zlib/library file>
>> * <HDF5OPTION>:BOOL=[ON | OFF]
>>
>> when doing
>>
>> T:\hdf5-1.8.10-patch1\build>cmake -C ../config/cmake/cacheinit.cmake
>
> add " ." ({space}{dot}) at end of command
>
>> loading initial cache file ../config/cmake/cacheinit.cmake
>>
>> there was this error message
>>
>> CMake Error: The source directory
>> "T:/hdf5-1.8.10-patch1/config/cmake/cacheinit.cmake" is a file, not a
>> directory.
>> Specify --help for usage, or press the help button on the CMake GUI.
>>
>>
>>
>> Thank you in advance for any help on this
>>
>>
>>
>> ------
>> Pedro Vicente, Earth System Science
>> University of California, Irvine
>> http://www.ess.uci.edu/
>>
>>
>> _______________________________________________
>> Hdf-forum is for HDF software users discussion.
>> Hdf-forum@hdfgroup.org
>> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
>
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> Hdf-forum@hdfgroup.org
> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org