Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix builds for macos 12.6 #18642

Closed
wants to merge 13 commits into from
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2346,7 +2346,7 @@ IF (NOT WIN32)
SET (CPACK_BUNDLE_PLIST "${VISIT_BINARY_DIR}/tools/dev/scripts/Info.plist")
SET (CPACK_BUNDLE_STARTUP_COMMAND "${VISIT_BINARY_DIR}/exe/visit_macos_launcher")
ELSE(APPLE AND VISIT_CREATE_APPBUNDLE_PACKAGE)
SET(CPACK_GENERATOR "TGZ")
SET(CPACK_GENERATOR "TXZ")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change leads to 100Mb smaller tarball on mac. Would assume similar savings on other platforms. If we could control flags to xz, we could improve that a bit more. We could do that if we used Python tools to tar and compress...as we do in the top level data dir.


SET(CPACK_PACKAGE_NAME "visit")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "VisIt ${VISIT_VERSION} is a parallel visualization and data analysis tool")
Expand Down
2 changes: 1 addition & 1 deletion src/tools/dev/masonry/bootstrap_visit.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def steps_untar(opts,ctx):
ctx.actions["src_copy_tar"] = shell(cmd="cp %s ." % opts["tarball"],
description="copy source tar",
working_dir=build_dir)
ctx.actions["src_untar"] = shell(cmd="tar -xzvf %s" % tar_base,
ctx.actions["src_untar"] = shell(cmd="tar -xvf %s" % tar_base,
description="untar source",
working_dir=build_dir)

Expand Down
4 changes: 3 additions & 1 deletion src/tools/dev/masonry/masonry.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,9 @@ def execute(self,base,key,tag,parent_res):
print("[removing existing temporary dmg file: {0}]".format(temp_dmg))
os.remove(temp_dmg)

cmd = "hdiutil create -srcFolder %s -o %s" % (src_folder, temp_dmg)
# ULMO format (xz) is 1/2 the size of default format (UDZO which is zlib level 1)
#cmd = "hdiutil create -srcFolder %s -o %s" % (src_folder, temp_dmg)
cmd = "hdiutil create -format ULMO -srcFolder %s -o %s" % (src_folder, temp_dmg)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change leads to 275Mb smaller .dmg file on mac


##########################################################################
# NOTE (cyrush) 2021-05-27
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{"bootstrap_visit":
{"version": "3.3.3",
"build_types": ["release"],
"branch": "3.3RC",
"arch": "darwin-x86_64",
"cert": "Developer ID Application: Lawrence Livermore National Laboratory (A827VH86QR)",
"entitlements": "/Users/miller86/visit/visit/33rc/src/tools/dev/masonry/opts/visit.entitlements",
"notarize": {"username":"miller86@llnl.gov",
"password":"@keychain:VisIt",
"asc_provider":"A827VH86QR",
"bundle_id":"gov.llnl.visit"},
"make_nthreads": 2,
"skip_checkout": "yes",
"git": {"mode":"ssh","git_uname":"markcmiller86"},
"build_visit": { "cmake_ver": "3.18.2",
"args":"--no-thirdparty",
"libs":["cmake",
"vtkm",
"ispc",
"embree",
"tbb",
"ospray",
"python",
"vtk",
"qt",
"qwt",
"boost",
"mpich",
"adios",
"advio",
"boxlib",
"blosc",
"cfitsio",
"cgns",
"conduit",
"fms",
"gdal",
"glu",
"h5part",
"hdf5",
"llvm",
"mfem",
"netcdf",
"pidx",
"silo",
"silex",
"szip",
"icet",
"mili",
"zlib",
"xdmf",
"uintah",
"moab"]}
}}
2 changes: 1 addition & 1 deletion src/tools/dev/scripts/bv_support/bv_advio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ function build_advio
fi
set -x
env CXX="$CXX_COMPILER" CC="$C_COMPILER" \
CFLAGS="$CFLAGS $C_OPT_FLAGS" CXXFLAGS="$CXXFLAGS $CXX_OPT_FLAGS" \
CFLAGS="$CFLAGS $C_OPT_FLAGS" CXXFLAGS="$CXXFLAGS $CXX_OPT_FLAGS -Wno-error=implicit-function-declaration" \
./configure --prefix="$VISITDIR/AdvIO/$ADVIO_VERSION/$VISITARCH" --disable-gtktest $ADVIO_DARWIN $ADVIO_DEBUG
set +x
if [[ $? != 0 ]] ; then
Expand Down
4 changes: 2 additions & 2 deletions src/tools/dev/scripts/bv_support/bv_gdal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ function build_gdal
fi
set -x
./configure CXX="$CXX_COMPILER" CC="$C_COMPILER" $EXTRA_FLAGS \
CFLAGS="$CFLAGS $C_OPT_FLAGS -DH5_USE_16_API" \
CXXFLAGS="$CXXFLAGS $CXX_OPT_FLAGS -DH5_USE_16_API" \
CFLAGS="$CFLAGS $C_OPT_FLAGS -DH5_USE_16_API -Wno-error=implicit-function-declaration" \
CXXFLAGS="$CXXFLAGS $CXX_OPT_FLAGS -DH5_USE_16_API -Wno-error=implicit-function-declaration" \
--prefix="$VISITDIR/gdal/$GDAL_VERSION/$VISITARCH" \
--with-libtiff=internal --with-gif=internal \
--with-png=internal --with-jpeg=internal \
Expand Down
44 changes: 41 additions & 3 deletions src/tools/dev/scripts/bv_support/bv_hdf5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,35 @@ EOF
return 0;
}

