Commit 2d628481 authored by whitlocb's avatar whitlocb

Fix up HDF5 and VisIt builds for static.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@27585 18c085ea-50e0-402c-830e-de6fd14e8384
parent c63b16b1
#################################################################################################################
IF(VISIT_STATIC)
#/Users/bjw/Development/thirdparty_static/2.9.0/cmake/3.0.2/i386-apple-darwin12_gcc-4.2/bin/cmake
#################################################################################################################
#/Users/bjw/Development/thirdparty_static/2.10.0/cmake/3.0.2/i386-apple-darwin12_gcc-4.2/bin/cmake
##
## ./build_visit generated host.cmake
## created: Tue Oct 21 11:27:25 PDT 2014
......@@ -9,7 +11,7 @@ IF(VISIT_STATIC)
##
## Setup VISITHOME & VISITARCH variables.
##
SET(VISITHOME /Users/bjw/Development/thirdparty_static/2.9.0)
SET(VISITHOME /Users/bjw/Development/thirdparty_static/2.10.0)
SET(VISITARCH i386-apple-darwin12_gcc-4.2)
## Compiler flags.
......@@ -24,11 +26,6 @@ VISIT_OPTION_DEFAULT(VISIT_CXX_FLAGS "-Wall -fno-common -fexceptions" TYPE STRIN
##
VISIT_OPTION_DEFAULT(VISIT_THREAD OFF TYPE BOOL)
##
## VisIt Boost Option.
##
VISIT_OPTION_DEFAULT(VISIT_USE_BOOST ON TYPE BOOL)
##############################################################
##
## Database reader plugin support libraries
......@@ -71,6 +68,17 @@ VISIT_OPTION_DEFAULT(VISIT_MPICH_INSTALL ON)
VISIT_OPTION_DEFAULT(VISIT_MPI_COMPILER ${VISIT_MPICH_DIR}/bin/mpicc)
VISIT_OPTION_DEFAULT(VISIT_PARALLEL ON)
##
## BOOST
##
SETUP_APP_VERSION(BOOST 1_57_0)
VISIT_OPTION_DEFAULT(VISIT_BOOST_DIR ${VISITHOME}/boost/1_57_0/${VISITARCH})
##
## CFITSIO
##
VISIT_OPTION_DEFAULT(VISIT_CFITSIO_DIR ${VISITHOME}/cfitsio/3006/${VISITARCH})
##
## SZIP
##
......@@ -79,17 +87,52 @@ VISIT_OPTION_DEFAULT(VISIT_SZIP_DIR ${VISITHOME}/szip/2.1/${VISITARCH})
##
## HDF5
##
VISIT_OPTION_DEFAULT(VISIT_HDF5_DIR ${VISITHOME}/hdf5/1.8.7/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_HDF5_DIR ${VISITHOME}/hdf5/1.8.14/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_HDF5_LIBDEP ${VISITHOME}/szip/2.1/${VISITARCH}/lib sz /usr/lib z TYPE STRING)
##
## CGNS
##
VISIT_OPTION_DEFAULT(VISIT_CGNS_DIR ${VISITHOME}/cgns/3.2.1/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_CGNS_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP} TYPE STRING)
##
## GDAL
##
##VISIT_OPTION_DEFAULT(VISIT_GDAL_DIR ${VISITHOME}/gdal/1.10.0/${VISITARCH}) # unresolved iconv_open
##
## H5Part
##
VISIT_OPTION_DEFAULT(VISIT_H5PART_DIR ${VISITHOME}/h5part/1.6.6/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_H5PART_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP} TYPE STRING)
##
## NetCDF
##
VISIT_OPTION_DEFAULT(VISIT_NETCDF_DIR ${VISITHOME}/netcdf/4.1.1/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_NETCDF_LIBDEP HDF5_LIBRARY_DIR hdf5_hl HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP} TYPE STRING)
##
## MFEM
##
VISIT_OPTION_DEFAULT(VISIT_MFEM_DIR ${VISITHOME}/mfem/3.0.1/${VISITARCH})
##
## Silo
##
VISIT_OPTION_DEFAULT(VISIT_SILO_DIR ${VISITHOME}/silo/4.10.1/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_SILO_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP} TYPE STRING)
##
## Xdmf
##
VISIT_OPTION_DEFAULT(VISIT_XDMF_DIR ${VISITHOME}/Xdmf/2.1.1/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_XDMF_LIBDEP HDF5_LIBRARY_DIR hdf5 VTK_LIBRARY_DIRS vtklibxml2-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION} TYPE STRING)
#################################################################################################################
ELSE(VISIT_STATIC)
#################################################################################################################
#/Users/bjw/Development/thirdparty_shared/2.10.0/cmake/3.0.2/i386-apple-darwin12_gcc-4.2/bin/cmake
##
## ./build_visit generated host.cmake
......@@ -237,5 +280,6 @@ VISIT_OPTION_DEFAULT(VISIT_SILO_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP
##
VISIT_OPTION_DEFAULT(VISIT_XDMF_DIR ${VISITHOME}/Xdmf/2.1.1/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_XDMF_LIBDEP HDF5_LIBRARY_DIR hdf5 VTK_LIBRARY_DIRS vtklibxml2-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION} TYPE STRING)
#################################################################################################################
ENDIF(VISIT_STATIC)
#################################################################################################################
......@@ -152,27 +152,6 @@ diff -c cgnslib_3.2.1/src/configure.orig cgnslib_3.2.1/src/configure
! RAN_LIB="\$(STRIP) -x"
fi
fi
***************
*** 2490,2495 ****
--- 2490,2496 ----
if test "${with_zlib+set}" = set; then
withval="$with_zlib"
withzlib=$withval
+ ZLIBLIB=$withval
else
withzlib="no"
fi
***************
*** 2499,2504 ****
--- 2500,2506 ----
else
H5NEEDZLIB=1
if test -z "$withzlib" || test "$withzlib" = "yes"; then
+ ZLIBLIB=""
zlibdir=""
echo "$ac_t""yes" 1>&6
ac_safe=`echo "zlib.h" | sed 'y%./+-%__p_%'`
EOF
if [[ $? != 0 ]] ; then
......@@ -222,6 +201,7 @@ function apply_cgns_321_patch
if [[ "$OPSYS" == "Darwin" ]] ; then
info "Applying OS X patch . . ."
apply_cgns_321_darwin_patch
apply_cgns_321_zlib_patch
else
info "Applying patch . . ."
apply_cgns_321_zlib_patch
......@@ -291,38 +271,45 @@ function build_cgns
info "Configuring CGNS . . ."
cd $CGNS_BUILD_DIR || error "Can't cd to CGNS build dir."
info "Invoking command to configure CGNS"
# if [[ "$DO_STATIC_BUILD" == "yes" ]]; then
# cf_build_type=""
# else
# cf_build_type="--enable-shared=all"
# fi
LIBEXT=""
if [[ "$DO_STATIC_BUILD" == "yes" ]]; then
cf_build_type=""
LIBEXT="a"
else
cf_build_type="--enable-shared=all"
if [[ "$OPSYS" == "Darwin" ]] ; then
LIBEXT="dylib"
else
LIBEXT="so"
fi
fi
# optionally add HDF5 and szip to the configure.
H5ARGS=""
if [[ "$DO_HDF5" == "yes" ]] ; then
H5ARGS="--with-hdf5=$VISITDIR/hdf5/$HDF5_VERSION/$VISITARCH"
if [[ "$DO_SZIP" == "yes" ]] ; then
if [[ "$OPSYS" == "Darwin" ]] ; then
H5ARGS="$H5ARGS --with-szip=$VISITDIR/szip/$SZIP_VERSION/$VISITARCH/lib/libsz.dylib"
H5ARGS="$H5ARGS --with-szip=$VISITDIR/szip/$SZIP_VERSION/$VISITARCH/lib/libsz.$LIBEXT"
else
H5ARGS="$H5ARGS --with-szip=$VISITDIR/szip/$SZIP_VERSION/$VISITARCH/lib/libsz.so"
H5ARGS="$H5ARGS --with-szip=$VISITDIR/szip/$SZIP_VERSION/$VISITARCH/lib/libsz.$LIBEXT"
fi
fi
if [[ "$DO_ZLIB" == "yes" ]] ; then
if [[ "$OPSYS" == "Darwin" ]] ; then
H5ARGS="$H5ARGS --with-zlib=$VISITDIR/zlib/$ZLIB_VERSION/$VISITARCH/lib/libz.dylib"
H5ARGS="$H5ARGS --with-zlib=$VISITDIR/zlib/$ZLIB_VERSION/$VISITARCH/lib/libz.$LIBEXT"
else
H5ARGS="$H5ARGS --with-zlib=$VISITDIR/zlib/$ZLIB_VERSION/$VISITARCH/lib/libz.so"
H5ARGS="$H5ARGS --with-zlib=$VISITDIR/zlib/$ZLIB_VERSION/$VISITARCH/lib/libz.$LIBEXT"
fi
fi
fi
if [[ "$OPSYS" == "Darwin" ]] ; then
info " env CXX=\"$CXX_COMPILER\" CC=\"$C_COMPILER\" \
CFLAGS=\"$C_OPT_FLAGS\" CXXFLAGS=\"$CXX_OPT_FLAGS\" \
./configure --enable-64bit --enable-shared=all $H5ARGS --prefix=\"$VISITDIR/cgns/$CGNS_VERSION/$VISITARCH\""
./configure --enable-64bit ${cf_build_type} $H5ARGS --prefix=\"$VISITDIR/cgns/$CGNS_VERSION/$VISITARCH\""
env CXX="$CXX_COMPILER" CC="$C_COMPILER" \
CFLAGS="$CFLAGS $C_OPT_FLAGS" CXXFLAGS="$CXXFLAGS $CXX_OPT_FLAGS" \
./configure --enable-64bit --enable-shared=all $H5ARGS --prefix=\"$VISITDIR/cgns/$CGNS_VERSION/$VISITARCH\"
./configure --enable-64bit ${cf_build_type} $H5ARGS --prefix=\"$VISITDIR/cgns/$CGNS_VERSION/$VISITARCH\"
else
info " env CXX=\"$CXX_COMPILER\" CC=\"$C_COMPILER\" \
CFLAGS=\"$C_OPT_FLAGS\" CXXFLAGS=\"$CXX_OPT_FLAGS\" \
......
......@@ -200,6 +200,335 @@ EOF
return 0;
}
function apply_hdf5_1814_static_patch
{
info "Patching hdf5 for static build"
patch -p0 << \EOF
*** src/H5PL.c.orig 2015-10-23 11:51:35.000000000 -0700
--- src/H5PL.c 2015-10-23 11:56:48.000000000 -0700
***************
*** 159,165 ****
char *preload_path;
FUNC_ENTER_STATIC_NOERR
!
/* Retrieve pathnames from HDF5_PLUGIN_PRELOAD if the user sets it
* to tell the library to load plugin libraries without search.
*/
--- 159,165 ----
char *preload_path;
FUNC_ENTER_STATIC_NOERR
! #ifdef H5_SUPPORT_DYNAMIC_LOADING
/* Retrieve pathnames from HDF5_PLUGIN_PRELOAD if the user sets it
* to tell the library to load plugin libraries without search.
*/
***************
*** 168,174 ****
if(!HDstrcmp(preload_path, H5PL_NO_PLUGIN))
H5PL_no_plugin_g = TRUE;
} /* end if */
!
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5PL__init_interface() */
--- 168,174 ----
if(!HDstrcmp(preload_path, H5PL_NO_PLUGIN))
H5PL_no_plugin_g = TRUE;
} /* end if */
! #endif
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5PL__init_interface() */
***************
*** 193,201 ****
htri_t ret_value;
FUNC_ENTER_NOAPI(FAIL)
!
ret_value = (htri_t)H5PL_no_plugin_g;
!
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL_no_plugin() */
--- 193,201 ----
htri_t ret_value;
FUNC_ENTER_NOAPI(FAIL)
! #ifdef H5_SUPPORT_DYNAMIC_LOADING
ret_value = (htri_t)H5PL_no_plugin_g;
! #endif
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL_no_plugin() */
***************
*** 224,230 ****
int i = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
!
if(H5_interface_initialize_g) {
size_t u; /* Local index variable */
--- 224,230 ----
int i = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
! #ifdef H5_SUPPORT_DYNAMIC_LOADING
if(H5_interface_initialize_g) {
size_t u; /* Local index variable */
***************
*** 246,252 ****
H5_interface_initialize_g = 0;
i = 1;
} /* end if */
!
FUNC_LEAVE_NOAPI(i)
} /* end H5PL_term_interface() */
--- 246,252 ----
H5_interface_initialize_g = 0;
i = 1;
} /* end if */
! #endif
FUNC_LEAVE_NOAPI(i)
} /* end H5PL_term_interface() */
***************
*** 273,279 ****
const void *ret_value = NULL;
FUNC_ENTER_NOAPI(NULL)
!
/* Check for "no plugins" indicated" */
if(H5PL_no_plugin_g)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTLOAD, NULL, "required dynamically loaded plugin filter '%d' is not available", id)
--- 273,279 ----
const void *ret_value = NULL;
FUNC_ENTER_NOAPI(NULL)
! #ifdef H5_SUPPORT_DYNAMIC_LOADING
/* Check for "no plugins" indicated" */
if(H5PL_no_plugin_g)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTLOAD, NULL, "required dynamically loaded plugin filter '%d' is not available", id)
***************
*** 308,314 ****
/* Check if we found the plugin */
if(found)
ret_value = plugin_info;
!
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL_load() */
--- 308,314 ----
/* Check if we found the plugin */
if(found)
ret_value = plugin_info;
! #endif
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL_load() */
***************
*** 335,341 ****
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
!
/* Retrieve paths from HDF5_PLUGIN_PATH if the user sets it
* or from the default paths if it isn't set.
*/
--- 335,341 ----
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
! #ifdef H5_SUPPORT_DYNAMIC_LOADING
/* Retrieve paths from HDF5_PLUGIN_PATH if the user sets it
* or from the default paths if it isn't set.
*/
***************
*** 360,366 ****
} /* end while */
H5PL_path_found_g = TRUE;
!
done:
if(dl_path)
dl_path = (char *)H5MM_xfree(dl_path);
--- 360,366 ----
} /* end while */
H5PL_path_found_g = TRUE;
! #endif
done:
if(dl_path)
dl_path = (char *)H5MM_xfree(dl_path);
***************
*** 396,402 ****
htri_t ret_value = FALSE;
FUNC_ENTER_STATIC
!
/* Open the directory */
if(!(dirp = HDopendir(dir)))
HGOTO_ERROR(H5E_PLUGIN, H5E_OPENERROR, FAIL, "can't open directory")
--- 396,402 ----
htri_t ret_value = FALSE;
FUNC_ENTER_STATIC
! #ifdef H5_SUPPORT_DYNAMIC_LOADING
/* Open the directory */
if(!(dirp = HDopendir(dir)))
HGOTO_ERROR(H5E_PLUGIN, H5E_OPENERROR, FAIL, "can't open directory")
***************
*** 438,444 ****
pathname = (char *)H5MM_xfree(pathname);
} /* end if */
} /* end while */
!
done:
if(dirp)
if(HDclosedir(dirp) < 0)
--- 438,444 ----
pathname = (char *)H5MM_xfree(pathname);
} /* end if */
} /* end while */
! #endif
done:
if(dirp)
if(HDclosedir(dirp) < 0)
***************
*** 459,465 ****
htri_t ret_value = FALSE;
FUNC_ENTER_STATIC
!
/* Specify a file mask. *.* = We want everything! */
sprintf(service, "%s\\*.dll", dir);
if((hFind = FindFirstFile(service, &fdFile)) == INVALID_HANDLE_VALUE)
--- 459,465 ----
htri_t ret_value = FALSE;
FUNC_ENTER_STATIC
! #ifdef H5_SUPPORT_DYNAMIC_LOADING
/* Specify a file mask. *.* = We want everything! */
sprintf(service, "%s\\*.dll", dir);
if((hFind = FindFirstFile(service, &fdFile)) == INVALID_HANDLE_VALUE)
***************
*** 494,500 ****
pathname = (char *)H5MM_xfree(pathname);
} /* end if */
} while(FindNextFile(hFind, &fdFile)); /* Find the next file. */
!
done:
if(hFind)
FindClose(hFind);
--- 494,500 ----
pathname = (char *)H5MM_xfree(pathname);
} /* end if */
} while(FindNextFile(hFind, &fdFile)); /* Find the next file. */
! #endif
done:
if(hFind)
FindClose(hFind);
***************
*** 529,535 ****
htri_t ret_value = FALSE;
FUNC_ENTER_STATIC
!
/* There are different reasons why a library can't be open, e.g. wrong architecture.
* simply continue if we can't open it.
*/
--- 529,535 ----
htri_t ret_value = FALSE;
FUNC_ENTER_STATIC
! #ifdef H5_SUPPORT_DYNAMIC_LOADING
/* There are different reasons why a library can't be open, e.g. wrong architecture.
* simply continue if we can't open it.
*/
***************
*** 588,594 ****
HGOTO_ERROR(H5E_PLUGIN, H5E_CLOSEERROR, FAIL, "can't close dynamic library")
} /* end if */
} /* end else */
!
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__open() */
--- 588,594 ----
HGOTO_ERROR(H5E_PLUGIN, H5E_CLOSEERROR, FAIL, "can't close dynamic library")
} /* end if */
} /* end else */
! #endif
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__open() */
***************
*** 615,621 ****
htri_t ret_value = FALSE;
FUNC_ENTER_STATIC
!
/* Search in the table of already opened dynamic libraries */
if(H5PL_table_used_g > 0) {
size_t i;
--- 615,621 ----
htri_t ret_value = FALSE;
FUNC_ENTER_STATIC
! #ifdef H5_SUPPORT_DYNAMIC_LOADING
/* Search in the table of already opened dynamic libraries */
if(H5PL_table_used_g > 0) {
size_t i;
***************
*** 636,642 ****
} /* end if */
} /* end for */
} /* end if */
!
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__search_table() */
--- 636,642 ----
} /* end if */
} /* end for */
} /* end if */
! #endif
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__search_table() */
***************
*** 658,666 ****
H5PL__close(H5PL_HANDLE handle)
{
FUNC_ENTER_STATIC_NOERR
!
H5PL_CLOSE_LIB(handle);
!
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5PL__close() */
#endif /*H5_VMS*/
--- 658,666 ----
H5PL__close(H5PL_HANDLE handle)
{
FUNC_ENTER_STATIC_NOERR
! #ifdef H5_SUPPORT_DYNAMIC_LOADING
H5PL_CLOSE_LIB(handle);
! #endif
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5PL__close() */
#endif /*H5_VMS*/
EOF
if [[ $? != 0 ]] ; then
warn "HDF5 static patch failed."
return 1
fi
return 0;
}
function apply_hdf5_patch
{
if [[ "${HDF5_VERSION}" == 1.8.7 ]] ; then
......@@ -219,6 +548,16 @@ function apply_hdf5_patch
if [[ $? != 0 ]]; then
return 1
fi
else
# Latest HDF5.
# Apply a patch for static if we build statically.
if [[ "$DO_STATIC_BUILD" == "yes" ]] ; then
apply_hdf5_1814_static_patch
if [[ $? != 0 ]]; then
return 1
fi
fi
fi
fi
......
......@@ -94,15 +94,15 @@ function vulcan_build
ln -s svn_bin/build_visit .
ln -s svn_bin/bv_support .
# Create a version of build_visit_BGQ that replaces its "2.9.0" version string
# Create a version of build_visit_BGQ that replaces its "2.10.0" version string
# with the current version string.
#FIXME: sed svn_bin/build_visit_BGQ "s/VISIT_VERSION=\"2.9.0\"/VISIT_VERSION=\"$visitVer\"/g" > build_visit_BGQ
#FIXME: sed svn_bin/build_visit_BGQ "s/VISIT_VERSION=\"2.10.0\"/VISIT_VERSION=\"$visitVer\"/g" > build_visit_BGQ
cp svn_bin/build_visit_BGQ .
chmod 700 build_visit_BGQ
# Run the build_visit_BGQ script to build the code in the local tarball.
echo "Running build_visit_BGQ"
#./build_visit_BGQ --thirdparty-path /g/g17/whitlocb/build/thirdparty_static/2.9.0 --makeflags -j2
#./build_visit_BGQ --thirdparty-path /g/g17/whitlocb/build/thirdparty_static/2.10.0 --makeflags -j2
./build_visit_BGQ --thirdparty-path /usr/gapps/visit/thirdparty_static/$visitVer --makeflags -j2
# If a binary distribution was produced, copy it to the destDir.
......
......@@ -90,9 +90,9 @@ ELSE(VISIT_DBIO_ONLY OR VISIT_ENGINE_ONLY OR VISIT_SERVER_COMPONENTS_ONLY)
ADD_SUBDIRECTORY(add_visit_searchpath)
ENDIF(SILO_FOUND AND NOT WIN32)
ADD_SUBDIRECTORY(annotations)
IF(VISIT_BUILD_AVTEXAMPLES)
IF(VISIT_BUILD_AVTEXAMPLES AND NOT VISIT_STATIC)
ADD_SUBDIRECTORY(avtexamples)
ENDIF(VISIT_BUILD_AVTEXAMPLES)
ENDIF(VISIT_BUILD_AVTEXAMPLES AND NOT VISIT_STATIC)
ADD_SUBDIRECTORY(convert)
ADD_SUBDIRECTORY(embedviewer)
ADD_SUBDIRECTORY(imagetools)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment