Issues with Building 1.9.168 on Windows.

I have downloaded and have already built szip and zlib in alternate
directories. They are built as static libraries. I then use the special -D
options to define the lib and include files. When using the following
command:

D:\Data\Projects\VC++\hdf5-1.9.168\build>cmake -C cacheinit.cmake -G "Visual
Studio 11 Win64" ..
  -D"ZLIB_INCLUDE_DIR:PATH=D:\Data\Projects\VC++\zlib-1.2.8"

-D"ZLIB_LIBRARY:FILEPATH="D:\Data\Projects\VC++\zlib-1.2.8\contrib\vstudio\v
c11\x64\ZlibStatRelease\zlibstat.lib"
  -D"SZIP_INCLUDE_DIR:PATH=D:\Data\Projects\VC++\szip-2.1\src"

-D"SZIP_LIBRARY:FILEPATH=D:\Data\Projects\VC++\szip-2.1\windows\static\lib\x
64\Release\libszip.lib"

When I execute the above command, Cmake does it environment evaluation, and
then ends up with the messages below.

I don't want the make build to do the szip/zlib builds, they are already
done, I want the libs to be used which I've already manually built. And I
want HDF5 C and C++ libraries built as statically linked libraries. What
changes do I require to make that happen?

After the messages below, I have included the content of my cacheinit.cmake
file.

···

===========================================================
<< a bunch of lines cut from the listing, followed by... >>