function apply_hdf5_resize_configs_are_equal_patch
{
info "Patching hdf5 1.8.14 for resize configs are equal"
patch -p0 << EOF
*** test/cache_common.h.orig 2014-10-13 04:33:37.000000000 -0700
--- test/cache_common.h 2023-04-11 20:25:27.000000000 -0700
*************** void check_and_validate_cache_size(hid_t
*** 697,702 ****
--- 697,707 ----
int32_t * cur_num_entries_ptr,
hbool_t dump_data);

+ hbool_t
+ resize_configs_are_equal(const H5C_auto_size_ctl_t *a,
+ const H5C_auto_size_ctl_t *b,
+ hbool_t compare_init);
+
void validate_mdc_config(hid_t file_id,
H5AC_cache_config_t * ext_config_ptr,
hbool_t compare_init,
EOF
if [[ $? != 0 ]] ; then
warn "HDF5 1.8.14 resize_configs_are_equal patch failed."
return 1
fi

return 0;
}

function apply_hdf5_patch
{
# Apply a patch for static if we build statically.
Expand All @@ -504,6 +533,11 @@ function apply_hdf5_patch
return 1
fi

apply_hdf5_resize_configs_are_equal_patch
if [[ $? != 0 ]]; then
return 1
fi

return 0
}

Expand Down Expand Up @@ -606,6 +640,7 @@ function build_hdf5

cf_build_parallel=""
cf_par_suffix=""
cf_extra_cflags=""
if [[ "$bt" == "serial" ]]; then
cf_build_parallel="--disable-parallel"
cf_c_compiler="$C_COMPILER"
Expand All @@ -618,14 +653,17 @@ function build_hdf5
cf_build_parallel="--enable-parallel"
cf_par_suffix="_mpi"
cf_c_compiler="$PAR_COMPILER"
if [[ "$OPSYS" == "Darwin" ]]; then
cf_extra_cflags="-Wno-error=implicit-function-declaration"
fi
fi

# In order to ensure $cf_fortranargs is expanded to build the arguments to
# configure, we wrap the invokation in 'sh -c "..."' syntax
info "Invoking command to configure $bt HDF5"
set -x
sh -c "../configure CC=\"$cf_c_compiler\" \
CFLAGS=\"$CFLAGS $C_OPT_FLAGS\" $cf_fortranargs \
CFLAGS=\"$CFLAGS $C_OPT_FLAGS ${cf_extra_cflags}\" $cf_fortranargs \
--prefix=\"$VISITDIR/hdf5${cf_par_suffix}/$HDF5_VERSION/$VISITARCH\" \
${cf_szip} ${cf_zlib} ${cf_build_type} ${cf_build_thread} \
${cf_build_parallel} ${extra_ac_flags} $build_mode"
Expand Down Expand Up @@ -661,8 +699,8 @@ function build_hdf5
fi

if [[ "$DO_GROUP" == "yes" ]] ; then
chmod -R ug+w,a+rX "$VISITDIR/hdf5"
chgrp -R ${GROUP} "$VISITDIR/hdf5"
chmod -R ug+w,a+rX "$VISITDIR/hdf5*"
chgrp -R ${GROUP} "$VISITDIR/hdf5*"
fi

popd
Expand Down
4 changes: 4 additions & 0 deletions src/tools/dev/scripts/bv_support/bv_main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,10 @@ function initialize_build_visit()
export MACOSX_DEPLOYMENT_TARGET=11.0
export C_COMPILER=${C_COMPILER:-"clang"}
export CXX_COMPILER=${CXX_COMPILER:-"clang++"}
elif [[ ${VER_MAJOR} == 21 ]] ; then
export MACOSX_DEPLOYMENT_TARGET=12.6
export C_COMPILER=${C_COMPILER:-"clang"}
export CXX_COMPILER=${CXX_COMPILER:-"clang++"}
else
export MACOSX_DEPLOYMENT_TARGET=10.14
export C_COMPILER=${C_COMPILER:-"clang"}
Expand Down
26 changes: 18 additions & 8 deletions src/tools/dev/scripts/bv_support/bv_mpich.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,23 @@ function bv_mpich_depends_on

function bv_mpich_info
{
export MPICH_VERSION=${MPICH_VERSION:-"3.3.1"}
export MPICH_FILE=${MPICH_FILE:-"mpich-${MPICH_VERSION}.tar.gz"}
export MPICH_COMPATIBILITY_VERSION=${MPICH_COMPATIBILITY_VERSION:-"3.3"}
export MPICH_BUILD_DIR=${MPICH_BUILD_DIR:-"mpich-${MPICH_VERSION}"}
export MPICH_URL=${MPICH_URL:-http://www.mpich.org/static/tarballs/${MPICH_VERSION}}
export MPICH_MD5_CHECKSUM="9ed4cabd3fb86525427454381b25f6af"
export MPICH_SHA256_CHECKSUM="fe551ef29c8eea8978f679484441ed8bb1d943f6ad25b63c235d4b9243d551e5"
if [[ "$OPSYS" == "Darwin" ]]; then
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating mpich with newer libtool involves quite a bit. No easy way to just patch it. So, I created a new third-party asset named mpich-3.3.1-libtool-2.4.6 which expands also to mpich-3.3.1 (honestly should be harmless if its used on non-macOS systems too).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit is needed for macOS 12.6. So I cherry picked it to #19293

markcmiller86 marked this conversation as resolved.
Show resolved Hide resolved
export MPICH_VERSION=${MPICH_VERSION:-"3.3.1-libtool-2.4.6"}
export MPICH_FILE=${MPICH_FILE:-"mpich-${MPICH_VERSION}.tar.gz"}
export MPICH_COMPATIBILITY_VERSION=${MPICH_COMPATIBILITY_VERSION:-"3.3"}
export MPICH_BUILD_DIR=${MPICH_BUILD_DIR:-"mpich-${MPICH_VERSION}"}
export MPICH_URL=${MPICH_URL:-https://media.githubusercontent.com/media/visit-dav/third-party/master/lib/}
export MPICH_MD5_CHECKSUM="e3a1e23be3efb8f4f041a7f8edf27455"
export MPICH_SHA256_CHECKSUM="899908c78df8e5c4caf076d27e4c83cd0e8b05e8526d8bda9e3bff0de0349f1a"
else
export MPICH_VERSION=${MPICH_VERSION:-"3.3.1"}
export MPICH_FILE=${MPICH_FILE:-"mpich-${MPICH_VERSION}.tar.gz"}
export MPICH_COMPATIBILITY_VERSION=${MPICH_COMPATIBILITY_VERSION:-"3.3"}
export MPICH_BUILD_DIR=${MPICH_BUILD_DIR:-"mpich-${MPICH_VERSION}"}
export MPICH_URL=${MPICH_URL:-http://www.mpich.org/static/tarballs/${MPICH_VERSION}}
export MPICH_MD5_CHECKSUM="9ed4cabd3fb86525427454381b25f6af"
export MPICH_SHA256_CHECKSUM="fe551ef29c8eea8978f679484441ed8bb1d943f6ad25b63c235d4b9243d551e5"
fi
}

function bv_mpich_print
Expand Down Expand Up @@ -106,7 +116,7 @@ function build_mpich
#
mpich_opts="--enable-shared"
if [[ "$OPSYS" == "Darwin" ]]; then
mpich_opts="${mpich_opts} --enable-two-level-namespace --enable-threads=single"
mpich_opts="${mpich_opts} --enable-two-level-namespace --enable-threads=single --enable-libxml2=no"
fi

#
Expand Down