-- Checking IF your system generates wrong code for log2 routine... no
-- Checking IF alignment restrictions are strictly enforced... yes
CMake Warning at CMakeFilters.cmake:46 (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.
Call Stack (most recent call first):
  CMakeLists.txt:692 (INCLUDE)

-- Found ZLIB:
D:/Data/Projects/VC++/zlib-1.2.8/contrib/vstudio/vc11/x64/ZlibStatRelease/zl
ibstat.lib -DSZIP_INCLUDE_DIR:PATH=D:/Data/Projects/VC
++/szip-2.1/src
-DSZIP_LIBRARY:FILEPATH=D:/Data/Projects/VC++/szip-2.1/windows/static/lib/x6
4/Release/libszip.lib (found version "1.2.8")
-- Filter ZLIB is ON
CMake Warning at CMakeFilters.cmake:90 (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.
Call Stack (most recent call first):
  CMakeLists.txt:692 (INCLUDE)

-- SZip was not found. Make sure SZIP_LIBRARY and SZIP_INCLUDE_DIR are set
or set the SZIP_INSTALL environment variable.
CMake Error at CMakeFilters.cmake:109 (MESSAGE):
  SZIP is Required for SZIP support in HDF5
Call Stack (most recent call first):
  CMakeLists.txt:692 (INCLUDE)

-- Configuring incomplete, errors occurred!
See also
"D:/Data/Projects/VC++/hdf5-1.9.168/build/CMakeFiles/CMakeOutput.log".
See also
"D:/Data/Projects/VC++/hdf5-1.9.168/build/CMakeFiles/CMakeError.log".

=====================================================

# This is the CMakeCache file.

########################
# EXTERNAL cache entries
########################

SET (BUILD_SHARED_LIBS OFF CACHE BOOL "Build Shared Libraries" FORCE)

SET (BUILD_TESTING OFF CACHE BOOL "Build HDF5 Unit Testing" FORCE)

SET (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)

SET (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build HDF5 C++ Library" FORCE)

SET (HDF5_BUILD_EXAMPLES OFF CACHE BOOL "Build HDF5 Library Examples" FORCE)

SET (HDF5_BUILD_FORTRAN OFF CACHE BOOL "Build FORTRAN support" FORCE)

SET (HDF5_ENABLE_F2003 OFF CACHE BOOL "Enable FORTRAN 2003 Standard" FORCE)

SET (HDF5_BUILD_HL_LIB OFF CACHE BOOL "Build HIGH Level HDF5 Library" FORCE)

SET (HDF5_BUILD_TOOLS ON CACHE BOOL "Build HDF5 Tools" FORCE)

SET (HDF5_BUILD_GENERATORS OFF CACHE BOOL "Build Test Generators" FORCE)

SET (HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE BOOL "Enable Zlib Filters" FORCE)

SET (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE)

SET (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)

SET (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory"
FORCE)

SET (HDF5_ENABLE_UNSUPPORTED OFF CACHE BOOL "Enable unsupported combinations
of configuration options" FORCE)

SET (HDF5_ENABLE_DEPRECATED_SYMBOLS OFF CACHE BOOL "Enable deprecated public
API symbols" FORCE)

SET (HDF5_ENABLE_DIRECT_VFD OFF CACHE BOOL "Build the Direct I/O Virtual
File Driver" FORCE)

SET (HDF5_ENABLE_PARALLEL OFF CACHE BOOL "Enable parallel build (requires
MPI)" FORCE)

SET (MPIEXEC_MAX_NUMPROCS "3" CACHE STRING "Minimum number of processes for
HDF parallel tests" FORCE)

SET (HDF5_BUILD_PARALLEL_ALL OFF CACHE BOOL "Build Parallel Programs" FORCE)

SET (HDF5_ENABLE_COVERAGE OFF CACHE BOOL "Enable code coverage for Libraries
and Programs" FORCE)

SET (HDF5_ENABLE_USING_MEMCHECKER OFF CACHE BOOL "Indicate that a memory
checker is used" FORCE)

SET (HDF5_DISABLE_COMPILER_WARNINGS OFF CACHE BOOL "Disable compiler
warnings" FORCE)

SET (HDF5_USE_FOLDERS ON CACHE BOOL "Enable folder grouping of projects in
IDEs." FORCE)

SET (HDF5_USE_16_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.6.x API by
default" FORCE)

SET (HDF5_USE_18_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.8.x API by
default" FORCE)

SET (HDF5_ENABLE_THREADSAFE OFF CACHE BOOL "(WINDOWS)Enable Threadsafety"
FORCE)

SET (HDF5_PACKAGE_EXTLIBS OFF CACHE BOOL "(WINDOWS)CPACK - include external
libraries" FORCE)

SET (HDF5_NO_PACKAGES ON CACHE BOOL "CPACK - Disable packaging" FORCE)

SET (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library
Building (NO SVN TGZ)" FORCE)
SET_PROPERTY(CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO SVN TGZ)

SET (ZLIB_SVN_URL "http://svn.hdfgroup.uiuc.edu/zlib/trunk" CACHE STRING
"Use ZLib from HDF repository" FORCE)

SET (SZIP_SVN_URL "http://svn.hdfgroup.uiuc.edu/szip/trunk" CACHE STRING
"Use SZip from HDF repository" FORCE)

SET (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed
file" FORCE)

SET (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed
file" FORCE)

SET (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)

SET (SZIP_PACKAGE_NAME "szip" CACHE STRING "Name of SZIP package" FORCE)

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Raymond,

   You have it almost correct! It found zlib but did not find szip (see the
**** lines and notice the difference). The libraries are first searched for a
CMake -built version before looking for the old-style versions. If it doesn't
find the CMake built it issues a warning, then does another find_package call
using the old find{lib}.cmake module included with CMake.

Double check the names of the lib and be sure they match the paths you
specified. Also double-check the find_package.cmake module for further clues.

Allen

···

On Tuesday, November 19, 2013 04:32:53 PM Raymond Burkholder wrote:

I have downloaded and have already built szip and zlib in alternate
directories. They are built as static libraries. I then use the special -D
options to define the lib and include files. When using the following
command:

D:\Data\Projects\VC++\hdf5-1.9.168\build>cmake -C cacheinit.cmake -G "Visual
Studio 11 Win64" ..
  -D"ZLIB_INCLUDE_DIR:PATH=D:\Data\Projects\VC++\zlib-1.2.8"

-D"ZLIB_LIBRARY:FILEPATH="D:\Data\Projects\VC++\zlib-1.2.8\contrib\vstudio\v
c11\x64\ZlibStatRelease\zlibstat.lib"
  -D"SZIP_INCLUDE_DIR:PATH=D:\Data\Projects\VC++\szip-2.1\src"

-D"SZIP_LIBRARY:FILEPATH=D:\Data\Projects\VC++\szip-2.1\windows\static\lib\x
64\Release\libszip.lib"

When I execute the above command, Cmake does it environment evaluation, and
then ends up with the messages below.

I don't want the make build to do the szip/zlib builds, they are already
done, I want the libs to be used which I've already manually built. And I
want HDF5 C and C++ libraries built as statically linked libraries. What
changes do I require to make that happen?

After the messages below, I have included the content of my cacheinit.cmake
file.

===========================================================
<< a bunch of lines cut from the listing, followed by... >>

-- Checking IF your system generates wrong code for log2 routine... no
-- Checking IF alignment restrictions are strictly enforced... yes
CMake Warning at CMakeFilters.cmake:46 (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.
Call Stack (most recent call first):
  CMakeLists.txt:692 (INCLUDE)

***************************************************

-- Found ZLIB:
D:/Data/Projects/VC++/zlib-1.2.8/contrib/vstudio/vc11/x64/ZlibStatRelease/zl
ibstat.lib -DSZIP_INCLUDE_DIR:PATH=D:/Data/Projects/VC
++/szip-2.1/src
-DSZIP_LIBRARY:FILEPATH=D:/Data/Projects/VC++/szip-2.1/windows/static/lib/x6
4/Release/libszip.lib (found version "1.2.8")
-- Filter ZLIB is ON

****************************************************

CMake Warning at CMakeFilters.cmake:90 (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.
Call Stack (most recent call first):
  CMakeLists.txt:692 (INCLUDE)

*****************************************************

-- SZip was not found. Make sure SZIP_LIBRARY and SZIP_INCLUDE_DIR are set
or set the SZIP_INSTALL environment variable.
CMake Error at CMakeFilters.cmake:109 (MESSAGE):
  SZIP is Required for SZIP support in HDF5
Call Stack (most recent call first):
  CMakeLists.txt:692 (INCLUDE)

*****************************************************

-- Configuring incomplete, errors occurred!
See also
"D:/Data/Projects/VC++/hdf5-1.9.168/build/CMakeFiles/CMakeOutput.log".
See also
"D:/Data/Projects/VC++/hdf5-1.9.168/build/CMakeFiles/CMakeError.log".

I noticed that the SZIP section is coded differently from the ZLIB section.
The SZIP section doesn't recognize the prebuilt library stuff. Is this a
feature or a bug?

In the SZIP section of CMakeFilters.cmake, I commented out a bunch of lines,
as listed. But now the build complains that there is a macro missing. The
coder for this section has some other dependencies and therefore decided to
not make use of the prebuilt binary, which the zip lib section does?

On the other hand, if I didn't have prebuilt SZIP, I still have problems
with SZIP being built automatically. What is the magic to make that happen
in a Windows Visual Studio environment?

=== The macro message:
Make Error: The following variables are used in this project, but they are
set to NOTFOUND.
lease set them or make sure they are set and tested correctly in the CMake
files:
ZIP_INCLUDE_DIR (ADVANCED)
  used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/src
  used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/src
  used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/src
  used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/c++/src
  used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/tools/lib
  used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/tools/h5diff
  used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/tools/h5ls
  used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/tools/misc
.....

=== The commented lines in CMakeFilters.cmake

···

#---------------------------------------------------------------------------
--
# Option for SzLib support
#---------------------------------------------------------------------------
--
OPTION (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF)
IF (HDF5_ENABLE_SZIP_SUPPORT)
  OPTION (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF)
# IF (NOT SZIP_USE_EXTERNAL)
# FIND_PACKAGE (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT})
# IF (NOT SZIP_FOUND)
# FIND_PACKAGE (SZIP) # Legacy find
# ENDIF (NOT SZIP_FOUND)
# ENDIF (NOT SZIP_USE_EXTERNAL)
# IF (SZIP_FOUND)
    SET (H5_HAVE_FILTER_SZIP 1)
    SET (H5_HAVE_SZLIB_H 1)
    SET (H5_HAVE_LIBSZ 1)
    SET (SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR})
    SET (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR})
# ELSE (SZIP_FOUND)
# IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR
HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
# EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE}
${HDF5_ENABLE_SZIP_ENCODING})
# SET (H5_HAVE_FILTER_SZIP 1)
# SET (H5_HAVE_SZLIB_H 1)
# SET (H5_HAVE_LIBSZ 1)
      MESSAGE (STATUS "Filter SZIP is built")
# ELSE (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR
HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
# MESSAGE (FATAL_ERROR "SZIP is Required for SZIP support in HDF5")
# ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR
HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
# ENDIF (SZIP_FOUND)
  SET (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES})
  INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIR})
  MESSAGE (STATUS "Filter SZIP is ON")
  IF (H5_HAVE_FILTER_SZIP)
    SET (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DECODE")
  ENDIF (H5_HAVE_FILTER_SZIP)
  IF (HDF5_ENABLE_SZIP_ENCODING)
    SET (H5_HAVE_SZIP_ENCODER 1)
    SET (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} ENCODE")
  ENDIF (HDF5_ENABLE_SZIP_ENCODING)
ENDIF (HDF5_ENABLE_SZIP_SUPPORT)

-----Original Message-----
From: Allen Byrne [mailto:byrn@hdfgroup.org]
Sent: Wednesday, November 20, 2013 10:34
To: hdf-forum@lists.hdfgroup.org
Cc: Raymond Burkholder
Subject: Re: [Hdf-forum] Issues with Building 1.9.168 on Windows.

Raymond,

   You have it almost correct! It found zlib but did not find szip (see the

**** lines and notice the difference). The libraries are first searched for
a
CMake -built version before looking for the old-style versions. If it
doesn't
find the CMake built it issues a warning, then does another find_package
call
using the old find{lib}.cmake module included with CMake.

Double check the names of the lib and be sure they match the paths you
specified. Also double-check the find_package.cmake module for further
clues.

Allen

On Tuesday, November 19, 2013 04:32:53 PM Raymond Burkholder wrote:

I have downloaded and have already built szip and zlib in alternate
directories. They are built as static libraries. I then use the special

-D

options to define the lib and include files. When using the following
command:

D:\Data\Projects\VC++\hdf5-1.9.168\build>cmake -C cacheinit.cmake -G

"Visual

Studio 11 Win64" ..
  -D"ZLIB_INCLUDE_DIR:PATH=D:\Data\Projects\VC++\zlib-1.2.8"

-D"ZLIB_LIBRARY:FILEPATH="D:\Data\Projects\VC++\zlib-1.2.8\contrib\vstudio\v

c11\x64\ZlibStatRelease\zlibstat.lib"
  -D"SZIP_INCLUDE_DIR:PATH=D:\Data\Projects\VC++\szip-2.1\src"

-D"SZIP_LIBRARY:FILEPATH=D:\Data\Projects\VC++\szip-2.1\windows\static\lib\x

64\Release\libszip.lib"

When I execute the above command, Cmake does it environment evaluation,

and

then ends up with the messages below.

I don't want the make build to do the szip/zlib builds, they are already
done, I want the libs to be used which I've already manually built. And I
want HDF5 C and C++ libraries built as statically linked libraries. What
changes do I require to make that happen?

After the messages below, I have included the content of my

cacheinit.cmake

file.

===========================================================
<< a bunch of lines cut from the listing, followed by... >>

-- Checking IF your system generates wrong code for log2 routine... no
-- Checking IF alignment restrictions are strictly enforced... yes
CMake Warning at CMakeFilters.cmake:46 (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.
Call Stack (most recent call first):
  CMakeLists.txt:692 (INCLUDE)

***************************************************

-- Found ZLIB:

D:/Data/Projects/VC++/zlib-1.2.8/contrib/vstudio/vc11/x64/ZlibStatRelease/zl

ibstat.lib -DSZIP_INCLUDE_DIR:PATH=D:/Data/Projects/VC
++/szip-2.1/src

-DSZIP_LIBRARY:FILEPATH=D:/Data/Projects/VC++/szip-2.1/windows/static/lib/x6

4/Release/libszip.lib (found version "1.2.8")
-- Filter ZLIB is ON

****************************************************

CMake Warning at CMakeFilters.cmake:90 (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.
Call Stack (most recent call first):
  CMakeLists.txt:692 (INCLUDE)

*****************************************************

-- SZip was not found. Make sure SZIP_LIBRARY and SZIP_INCLUDE_DIR are set
or set the SZIP_INSTALL environment variable.
CMake Error at CMakeFilters.cmake:109 (MESSAGE):
  SZIP is Required for SZIP support in HDF5
Call Stack (most recent call first):
  CMakeLists.txt:692 (INCLUDE)

*****************************************************

-- Configuring incomplete, errors occurred!
See also
"D:/Data/Projects/VC++/hdf5-1.9.168/build/CMakeFiles/CMakeOutput.log".
See also
"D:/Data/Projects/VC++/hdf5-1.9.168/build/CMakeFiles/CMakeError.log".

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Thank you for the file. Not quite there yet.

The changes in your file helped a bit, but I found that I couldn't put
H5_SZLIB_HEADER on the command line as a -D option, I had to put it into
the cacheinit.cmake file.

Following that, I found there is another set of errors, relating to one
missing define:
SZIP_INCLUDE_DIR (ADVANCED)

Do you know how to get that to work?

The SZIP related error messages:

···

============================

-- Filter SZIP is ON
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:
SZIP_INCLUDE_DIR (ADVANCED)
   used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/src
   used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/src
   used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/src
   used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/c++/src
   used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/tools/lib
   used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/tools/h5diff
   used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/tools/h5ls
   used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/tools/misc
   used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/tools/misc
   used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/tools/misc
   used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/tools/h5import
   used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/tools/h5repack
   used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/tools/h5jam
   used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/tools/h5jam
   used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/tools/h5jam
   used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/tools/h5jam
   used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/tools/h5copy
   used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/tools/h5stat
   used as include directory in directory
D:/Data/Projects/VC++/hdf5-1.9.168/tools/h5dump

-- Configuring incomplete, errors occurred!
See also
"D:/Data/Projects/VC++/hdf5-1.9.168/build/CMakeFiles/CMakeOutput.log".
See also
"D:/Data/Projects/VC++/hdf5-1.9.168/build/CMakeFiles/CMakeError.log".

-----Original Message-----
From: Allen Byrne [mailto:byrn@hdfgroup.org]
Sent: Friday, November 22, 2013 14:53
To: Raymond Burkholder
Subject: Re: [Hdf-forum] Issues with Building 1.9.168 on Windows.

Ray,

Try the attached replacement and let me know if it works like you expect.
There may be other places that might need to have code added.
The original writers of that feature only needed zlib support for using

hdf5

inside another cmake project.
I have not used hdf5 in that type of configuration although there is a

project

where it might be of use.
I was misled by your use of the lib,include folders being used in the

cmake

configure command. I had used that technique when building HDF5 as the
main
project.

Allen

On Friday, November 22, 2013 12:54:51 PM Raymond Burkholder wrote:
> I noticed that the SZIP section is coded differently from the ZLIB

section.

> The SZIP section doesn't recognize the prebuilt library stuff. Is this

a

> feature or a bug?
>
> In the SZIP section of CMakeFilters.cmake, I commented out a bunch of
lines,
> as listed. But now the build complains that there is a macro missing.

The

> coder for this section has some other dependencies and therefore decided
to
> not make use of the prebuilt binary, which the zip lib section does?
>
> On the other hand, if I didn't have prebuilt SZIP, I still have problems
> with SZIP being built automatically. What is the magic to make that

happen

> in a Windows Visual Studio environment?
>
> === The macro message:
> Make Error: The following variables are used in this project, but they

are

> set to NOTFOUND.
> lease set them or make sure they are set and tested correctly in the

CMake

> files:
> ZIP_INCLUDE_DIR (ADVANCED)
> used as include directory in directory
> D:/Data/Projects/VC++/hdf5-1.9.168/src
> used as include directory in directory
> D:/Data/Projects/VC++/hdf5-1.9.168/src
> used as include directory in directory
> D:/Data/Projects/VC++/hdf5-1.9.168/src
> used as include directory in directory
> D:/Data/Projects/VC++/hdf5-1.9.168/c++/src
> used as include directory in directory
> D:/Data/Projects/VC++/hdf5-1.9.168/tools/lib
> used as include directory in directory
> D:/Data/Projects/VC++/hdf5-1.9.168/tools/h5diff
> used as include directory in directory
> D:/Data/Projects/VC++/hdf5-1.9.168/tools/h5ls
> used as include directory in directory
> D:/Data/Projects/VC++/hdf5-1.9.168/tools/misc
> .....
>
> === The commented lines in CMakeFilters.cmake
>

#---------------------------------------------------------------------------

> --
> # Option for SzLib support
>

#---------------------------------------------------------------------------

> --
> OPTION (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF)
> IF (HDF5_ENABLE_SZIP_SUPPORT)
> OPTION (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF)
> # IF (NOT SZIP_USE_EXTERNAL)
> # FIND_PACKAGE (SZIP NAMES
${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT})
> # IF (NOT SZIP_FOUND)
> # FIND_PACKAGE (SZIP) # Legacy find
> # ENDIF (NOT SZIP_FOUND)
> # ENDIF (NOT SZIP_USE_EXTERNAL)
> # IF (SZIP_FOUND)
> SET (H5_HAVE_FILTER_SZIP 1)
> SET (H5_HAVE_SZLIB_H 1)
> SET (H5_HAVE_LIBSZ 1)
> SET (SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR})
> SET (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR})
> # ELSE (SZIP_FOUND)
> # IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR
> HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
> # EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT}
${LIB_TYPE}
> ${HDF5_ENABLE_SZIP_ENCODING})
> # SET (H5_HAVE_FILTER_SZIP 1)
> # SET (H5_HAVE_SZLIB_H 1)
> # SET (H5_HAVE_LIBSZ 1)
> MESSAGE (STATUS "Filter SZIP is built")
> # ELSE (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR
> HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
> # MESSAGE (FATAL_ERROR "SZIP is Required for SZIP support in HDF5")
> # ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR
> HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
> # ENDIF (SZIP_FOUND)
> SET (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES})
> INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIR})
> MESSAGE (STATUS "Filter SZIP is ON")
> IF (H5_HAVE_FILTER_SZIP)
> SET (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DECODE")
> ENDIF (H5_HAVE_FILTER_SZIP)
> IF (HDF5_ENABLE_SZIP_ENCODING)
> SET (H5_HAVE_SZIP_ENCODER 1)
> SET (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} ENCODE")
> ENDIF (HDF5_ENABLE_SZIP_ENCODING)
> ENDIF (HDF5_ENABLE_SZIP_SUPPORT)
>
> -----Original Message-----
> From: Allen Byrne [mailto:byrn@hdfgroup.org]
> Sent: Wednesday, November 20, 2013 10:34
> To: hdf-forum@lists.hdfgroup.org
> Cc: Raymond Burkholder
> Subject: Re: [Hdf-forum] Issues with Building 1.9.168 on Windows.
>
> Raymond,
>
> You have it almost correct! It found zlib but did not find szip (see

the

>
> **** lines and notice the difference). The libraries are first searched

for

> a
> CMake -built version before looking for the old-style versions. If it
> doesn't
> find the CMake built it issues a warning, then does another find_package
> call
> using the old find{lib}.cmake module included with CMake.
>
> Double check the names of the lib and be sure they match the paths you
> specified. Also double-check the find_package.cmake module for further
> clues.
>
> Allen
>
> On Tuesday, November 19, 2013 04:32:53 PM Raymond Burkholder wrote:
> > I have downloaded and have already built szip and zlib in alternate
> > directories. They are built as static libraries. I then use the

special

>
> -D
>
> > options to define the lib and include files. When using the following
> > command:
> >
> > D:\Data\Projects\VC++\hdf5-1.9.168\build>cmake -C cacheinit.cmake -G
>
> "Visual
>
> > Studio 11 Win64" ..
> >
> > -D"ZLIB_INCLUDE_DIR:PATH=D:\Data\Projects\VC++\zlib-1.2.8"
>
> -D"ZLIB_LIBRARY:FILEPATH="D:\Data\Projects\VC++\zlib-
1.2.8\contrib\vstudio\v
> > c11\x64\ZlibStatRelease\zlibstat.lib"
> >
> > -D"SZIP_INCLUDE_DIR:PATH=D:\Data\Projects\VC++\szip-2.1\src"
>
> -D"SZIP_LIBRARY:FILEPATH=D:\Data\Projects\VC++\szip-
2.1\windows\static\lib\x
> > 64\Release\libszip.lib"
> >
> > When I execute the above command, Cmake does it environment
evaluation,
>
> and
>
> > then ends up with the messages below.
> >
> > I don't want the make build to do the szip/zlib builds, they are

already

> > done, I want the libs to be used which I've already manually built.

And I

> > want HDF5 C and C++ libraries built as statically linked libraries.

What

> > changes do I require to make that happen?
> >
> > After the messages below, I have included the content of my
>
> cacheinit.cmake
>
> > file.
> >
> >

=
> > << a bunch of lines cut from the listing, followed by... >>
> >
> > -- Checking IF your system generates wrong code for log2 routine... no
> > -- Checking IF alignment restrictions are strictly enforced... yes
> >
> > CMake Warning at CMakeFilters.cmake:46 (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.
> >
> > Call Stack (most recent call first):
> > CMakeLists.txt:692 (INCLUDE)
>
> ***************************************************
>
> > -- Found ZLIB:
> D:/Data/Projects/VC++/zlib-
1.2.8/contrib/vstudio/vc11/x64/ZlibStatRelease/zl
> > ibstat.lib -DSZIP_INCLUDE_DIR:PATH=D:/Data/Projects/VC
> > ++/szip-2.1/src
>
> -DSZIP_LIBRARY:FILEPATH=D:/Data/Projects/VC++/szip-
2.1/windows/static/lib/x6
> > 4/Release/libszip.lib (found version "1.2.8")
> > -- Filter ZLIB is ON
>
> ****************************************************
>
> > CMake Warning at CMakeFilters.cmake:90 (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.
> >
> > Call Stack (most recent call first):
> > CMakeLists.txt:692 (INCLUDE)
>
> *****************************************************
>
> > -- SZip was not found. Make sure SZIP_LIBRARY and SZIP_INCLUDE_DIR
are set
> > or set the SZIP_INSTALL environment variable.
> >
> > CMake Error at CMakeFilters.cmake:109 (MESSAGE):
> > SZIP is Required for SZIP support in HDF5
> >
> > Call Stack (most recent call first):
> > CMakeLists.txt:692 (INCLUDE)
>
> *****************************************************
>
> > -- Configuring incomplete, errors occurred!
> > See also
> > "D:/Data/Projects/VC++/hdf5-
1.9.168/build/CMakeFiles/CMakeOutput.log".
> > See also
> > "D:/Data/Projects/VC++/hdf5-
1.9.168/build/CMakeFiles/CMakeError.log".

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2014.0.4158 / Virus Database: 3629/6854 - Release Date: 11/21/13

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.