From e920ed863ba55860583a08b1ee9ec49d9bb57884 Mon Sep 17 00:00:00 2001 From: "Mark C. Miller" Date: Thu, 5 Dec 2024 13:22:20 -0800 Subject: [PATCH 01/18] add arm64 build --- .../mb-3.4.2-darwin-23-arm64-release.json | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 src/tools/dev/masonry/opts/mb-3.4.2-darwin-23-arm64-release.json diff --git a/src/tools/dev/masonry/opts/mb-3.4.2-darwin-23-arm64-release.json b/src/tools/dev/masonry/opts/mb-3.4.2-darwin-23-arm64-release.json new file mode 100644 index 00000000000..30c0db36276 --- /dev/null +++ b/src/tools/dev/masonry/opts/mb-3.4.2-darwin-23-arm64-release.json @@ -0,0 +1,49 @@ +{"bootstrap_visit": + {"version": "3.4.2", + "build_types": ["release"], + "branch": "3.4RC", + "arch": "darwin-arm64", + "cert": "Developer ID Application: Lawrence Livermore National Laboratory (A827VH86QR)", + "entitlements": "/Users/miller86/visit/visit/34rc/src/tools/dev/masonry/opts/visit.entitlements", + "notarize": {"username":"miller86@llnl.gov", + "password":"VisIt", + "asc_provider":"A827VH86QR", + "bundle_id":"gov.llnl.visit"}, + "make_nthreads": 8, + "skip_checkout": "yes", + "git": {"mode":"ssh","git_uname":"markcmiller86"}, + "cmake_extra_opts" : "-DCMAKE_VERBOSE_MAKEFILE=ON", + "build_visit": { "cmake_ver": "3.24.3", + "args":"--no-thirdparty", + "libs":["cmake", + "vtkm", + "python", + "vtk", + "qt6", + "qwt", + "boost", + "mpich", + "adios", + "blosc2", + "adios2", + "advio", + "boxlib", + "cfitsio", + "conduit", + "gdal", + "fms", + "h5part", + "hdf5", + "cgns", + "netcdf", + "mfem", + "ospray", + "silo", + "szip", + "icet", + "mili", + "zlib", + "xdmf", + "uintah", + "moab"]} +}} From 48ae350322374529f85676c457653e96399f120e Mon Sep 17 00:00:00 2001 From: "Mark C. Miller" Date: Thu, 5 Dec 2024 13:23:31 -0800 Subject: [PATCH 02/18] fix patching logic --- src/tools/dev/scripts/bv_support/bv_qt6.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tools/dev/scripts/bv_support/bv_qt6.sh b/src/tools/dev/scripts/bv_support/bv_qt6.sh index 4a77bf8db84..5fbab744cf9 100644 --- a/src/tools/dev/scripts/bv_support/bv_qt6.sh +++ b/src/tools/dev/scripts/bv_support/bv_qt6.sh @@ -247,10 +247,10 @@ function qt6_macos_14_xcode_15_patch info "Patching qt 6 for macOS xcode 15 with toolchain fix" patch -p0 < Date: Thu, 5 Dec 2024 15:52:41 -0800 Subject: [PATCH 03/18] fix patch --- src/tools/dev/scripts/bv_support/bv_qt6.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/tools/dev/scripts/bv_support/bv_qt6.sh b/src/tools/dev/scripts/bv_support/bv_qt6.sh index 5fbab744cf9..7376a0765f6 100644 --- a/src/tools/dev/scripts/bv_support/bv_qt6.sh +++ b/src/tools/dev/scripts/bv_support/bv_qt6.sh @@ -246,7 +246,7 @@ function qt6_macos_14_xcode_15_patch { info "Patching qt 6 for macOS xcode 15 with toolchain fix" - patch -p0 < Date: Fri, 6 Dec 2024 10:48:08 -0800 Subject: [PATCH 04/18] fix compilation on arm64 --- src/tools/dev/scripts/bv_support/bv_adios.sh | 5 +++++ src/tools/dev/scripts/bv_support/bv_advio.sh | 9 +++++++++ src/tools/dev/scripts/bv_support/bv_hdf5.sh | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/src/tools/dev/scripts/bv_support/bv_adios.sh b/src/tools/dev/scripts/bv_support/bv_adios.sh index 4caef9c854a..6ba386b2380 100644 --- a/src/tools/dev/scripts/bv_support/bv_adios.sh +++ b/src/tools/dev/scripts/bv_support/bv_adios.sh @@ -310,6 +310,11 @@ function build_adios WITH_BLOSC_ARGS="--without-blosc" fi + # Fix compilation error on newer Darwin + if [[ "$OPSYS" == "Darwin" && $(uname -r | cut -d'.' -f1) -ge 23 ]]; then + sed -i '' 's/^libparse_test_query_xml_a_LIBADD/#libparse_test_query_xml_a_LIBADD/' tests/C/query/common/Makefile.in + fi + set -x sh -c "./configure ${OPTIONAL} CXX=\"$CXX_COMPILER\" CC=\"$C_COMPILER\" \ CFLAGS=\"$CFLAGS $C_OPT_FLAGS $WITH_MPI_INC\" \ diff --git a/src/tools/dev/scripts/bv_support/bv_advio.sh b/src/tools/dev/scripts/bv_support/bv_advio.sh index d299f3a7846..135c47b7aff 100644 --- a/src/tools/dev/scripts/bv_support/bv_advio.sh +++ b/src/tools/dev/scripts/bv_support/bv_advio.sh @@ -71,6 +71,15 @@ function apply_advio_12_darwin_patch patch -p0 << \EOF --- AdvIO-1.2/configure 2006-02-14 05:19:56.000000000 -0800 +++ AdvIO-1.2/configure.new 2024-02-09 16:28:49.000000000 -0800 +@@ -1003,7 +1003,7 @@ + #line 1004 "configure" + #include "confdefs.h" + +-main(){return(0);} ++int main(){return(0);} + EOF + if { (eval echo configure:1009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes @@ -1897,11 +1897,12 @@ #line 1898 "configure" #include "confdefs.h" diff --git a/src/tools/dev/scripts/bv_support/bv_hdf5.sh b/src/tools/dev/scripts/bv_support/bv_hdf5.sh index 80d89779305..d833f1c6e0a 100644 --- a/src/tools/dev/scripts/bv_support/bv_hdf5.sh +++ b/src/tools/dev/scripts/bv_support/bv_hdf5.sh @@ -539,6 +539,13 @@ function build_hdf5 fi fi + # + # Fix a test failing to compile + # + if [[ "$OPSYS" == "Darwin" && $(uname -r | cut -d'.' -f1) -ge 23 ]]; then + sed -i '' 's/{NULL}};/{0}};/' test/tmisc.c + fi + # # Configure HDF5 # From f25e9e722d00d7d3f144991d7bf7aa6598b51d9b Mon Sep 17 00:00:00 2001 From: "Mark C. Miller" Date: Fri, 6 Dec 2024 10:59:44 -0800 Subject: [PATCH 05/18] fix compilation on arm64 --- src/tools/dev/scripts/bv_support/bv_cfitsio.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/tools/dev/scripts/bv_support/bv_cfitsio.sh b/src/tools/dev/scripts/bv_support/bv_cfitsio.sh index a2e496e5672..7320c7157c1 100644 --- a/src/tools/dev/scripts/bv_support/bv_cfitsio.sh +++ b/src/tools/dev/scripts/bv_support/bv_cfitsio.sh @@ -140,6 +140,13 @@ function build_cfitsio info "Configuring CFITSIO . . ." cd $CFITSIO_BUILD_DIR || error "Can't cd to cfits IO build dir." + # + # Fix an issue with configure + # + if [[ "$OPSYS" == "Darwin" && $(uname -r | cut -d'.' -f1) -ge 23 ]]; then + sed -i '' 's/^main(){return(0);}/int main(){return(0);}/' configure + fi + C_OPT_FLAGS="-Wno-error=implicit-function-declaration" set -x env CXX="$CXX_COMPILER" CC="$C_COMPILER" \ From 92daee41a142d316e7f35e52f9fdd50d76bef5fa Mon Sep 17 00:00:00 2001 From: "Mark C. Miller" Date: Fri, 6 Dec 2024 13:39:50 -0800 Subject: [PATCH 06/18] fix netcdf on arm64 --- src/tools/dev/scripts/bv_support/bv_netcdf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/dev/scripts/bv_support/bv_netcdf.sh b/src/tools/dev/scripts/bv_support/bv_netcdf.sh index d8f442caa46..8605a89dff8 100644 --- a/src/tools/dev/scripts/bv_support/bv_netcdf.sh +++ b/src/tools/dev/scripts/bv_support/bv_netcdf.sh @@ -422,7 +422,7 @@ function build_netcdf return 1 fi - if [[ -n "$(uname -rs | grep 'Darwin 21')" ]] ; then + if [[ "$OPSYS" == "Darwin" ]] ; then # there is an include file on newer macOS #include which case-clashes # with any file living in a dir that is -I included on the compilation line mv -f VERSION VERSION.orig From fb5d62a9e140b6df0ae2eaef2ef77682dee222c6 Mon Sep 17 00:00:00 2001 From: "Mark C. Miller" Date: Fri, 6 Dec 2024 13:40:35 -0800 Subject: [PATCH 07/18] unify \EOF --- src/tools/dev/scripts/bv_support/bv_hdf5.sh | 4 +-- src/tools/dev/scripts/bv_support/bv_netcdf.sh | 2 +- src/tools/dev/scripts/bv_support/bv_qt.sh | 34 +++++++++---------- src/tools/dev/scripts/bv_support/bv_qt6.sh | 6 ++-- src/tools/dev/scripts/bv_support/bv_silo.sh | 2 +- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/tools/dev/scripts/bv_support/bv_hdf5.sh b/src/tools/dev/scripts/bv_support/bv_hdf5.sh index 80d89779305..1521f9aa8e2 100644 --- a/src/tools/dev/scripts/bv_support/bv_hdf5.sh +++ b/src/tools/dev/scripts/bv_support/bv_hdf5.sh @@ -137,7 +137,7 @@ function bv_hdf5_ensure function apply_hdf5_1814_static_patch { info "Patching hdf5 1.8.14 for static build" - patch -p0 << EOF + 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 *************** @@ -467,7 +467,7 @@ EOF function apply_hdf5_1814_isatty_patch { info "Patching hdf5 1.8.14 for isatty" - patch -p0 << EOF + patch -p0 << \EOF --- hl/src/H5LTanalyze.c.orig 2014-11-07 04:53:42.000000000 -0800 +++ hl/src/H5LTanalyze.c 2021-02-01 13:40:36.000000000 -0800 @@ -40,6 +40,7 @@ diff --git a/src/tools/dev/scripts/bv_support/bv_netcdf.sh b/src/tools/dev/scripts/bv_support/bv_netcdf.sh index d8f442caa46..00e0d18cbab 100644 --- a/src/tools/dev/scripts/bv_support/bv_netcdf.sh +++ b/src/tools/dev/scripts/bv_support/bv_netcdf.sh @@ -422,7 +422,7 @@ function build_netcdf return 1 fi - if [[ -n "$(uname -rs | grep 'Darwin 21')" ]] ; then + if [[ -n "$(uname -rs | grep 'Darwin')" ]] ; then # there is an include file on newer macOS #include which case-clashes # with any file living in a dir that is -I included on the compilation line mv -f VERSION VERSION.orig diff --git a/src/tools/dev/scripts/bv_support/bv_qt.sh b/src/tools/dev/scripts/bv_support/bv_qt.sh index 683027469bf..121ab2d8dfe 100644 --- a/src/tools/dev/scripts/bv_support/bv_qt.sh +++ b/src/tools/dev/scripts/bv_support/bv_qt.sh @@ -326,7 +326,7 @@ function apply_qt_patch function apply_qt_5101_linux_mesagl_patch { info "Patching qt 5.10.1 for Linux and Mesa-as-GL" - patch -p0 < Date: Fri, 6 Dec 2024 13:44:41 -0800 Subject: [PATCH 08/18] add x86_64 build --- .../mb-3.4.2-darwin-22-x86_64-release.json | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 src/tools/dev/masonry/opts/mb-3.4.2-darwin-22-x86_64-release.json diff --git a/src/tools/dev/masonry/opts/mb-3.4.2-darwin-22-x86_64-release.json b/src/tools/dev/masonry/opts/mb-3.4.2-darwin-22-x86_64-release.json new file mode 100644 index 00000000000..f70cca7c3b8 --- /dev/null +++ b/src/tools/dev/masonry/opts/mb-3.4.2-darwin-22-x86_64-release.json @@ -0,0 +1,49 @@ +{"bootstrap_visit": + {"version": "3.4.2", + "build_types": ["release"], + "branch": "3.4RC", + "arch": "darwin-x86_64", + "cert": "Developer ID Application: Lawrence Livermore National Laboratory (A827VH86QR)", + "entitlements": "/Users/miller86/visit/visit/34rc/src/tools/dev/masonry/opts/visit.entitlements", + "notarize": {"username":"miller86@llnl.gov", + "password":"VisIt", + "asc_provider":"A827VH86QR", + "bundle_id":"gov.llnl.visit"}, + "make_nthreads": 8, + "skip_checkout": "yes", + "git": {"mode":"ssh","git_uname":"markcmiller86"}, + "cmake_extra_opts" : "-DCMAKE_VERBOSE_MAKEFILE=ON", + "build_visit": { "cmake_ver": "3.24.3", + "args":"--no-thirdparty", + "libs":["cmake", + "vtkm", + "python", + "vtk", + "qt6", + "qwt", + "boost", + "mpich", + "adios", + "blosc2", + "adios2", + "advio", + "boxlib", + "cfitsio", + "conduit", + "gdal", + "fms", + "h5part", + "hdf5", + "cgns", + "netcdf", + "mfem", + "ospray", + "silo", + "szip", + "icet", + "mili", + "zlib", + "xdmf", + "uintah", + "moab"]} +}} From 805b960a9df9529cef1b04aff9c60764540437b3 Mon Sep 17 00:00:00 2001 From: "Mark C. Miller" Date: Wed, 11 Dec 2024 09:25:23 -0800 Subject: [PATCH 09/18] macOS x86_64 build fixes --- src/tools/dev/scripts/bv_support/bv_ospray.sh | 52 +++++++++++++++---- src/tools/dev/scripts/bv_support/bv_python.sh | 6 +-- 2 files changed, 44 insertions(+), 14 deletions(-) diff --git a/src/tools/dev/scripts/bv_support/bv_ospray.sh b/src/tools/dev/scripts/bv_support/bv_ospray.sh index 27230c93350..2249c1183ee 100644 --- a/src/tools/dev/scripts/bv_support/bv_ospray.sh +++ b/src/tools/dev/scripts/bv_support/bv_ospray.sh @@ -81,14 +81,30 @@ function bv_ospray_info { # versions if [[ "$DO_VTK9" == "yes" ]]; then - export OSPRAY_VERSION=${OSPRAY_VERSION:-"3.0.0"} - export OSPRAY_FILE=${OSPRAY_FILE:-"ospray-${OSPRAY_VERSION}.tar.gz"} - export OSPRAY_SRC_DIR=${OSPRAY_SRC_DIR:-"${OSPRAY_FILE%.tar*}"} - export OSPRAY_BUILD_DIR=${OSPRAY_BUILD_DIR:-"${OSPRAY_SRC_DIR}-build"} - export OSPRAY_SHA256_CHECKSUM="d8d8e632d77171c810c0f38f8d5c8387470ca19b75f5b80ad4d3d12007280288" - export OSPRAY_LIBS_FILE=${OSPRAY_LIBS_FILE:-"ospray-libs-${OSPRAY_VERSION}.tar.gz"} - export OSPRAY_LIBS_DIR=${OSPRAY_LIBS_DIR:-"${OSPRAY_LIBS_FILE%.tar*}"} - export OSPRAY_LIBS_SHA256_CHECKSUM="8ab33df7ea88d7eb3b9170fc3b6342e77cd105d9549db8bce31cddd5a0336f2f" + if [[ "$OPSYS" == "Darwin" ]]; then + export OSPRAY_VERSION=${OSPRAY_VERSION:-"3.2.0"} + if [[ "$(uname -m)" == "x86_64" ]]; then + #https://github.com/ospray/OSPRay/releases/download/v3.2.0/ospray-3.2.0.x86_64.macosx.zip + export OSPRAY_FILE=${OSPRAY_FILE:-"ospray-${OSPRAY_VERSION}.x86_64.macosx.zip"} + export OSPRAY_SHA256_CHECKSUM="073587a9fe4f985086e8d1e1c4749860ae81259e4806fe9475792e7864fe0e9c" + elif [[ "$(uname -m)" == "arm64" ]]; then + #https://github.com/ospray/OSPRay/releases/download/v3.2.0/ospray-3.2.0.arm64.macosx.zip + export OSPRAY_FILE=${OSPRAY_FILE:-"ospray-${OSPRAY_VERSION}.arm64.macosx.zip"} + export OSPRAY_SHA256_CHECKSUM="adcaf17e4ed4e98d707a49b07e6ad833029ccff24f45ce3ae33c73254f1ca6a7" + fi + # This isn't really a "source" dir because its pre-built binaries we're dealing with + export OSPRAY_SRC_DIR=${OSPRAY_SRC_DIR:-"${OSPRAY_FILE%.zip*}"} + export OSPRAY_BUILD_DIR=${OSPRAY_BUILD_DIR:-"${OSPRAY_SRC_DIR}-build"} + else + export OSPRAY_VERSION=${OSPRAY_VERSION:-"3.0.0"} + export OSPRAY_FILE=${OSPRAY_FILE:-"ospray-${OSPRAY_VERSION}.tar.gz"} + export OSPRAY_SRC_DIR=${OSPRAY_SRC_DIR:-"${OSPRAY_FILE%.tar*}"} + export OSPRAY_BUILD_DIR=${OSPRAY_BUILD_DIR:-"${OSPRAY_SRC_DIR}-build"} + export OSPRAY_SHA256_CHECKSUM="d8d8e632d77171c810c0f38f8d5c8387470ca19b75f5b80ad4d3d12007280288" + export OSPRAY_LIBS_FILE=${OSPRAY_LIBS_FILE:-"ospray-libs-${OSPRAY_VERSION}.tar.gz"} + export OSPRAY_LIBS_DIR=${OSPRAY_LIBS_DIR:-"${OSPRAY_LIBS_FILE%.tar*}"} + export OSPRAY_LIBS_SHA256_CHECKSUM="8ab33df7ea88d7eb3b9170fc3b6342e77cd105d9549db8bce31cddd5a0336f2f" + fi else export OSPRAY_VERSION=${OSPRAY_VERSION:-"1.6.1"} export OSPRAY_VISIT_MODULE_VERSION=${OSPRAY_VISIT_MODULE_VERSION:-"1.6.x"} @@ -110,7 +126,6 @@ function bv_ospray_print if [[ "$DO_VTK9" == "yes" ]]; then print "%s%s\n" "OSPRAY_FILE=" "${OSPRAY_FILE}" print "%s%s\n" "OSPRAY_VERSION=" "${OSPRAY_VERSION}" - print "%s%s\n" "OSPRAY_COMPATIBILITY_VERSION=" "${OSPRAY_COMPATIBILITY_VERSION}" print "%s%s\n" "OSPRAY_SRC_DIR=" "${OSPRAY_SRC_DIR}" print "%s%s\n" "OSPRAY_BUILD_DIR=" "${OSPRAY_BUILD_DIR}" else @@ -168,8 +183,10 @@ function bv_ospray_ensure { if [[ "$DO_OSPRAY" == "yes" && "$USE_SYSTEM_OSPRAY" == "no" ]]; then if [[ "$DO_VTK9" == "yes" ]]; then - download_file ${OSPRAY_LIBS_FILE} - ensure_built_or_ready "ospray" $OSPRAY_VERSION $OSPRAY_BUILD_DIR $OSPRAY_FILE $OSPRAY_URL + if [[ "$OPSYS" != "Darwin" ]]; then + download_file ${OSPRAY_LIBS_FILE} + fi + ensure_built_or_ready "ospray" $OSPRAY_VERSION $OSPRAY_BUILD_DIR $OSPRAY_FILE $OSPRAY_URL if [[ $? != 0 ]] ; then ANY_ERRORS="yes" DO_OSPRAY="no" @@ -311,6 +328,19 @@ function build_ospray return 1 fi + if [[ "$OPSYS" == "Darwin" ]]; then + # The above "untar" operation produced the pre-built binaries we need. + # Just install them now. + pushd $OSPRAY_SRC_DIR 1>/dev/null 2>&1 + find . -name '*.dylib' -exec xattr -d com.apple.quarantine {} \; + find . -name '*.dylib' -exec codesign --remove-signature {} \; + mkdir -p ${OSPRAY_INSTALL_DIR} + cp -R include lib ${OSPRAY_INSTALL_DIR}/. + info "Installed OSPRay from pre-built binaries. . . " + popd 1>/dev/null 2>&1 + return 0 + fi + # # Make a build directory for an out-of-source build. # diff --git a/src/tools/dev/scripts/bv_support/bv_python.sh b/src/tools/dev/scripts/bv_support/bv_python.sh index 90650a16454..d17d6f1f361 100644 --- a/src/tools/dev/scripts/bv_support/bv_python.sh +++ b/src/tools/dev/scripts/bv_support/bv_python.sh @@ -65,8 +65,8 @@ function install_py_module pushd ${MOD_DIR} > /dev/null info "Installing ${MOD_NAME} ..." - echo ${PYTHON_COMMAND} -m pip --no-cache-dir --disable-pip-version-check install --no-index --no-deps --no-build-isolation . - ${PYTHON_COMMAND} -m pip --no-cache-dir --disable-pip-version-check install --no-index --no-deps --no-build-isolation . + echo ${PYTHON_COMMAND} -m pip --no-cache-dir --disable-pip-version-check install --no-index --no-deps --no-build-isolation --no-binary :all: . + ${PYTHON_COMMAND} -m pip --no-cache-dir --disable-pip-version-check install --no-index --no-deps --no-build-isolation --no-binary :all: . if test $? -ne 0 ; then popd > /dev/null @@ -696,7 +696,7 @@ function build_pillow CC=${C_COMPILER} CXX=${CXX_COMPILER} CFLAGS="${PYEXT_CFLAGS}" \ CXXFLAGS="${PYEXT_CXXFLAGS}" \ LDFLAGS="${PYEXT_LDFLAGS}" \ - ${PYTHON_COMMAND} ./setup.py build_ext --disable-webp --disable-webpmux --disable-freetype --disable-lcms --disable-tiff --disable-xcb --disable-jpeg2000 --disable-jpeg install --prefix="${PYHOME}" + ${PYTHON_COMMAND} ./setup.py build_ext --disable-webp --disable-webpmux --disable-freetype --disable-lcms --disable-tiff --disable-xcb --disable-jpeg2000 --disable-jpeg install --prefix="${PYHOME} --single-version-externally-managed --record record.txt" set +x if test $? -ne 0 ; then From 638e873bfe9d6a8bc457e3d51fa13f4a68a85f2e Mon Sep 17 00:00:00 2001 From: "Mark C. Miller" Date: Wed, 11 Dec 2024 15:45:53 -0800 Subject: [PATCH 10/18] fix ospray for arm64 --- src/tools/dev/scripts/bv_support/bv_ospray.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/tools/dev/scripts/bv_support/bv_ospray.sh b/src/tools/dev/scripts/bv_support/bv_ospray.sh index 2249c1183ee..fec2e0c09be 100644 --- a/src/tools/dev/scripts/bv_support/bv_ospray.sh +++ b/src/tools/dev/scripts/bv_support/bv_ospray.sh @@ -158,7 +158,11 @@ function bv_ospray_host_profile if [[ "$USE_SYSTEM_OSPRAY" == "no" ]]; then echo "SETUP_APP_VERSION(OSPRAY ${OSPRAY_VERSION})" >> $HOSTCONF if [[ "$DO_VTK9" == "yes" ]]; then - echo "VISIT_OPTION_DEFAULT(VISIT_OSPRAY_DIR \${VISITHOME}/ospray/\${OSPRAY_VERSION}/\${VISITARCH}/ospray)" >> $HOSTCONF + if [[ "$OPSYS" == "Darwin" ]]; then + echo "VISIT_OPTION_DEFAULT(VISIT_OSPRAY_DIR \${VISITHOME}/ospray/\${OSPRAY_VERSION}/\${VISITARCH})" >> $HOSTCONF + else + echo "VISIT_OPTION_DEFAULT(VISIT_OSPRAY_DIR \${VISITHOME}/ospray/\${OSPRAY_VERSION}/\${VISITARCH}/ospray)" >> $HOSTCONF + fi else echo "VISIT_OPTION_DEFAULT(VISIT_OSPRAY ON TYPE BOOL)" >> $HOSTCONF echo "VISIT_OPTION_DEFAULT(VISIT_OSPRAY_DIR \${VISITHOME}/ospray/\${OSPRAY_VERSION}/\${VISITARCH})" >> $HOSTCONF @@ -333,7 +337,6 @@ function build_ospray # Just install them now. pushd $OSPRAY_SRC_DIR 1>/dev/null 2>&1 find . -name '*.dylib' -exec xattr -d com.apple.quarantine {} \; - find . -name '*.dylib' -exec codesign --remove-signature {} \; mkdir -p ${OSPRAY_INSTALL_DIR} cp -R include lib ${OSPRAY_INSTALL_DIR}/. info "Installed OSPRay from pre-built binaries. . . " From 2c67f5f7754886319727a5882194483d2f8f092a Mon Sep 17 00:00:00 2001 From: "Mark C. Miller" Date: Wed, 11 Dec 2024 18:47:00 -0800 Subject: [PATCH 11/18] sign from M1 mac --- .../dev/masonry/opts/mb-3.4.2-darwin-23-arm64-release.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/dev/masonry/opts/mb-3.4.2-darwin-23-arm64-release.json b/src/tools/dev/masonry/opts/mb-3.4.2-darwin-23-arm64-release.json index 30c0db36276..db46205738f 100644 --- a/src/tools/dev/masonry/opts/mb-3.4.2-darwin-23-arm64-release.json +++ b/src/tools/dev/masonry/opts/mb-3.4.2-darwin-23-arm64-release.json @@ -6,10 +6,10 @@ "cert": "Developer ID Application: Lawrence Livermore National Laboratory (A827VH86QR)", "entitlements": "/Users/miller86/visit/visit/34rc/src/tools/dev/masonry/opts/visit.entitlements", "notarize": {"username":"miller86@llnl.gov", - "password":"VisIt", + "password":"VisIt-arm64", "asc_provider":"A827VH86QR", "bundle_id":"gov.llnl.visit"}, - "make_nthreads": 8, + "make_nthreads": 16, "skip_checkout": "yes", "git": {"mode":"ssh","git_uname":"markcmiller86"}, "cmake_extra_opts" : "-DCMAKE_VERBOSE_MAKEFILE=ON", From 82f8a1fc795d4ba20a02fd396752034f1c732e17 Mon Sep 17 00:00:00 2001 From: "Mark C. Miller" Date: Thu, 12 Dec 2024 14:04:23 -0800 Subject: [PATCH 12/18] set -j1 for make package --- src/tools/dev/masonry/bootstrap_visit.py | 10 ++++++++-- src/tools/dev/masonry/masonry.py | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/tools/dev/masonry/bootstrap_visit.py b/src/tools/dev/masonry/bootstrap_visit.py index cbc140bf30e..b57286a6717 100644 --- a/src/tools/dev/masonry/bootstrap_visit.py +++ b/src/tools/dev/masonry/bootstrap_visit.py @@ -219,11 +219,17 @@ def steps_install(opts,build_type,ctx): target="install") ctx.triggers["build"].append(a_make_install) +# +# Override nthreads to force use of just a single thread here. +# This will hopefully prevent situations where `make package` fails +# during the hdiutil command to make the `.dmg` file due to a +# "resource busy" error condition. +# def steps_package(opts,build_type,ctx): build_dir = pjoin(opts["build_dir"],"build.%s" % build_type.lower()) a_make_pkg = "package_" + build_type.lower() ctx.actions[a_make_pkg] = make(description="building visit package", - nthreads=opts["make_nthreads"], + nthreads=1, working_dir=build_dir, target="package") ctx.triggers["build"].append(a_make_pkg) @@ -237,7 +243,7 @@ def steps_package(opts,build_type,ctx): working_dir=build_dir, description="configuring visit (osx bundle)") ctx.actions[a_make_bundle] = make(description="packaging visit (osx bundle)", - nthreads=opts["make_nthreads"], + nthreads=1, working_dir=build_dir, target="package") ctx.triggers["build"].extend([a_cmake_bundle, diff --git a/src/tools/dev/masonry/masonry.py b/src/tools/dev/masonry/masonry.py index f01a073d4aa..3cd90512d18 100755 --- a/src/tools/dev/masonry/masonry.py +++ b/src/tools/dev/masonry/masonry.py @@ -397,7 +397,7 @@ def execute(self,base,key,tag,parent_res): cmd = 'codesign --force --options runtime --timestamp' cmd += ' --entitlements %s' % self.params["entitlements"] cmd += ' -s "%s" %s' % (self.params["cert"], binary) - rcode, rout = shexe(cmd, ret_output=True, echo=True, env=env) + rcode, rout = shexe(cmd, ret_output=True, env=env) print("[res: %s]" % rout) # codesign VisIt.app From ce16fd754637dbc2ed91283277f81bad7aef0f7a Mon Sep 17 00:00:00 2001 From: "Mark C. Miller" Date: Thu, 12 Dec 2024 14:08:39 -0800 Subject: [PATCH 13/18] adj codesigning test app --- .../Contents/Frameworks/libz-1.2.13.dylib | 2 +- src/tools/dev/masonry/test/test_notarize.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tools/dev/masonry/test/TestDmgNotarization.app/Contents/Frameworks/libz-1.2.13.dylib b/src/tools/dev/masonry/test/TestDmgNotarization.app/Contents/Frameworks/libz-1.2.13.dylib index 9921777a88c..ebf0c442137 100755 --- a/src/tools/dev/masonry/test/TestDmgNotarization.app/Contents/Frameworks/libz-1.2.13.dylib +++ b/src/tools/dev/masonry/test/TestDmgNotarization.app/Contents/Frameworks/libz-1.2.13.dylib @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:77988a2c41a92e1472d895bfd02ace4e6a8fba0cacbfe7d7b5440e9576b45efb +oid sha256:b778114bfcc2deb1dcc42225114baf8c61b9577c96f7c303639e486d7855dfb0 size 323088 diff --git a/src/tools/dev/masonry/test/test_notarize.py b/src/tools/dev/masonry/test/test_notarize.py index 2f79b47dedf..866538b62f7 100644 --- a/src/tools/dev/masonry/test/test_notarize.py +++ b/src/tools/dev/masonry/test/test_notarize.py @@ -13,6 +13,8 @@ "password":"VisIt", "asc_provider":"A827VH86QR" } +if os.uname().machine == "arm64": + params["password"]:"VisIt-arm64" temp_dmg = "TestDmgNotarization.dmg" temp_app = "TestDmgNotarization.app" From 1596180c9a5f58623369e444ffeead7e1ef6e30f Mon Sep 17 00:00:00 2001 From: "Mark C. Miller" Date: Fri, 13 Dec 2024 10:00:51 -0800 Subject: [PATCH 14/18] upd all darwin- arch instances --- src/CMake/DetermineVisItArchitecture.cmake | 2 ++ src/bin/frontendlauncher | 7 ++++++- src/bin/internallauncher | 10 ++++++++++ src/common/misc/InstallationFunctions.C | 15 ++++++++++----- src/test/tests/unit/launcher.py | 1 + src/tools/dev/scripts/visit-create-chksums | 3 ++- src/tools/dev/scripts/visit-create-chksums.py | 3 ++- 7 files changed, 33 insertions(+), 8 deletions(-) diff --git a/src/CMake/DetermineVisItArchitecture.cmake b/src/CMake/DetermineVisItArchitecture.cmake index e492f8720a6..3c8f84a6db5 100644 --- a/src/CMake/DetermineVisItArchitecture.cmake +++ b/src/CMake/DetermineVisItArchitecture.cmake @@ -76,6 +76,8 @@ MACRO(DETERMINE_VISIT_ARCHITECTURE ARCH) ENDIF(${_OSX_MAJOR_VERSION} STREQUAL "1") ELSEIF(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64") SET(${ARCH} darwin-x86_64) + ELSEIF(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "arm64") + SET(${ARCH} darwin-arm64) ELSE(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i386") SET(${ARCH} darwin-ppc) ENDIF(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i386") diff --git a/src/bin/frontendlauncher b/src/bin/frontendlauncher index d261bf4af3f..f05f4529f31 100755 --- a/src/bin/frontendlauncher +++ b/src/bin/frontendlauncher @@ -59,7 +59,12 @@ if test "$osname" = "Linux"; then platform="linux-intel" fi elif test "$osname" = "Darwin"; then - platform="darwin-x86_64" + proc=$(uname -m) + if test "$proc" = "x86_64"; then + platform="darwin-x86_64" + elif test "$proc" = "arm64"; then + platform="darwin-arm64" + fi elif test "$osname" = "AIX"; then if test "$OBJECT_MODE" = "32"; then platform="ibm-aix-pwr" diff --git a/src/bin/internallauncher b/src/bin/internallauncher index 17fa2d855ff..d3e26734c4d 100755 --- a/src/bin/internallauncher +++ b/src/bin/internallauncher @@ -2800,6 +2800,8 @@ class MainLauncher(object): if mach == "x86_64": supportedarches.append("darwin-x86_64") supportedarches.append("darwin-i386") + elif mach == "arm64": + supportedarches.append("darwin-arm64") else: supportedarches.append("darwin-i386") else: @@ -2832,6 +2834,14 @@ class MainLauncher(object): supportedarches.append("darwin-x86_64") supportedarches.append("darwin-i386") break + procname = line.find("Chip:") + if procname != -1: + if "Apple M" in line: + supportedarches.append("darwin-arm64") + else: + supportedarches.append("darwin-x86_64") + supportedarches.append("darwin-i386") + break elif self.os == "freebsd": mach = uname("-m") version = uname("-r") diff --git a/src/common/misc/InstallationFunctions.C b/src/common/misc/InstallationFunctions.C index 7722796daf7..1c33c69a541 100644 --- a/src/common/misc/InstallationFunctions.C +++ b/src/common/misc/InstallationFunctions.C @@ -948,6 +948,7 @@ ReadInstallationInfo(std::string &distName, std::string &configName, std::string "darwin-i386", "darwin-x86_64", + "darwin-arm64", // Deprecated "darwin-ppc", @@ -977,6 +978,7 @@ ReadInstallationInfo(std::string &distName, std::string &configName, std::string "darwin-i386", "darwin-x86_64", + "darwin-arm64", // Deprecated "darwin-ppc", @@ -1068,13 +1070,16 @@ ReadInstallationInfo(std::string &distName, std::string &configName, std::string } } -#ifdef __APPLE__ +#if defined(__APPLE__) if(!platformDetermined) { - if(sizeof(long) == 8) - distName = "darwin-x86_64"; - else - distName = "darwin-i386"; +# if defined(__arm64__) + distName = "darwin-arm64"; +# elif defined(__x86_64__) + distName = "darwin-x86_64"; +# else + distName = "darwin-i386"; +# endif platformDetermined = true; } #endif diff --git a/src/test/tests/unit/launcher.py b/src/test/tests/unit/launcher.py index dea79a7c81f..8b3cce6c159 100644 --- a/src/test/tests/unit/launcher.py +++ b/src/test/tests/unit/launcher.py @@ -177,6 +177,7 @@ def FormatLauncherOutput(cmd): "linux-intel" : "$PLATFORM", "linux-x86_64" : "$PLATFORM", "darwin-i386" : "$PLATFORM", + "darwin-arm64" : "$PLATFORM", "darwin-x86_64" : "$PLATFORM"} output = FilterLauncherOutput(output, replacements) diff --git a/src/tools/dev/scripts/visit-create-chksums b/src/tools/dev/scripts/visit-create-chksums index e055041c802..89e8d38cf10 100755 --- a/src/tools/dev/scripts/visit-create-chksums +++ b/src/tools/dev/scripts/visit-create-chksums @@ -112,7 +112,8 @@ do $cmd INSTALL_NOTES.txt >> $output $cmd jvisit$version.tar.gz >> $output $cmd VisIt-$version.dmg >> $output - $cmd visit$version2.darwin-x86_64.tar.gz >> $output + $cmd visit$version2.darwin22-x86_64.tar.gz >> $output + $cmd visit$version2.darwin23-arm64.tar.gz >> $output $cmd visit$version2.linux-x86_64-debian10.tar.gz >> $output $cmd visit$version2.linux-x86_64-debian11.tar.gz >> $output $cmd visit$version2.linux-x86_64-fedora31.tar.gz >> $output diff --git a/src/tools/dev/scripts/visit-create-chksums.py b/src/tools/dev/scripts/visit-create-chksums.py index 1bcc4acd839..b80b240a9b0 100755 --- a/src/tools/dev/scripts/visit-create-chksums.py +++ b/src/tools/dev/scripts/visit-create-chksums.py @@ -71,7 +71,8 @@ def main(): res["src"] = {} ver_underscores = ver.replace(".","_") exe_files = [ "VisIt-%s.dmg" % ver, - "visit%s.darwin-x86_64.tar.gz" % ver_underscores, + "visit%s.darwin22-x86_64.tar.gz" % ver_underscores, + "visit%s.darwin23-arm64.tar.gz" % ver_underscores, "visit%s.linux-x86_64-debian10.tar.gz" % ver_underscores, "visit%s.linux-x86_64-debian11.tar.gz" % ver_underscores, "visit%s.linux-x86_64-debian12.tar.gz" % ver_underscores, From 2f4203fa5012805d0e192d18f2983e4ac6b9841d Mon Sep 17 00:00:00 2001 From: "Mark C. Miller" Date: Fri, 13 Dec 2024 10:01:30 -0800 Subject: [PATCH 15/18] add sce2aux --- src/config-site/sce2aux.cmake | 233 ++++++++++++++++++++++++++++++++++ 1 file changed, 233 insertions(+) create mode 100644 src/config-site/sce2aux.cmake diff --git a/src/config-site/sce2aux.cmake b/src/config-site/sce2aux.cmake new file mode 100644 index 00000000000..72045274c9d --- /dev/null +++ b/src/config-site/sce2aux.cmake @@ -0,0 +1,233 @@ +#/Users/miller86/visit/3.4RC/release/build-mb-3.4.2-darwin-23-arm64-release/thirdparty_shared/third_party/cmake/3.24.3/darwin-arm64/bin/cmake +## +## /Users/miller86/visit/3.4RC/src/tools/dev/scripts/build_visit generated host.cmake +## created: Fri Dec 13 09:33:08 PST 2024 +## system: Darwin sce2aux 23.6.0 Darwin Kernel Version 23.6.0: Thu Sep 12 23:35:29 PDT 2024; root:xnu-10063.141.1.701.1~1/RELEASE_ARM64_T6000 arm64 +## by: miller86 + +## +## Setup VISITHOME & VISITARCH variables. +## +SET(VISITHOME /Users/miller86/visit/3.4RC/release/build-mb-3.4.2-darwin-23-arm64-release/thirdparty_shared/third_party) +SET(VISITARCH darwin-arm64) + +## Compiler flags. +## +VISIT_OPTION_DEFAULT(VISIT_C_COMPILER clang TYPE FILEPATH) +VISIT_OPTION_DEFAULT(VISIT_CXX_COMPILER clang++ TYPE FILEPATH) +VISIT_OPTION_DEFAULT(VISIT_FORTRAN_COMPILER no TYPE FILEPATH) +VISIT_OPTION_DEFAULT(VISIT_C_FLAGS "-fno-common -fexceptions" TYPE STRING) +VISIT_OPTION_DEFAULT(VISIT_CXX_FLAGS "-fno-common -fexceptions" TYPE STRING) + +## +## Parallel Build Setup. +## +VISIT_OPTION_DEFAULT(VISIT_PARALLEL ON TYPE BOOL) +## (configured w/ mpi compiler wrapper) +VISIT_OPTION_DEFAULT(VISIT_MPI_COMPILER /Users/miller86/visit/3.4RC/release/build-mb-3.4.2-darwin-23-arm64-release/thirdparty_shared/third_party/mpich/3.3.1/darwin-arm64/bin/mpicc TYPE FILEPATH) + +## +## VisIt Thread Option +## +VISIT_OPTION_DEFAULT(VISIT_THREAD OFF TYPE BOOL) + +############################################################## +## +## Database reader plugin support libraries +## +## The HDF5 and NetCDF libraries must be first so that +## their libdeps are defined for any plugins that need them. +## +## For libraries with LIBDEP settings, order matters. +## Libraries with LIBDEP settings that depend on other +## Library's LIBDEP settings must come after them. +############################################################## +## + +## +## ZLIB +## +SETUP_APP_VERSION(ZLIB 1.2.13) +VISIT_OPTION_DEFAULT(VISIT_ZLIB_DIR ${VISITHOME}/zlib/${ZLIB_VERSION}/${VISITARCH}) + +## +## Python +## +VISIT_OPTION_DEFAULT(VISIT_PYTHON_DIR ${VISITHOME}/python/3.9.18/${VISITARCH}) + +## +## QT6 +## +SETUP_APP_VERSION(QT 6.4.2) +VISIT_OPTION_DEFAULT(VISIT_QT_DIR ${VISITHOME}/qt/6.4.2/${VISITARCH}) + +## +## OSPRay +## +SETUP_APP_VERSION(OSPRAY 3.2.0) +VISIT_OPTION_DEFAULT(VISIT_OSPRAY_DIR ${VISITHOME}/ospray/${OSPRAY_VERSION}/${VISITARCH}) + +## +## VTK +## +SETUP_APP_VERSION(VTK 9.2.6) +VISIT_OPTION_DEFAULT(VISIT_VTK_DIR ${VISITHOME}/vtk/${VTK_VERSION}/${VISITARCH}) +VISIT_OPTION_DEFAULT(VISIT_VTK_INCDEP ZLIB_INCLUDE_DIR) +VISIT_OPTION_DEFAULT(VISIT_VTK_LIBDEP ZLIB_LIBRARY) + +## +## MPICH +## +SETUP_APP_VERSION(MPICH 3.3.1) +VISIT_OPTION_DEFAULT(VISIT_MPICH_DIR ${VISITHOME}/mpich/${MPICH_VERSION}/${VISITARCH}) +VISIT_OPTION_DEFAULT(VISIT_MPICH_INSTALL ON TYPE BOOL) + +# Tell VisIt the parallel compiler so it can deduce parallel flags +VISIT_OPTION_DEFAULT(VISIT_MPI_COMPILER ${VISIT_MPICH_DIR}/bin/mpicc TYPE FILEPATH) +VISIT_OPTION_DEFAULT(VISIT_PARALLEL ON TYPE BOOL) + +## +## SZIP +## +VISIT_OPTION_DEFAULT(VISIT_SZIP_DIR ${VISITHOME}/szip/2.1/${VISITARCH}) + +## +## HDF5 +## +VISIT_OPTION_DEFAULT(VISIT_HDF5_DIR ${VISITHOME}/hdf5/1.8.14/${VISITARCH}) +VISIT_OPTION_DEFAULT(VISIT_HDF5_MPI_DIR ${VISITHOME}/hdf5_mpi/1.8.14/${VISITARCH}) +VISIT_OPTION_DEFAULT(VISIT_HDF5_LIBDEP ${VISITHOME}/szip/2.1/${VISITARCH}/lib sz ${VISITHOME}/zlib/${ZLIB_VERSION}/${VISITARCH}/lib z TYPE STRING) +VISIT_OPTION_DEFAULT(VISIT_HDF5_MPI_LIBDEP ${VISITHOME}/szip/2.1/${VISITARCH}/lib sz ${VISITHOME}/zlib/${ZLIB_VERSION}/${VISITARCH}/lib z TYPE STRING) + +## +## ADIOS +## (configured w/ mpi compiler wrapper) +## +SETUP_APP_VERSION(ADIOS 1.13.1) +VISIT_OPTION_DEFAULT(VISIT_ADIOS_DIR ${VISITHOME}/adios/${ADIOS_VERSION}/${VISITARCH}) + +## +## BLOSC2 +## +VISIT_OPTION_DEFAULT(VISIT_BLOSC2_DIR ${VISITHOME}/blosc2/2.11.3/${VISITARCH}) + +## +## ADIOS2 +## +SETUP_APP_VERSION(ADIOS2 2.10.0-rc1) +VISIT_OPTION_DEFAULT(VISIT_ADIOS2_DIR ${VISITHOME}/adios2-ser/${ADIOS2_VERSION}/${VISITARCH}) +## (configured w/ mpi compiler wrapper) +VISIT_OPTION_DEFAULT(VISIT_ADIOS2_PAR_DIR ${VISITHOME}/adios2-par/${ADIOS2_VERSION}/${VISITARCH}) + +## +## AdvIO +## +VISIT_OPTION_DEFAULT(VISIT_ADVIO_DIR ${VISITHOME}/AdvIO/1.2/${VISITARCH}) + +## +## BOOST +## +SETUP_APP_VERSION(BOOST 1_67_0) +VISIT_OPTION_DEFAULT(VISIT_BOOST_DIR ${VISITHOME}/boost/${BOOST_VERSION}/${VISITARCH}) + +## +## Boxlib +## +VISIT_OPTION_DEFAULT(VISIT_BOXLIB_DIR ${VISITHOME}/boxlib/1.3.5/${VISITARCH}) + +## +## CFITSIO +## +VISIT_OPTION_DEFAULT(VISIT_CFITSIO_DIR ${VISITHOME}/cfitsio/3006/${VISITARCH}) + +## +## CGNS +## +VISIT_OPTION_DEFAULT(VISIT_CGNS_DIR ${VISITHOME}/cgns/4.1.0/${VISITARCH}) +VISIT_OPTION_DEFAULT(VISIT_CGNS_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP} TYPE STRING) + +## +## Silo +## +VISIT_OPTION_DEFAULT(VISIT_SILO_DIR ${VISITHOME}/silo/4.10.2/${VISITARCH}) +VISIT_OPTION_DEFAULT(VISIT_SILO_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP} ZLIB_LIBRARY_DIR z TYPE STRING) + +## +## Conduit +## +SETUP_APP_VERSION(CONDUIT 0.9.2) +VISIT_OPTION_DEFAULT(VISIT_CONDUIT_DIR ${VISITHOME}/conduit/v0.9.2/${VISITARCH}) +VISIT_OPTION_DEFAULT(VISIT_CONDUIT_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP} ${VISIT_SILO_LIBDEP} TYPE STRING) + +## +## FMS +## +VISIT_OPTION_DEFAULT(VISIT_FMS_DIR ${VISITHOME}/fms/0.2/${VISITARCH}) +VISIT_OPTION_DEFAULT(VISIT_FMS_LIBDEP CONDUIT_LIBRARY_DIR conduit CONDUIT_LIBRARY_DIR conduit_blueprint CONDUIT_LIBRARY_DIR conduit_relay ${VISIT_CONDUIT_LIBDEP} TYPE STRING) + +## +## GDAL +## +VISIT_OPTION_DEFAULT(VISIT_GDAL_DIR ${VISITHOME}/gdal/2.2.4/${VISITARCH}) + +## +## H5Part +## +SETUP_APP_VERSION(H5PART 1.6.6) +VISIT_OPTION_DEFAULT(VISIT_H5PART_DIR ${VISITHOME}/h5part/${H5PART_VERSION}/${VISITARCH}) +VISIT_OPTION_DEFAULT(VISIT_H5PART_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP} TYPE STRING) + +## +## IceT +## +VISIT_OPTION_DEFAULT(VISIT_ICET_DIR ${VISITHOME}/icet/77c708f9090236b576669b74c53e9f105eedbd7e/${VISITARCH}) + +## +## MFEM +## +VISIT_OPTION_DEFAULT(VISIT_MFEM_DIR ${VISITHOME}/mfem/4.6/${VISITARCH}) +VISIT_OPTION_DEFAULT(VISIT_MFEM_INCDEP CONDUIT_INCLUDE_DIR FMS_INCLUDE_DIR TYPE STRING) +VISIT_OPTION_DEFAULT(VISIT_MFEM_LIBDEP ${VISIT_CONDUIT_LIBDEP} ${VISITHOME}/zlib/${ZLIB_VERSION}/${VISITARCH}/lib z TYPE STRING) + +## +## Mili +## +VISIT_OPTION_DEFAULT(VISIT_MILI_DIR ${VISITHOME}/mili/23.02/${VISITARCH}) + +## +## MOAB +## +VISIT_OPTION_DEFAULT(VISIT_MOAB_DIR ${VISITHOME}/moab/5.5.0/${VISITARCH}) +VISIT_OPTION_DEFAULT(VISIT_MOAB_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP} TYPE STRING) +VISIT_OPTION_DEFAULT(VISIT_MOAB_MPI_DIR ${VISITHOME}/moab_mpi/5.5.0/${VISITARCH}) +VISIT_OPTION_DEFAULT(VISIT_MOAB_MPI_LIBDEP HDF5_MPI_LIBRARY_DIR hdf5_mpi ${VISIT_HDF5_MPI_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) + +## +## QWT +## +SETUP_APP_VERSION(QWT 6.3.0) +VISIT_OPTION_DEFAULT(VISIT_QWT_DIR ${VISITHOME}/qwt/${QWT_VERSION}/${VISITARCH}) + +## +## Uintah +## +SETUP_APP_VERSION(UINTAH 2.6.3) +VISIT_OPTION_DEFAULT(VISIT_UINTAH_DIR ${VISITHOME}/uintah/${UINTAH_VERSION}/${VISITARCH}) + +## +## VTKM +## +VISIT_OPTION_DEFAULT(VISIT_VTKM_DIR ${VISITHOME}/vtkm/v1.9.0/${VISITARCH}) + +## +## Xdmf +## +VISIT_OPTION_DEFAULT(VISIT_XDMF_DIR ${VISITHOME}/Xdmf/2.1.1/${VISITARCH}) +VISIT_OPTION_DEFAULT(VISIT_XDMF_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISITHOME}/vtk/${VTK_VERSION}/${VISITARCH}/lib vtklibxml2.${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION} TYPE STRING) + From 87998411342b88ad9883f31403303f302cc44f2b Mon Sep 17 00:00:00 2001 From: "Mark C. Miller" Date: Fri, 13 Dec 2024 11:15:46 -0800 Subject: [PATCH 16/18] handle arch --- src/osxfixup/osxfixup.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/osxfixup/osxfixup.py b/src/osxfixup/osxfixup.py index 8ff8ed755f8..266343770b7 100755 --- a/src/osxfixup/osxfixup.py +++ b/src/osxfixup/osxfixup.py @@ -223,7 +223,13 @@ def fixup_items(items,lib_maps,prefix_path): shexe(dep_cmd) def main(): - prefix_path = "darwin-x86_64" + if os.uname().machine == "x86_64": + prefix_path = "darwin-x86_64" + elif os.uname().machine == "arm64": + prefix_path = "darwin-arm64" + else: + print("[response from 'os.uname().machine' is not recognized]") + sys.exit(-1) if len(sys.argv) > 1: prefix_path = sys.argv[1] prefix_path = os.path.abspath(prefix_path) From fd2b9151760cf3065505ce0183d246da76dc8462 Mon Sep 17 00:00:00 2001 From: "Mark C. Miller" Date: Fri, 13 Dec 2024 17:26:17 -0800 Subject: [PATCH 17/18] fix path --- .../dev/masonry/opts/mb-3.4.2-darwin-23-arm64-release.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/dev/masonry/opts/mb-3.4.2-darwin-23-arm64-release.json b/src/tools/dev/masonry/opts/mb-3.4.2-darwin-23-arm64-release.json index db46205738f..4ec96d2245c 100644 --- a/src/tools/dev/masonry/opts/mb-3.4.2-darwin-23-arm64-release.json +++ b/src/tools/dev/masonry/opts/mb-3.4.2-darwin-23-arm64-release.json @@ -4,7 +4,7 @@ "branch": "3.4RC", "arch": "darwin-arm64", "cert": "Developer ID Application: Lawrence Livermore National Laboratory (A827VH86QR)", - "entitlements": "/Users/miller86/visit/visit/34rc/src/tools/dev/masonry/opts/visit.entitlements", + "entitlements": "/Users/miller86/visit/3.4RC/src/tools/dev/masonry/opts/visit.entitlements", "notarize": {"username":"miller86@llnl.gov", "password":"VisIt-arm64", "asc_provider":"A827VH86QR", From c6501f4006d57fb0b691f8923549b834c6e203a1 Mon Sep 17 00:00:00 2001 From: "Mark C. Miller" Date: Sat, 14 Dec 2024 12:32:06 -0800 Subject: [PATCH 18/18] fix packaging issues --- src/tools/dev/masonry/bootstrap_visit.py | 48 ++++++++++++---- src/tools/dev/masonry/masonry.py | 71 ++++++++++++------------ 2 files changed, 73 insertions(+), 46 deletions(-) diff --git a/src/tools/dev/masonry/bootstrap_visit.py b/src/tools/dev/masonry/bootstrap_visit.py index b57286a6717..6ffff991dc6 100644 --- a/src/tools/dev/masonry/bootstrap_visit.py +++ b/src/tools/dev/masonry/bootstrap_visit.py @@ -1,3 +1,21 @@ +# +# I usually work from a git worktree that is peer or child dir of the main `develop` repo +# 1. Create a `release` folder there +# 2. Ensure masonry options file is updated with correct +# - VisIt version number +# - Git branch name (or tag or commit hash) +# - architecture +# - keychain profile name +# - path to entitlements file +# - nthreads setting (for make -j) +# +# cd to `release` folder and run command like so... +# +# env PATH=/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin python3 ../src/tools/dev/masonry/bootstrap_visit.py ../src/tools/dev/masonry/opts/mb-3.4.2-darwin-23-arm64-release.json +# +# First try will fail. When it does, cd to the build-mb-x.y.z-arch... folder and create a symlink +# named `visit` to ../.. from that build folder and restart. +# import sys import json import subprocess @@ -219,12 +237,16 @@ def steps_install(opts,build_type,ctx): target="install") ctx.triggers["build"].append(a_make_install) -# -# Override nthreads to force use of just a single thread here. -# This will hopefully prevent situations where `make package` fails -# during the hdiutil command to make the `.dmg` file due to a -# "resource busy" error condition. -# +######################################################################## +# NOTE: Mark C. Miller, Fri Dec 13 19:13:32 PST 2024 +# I believe CMake's `make package` target tries to also use hdiutil. +# When make is invoked with a lot of parallelism (e.g. -j8 or more), +# I believe a race condition occurs in CMake sometimes causing the +# `make package` operation to fail during `hdiutil` command with +# "Resource busy" error. So, here we override nthreads to force use +# of just a single thread. +######################################################################## + def steps_package(opts,build_type,ctx): build_dir = pjoin(opts["build_dir"],"build.%s" % build_type.lower()) a_make_pkg = "package_" + build_type.lower() @@ -314,9 +336,11 @@ def steps_osx_dmg_sanity_checks(opts,build_type,ctx): test_base = "mount/VisIt.app/Contents/Resources/%s/%s" % (actual_version, opts["arch"]) # stop at any error + final_dmg_name = "visit%s.darwin%s-%s.dmg" % (opts["version"].replace('.','_'),os.uname().release[0:2],os.uname().machine) + test_cmd = "" - test_cmd += "hdiutil attach -mountpoint mount VisIt-%s.dmg\n" - test_dylib = "libvtkRenderingCore-*.*.dylib " + test_cmd += "hdiutil attach -mountpoint mount %s\n" % final_dmg_name + test_dylib = "libvtkRenderingCore*.*.dylib " test_cmd += "otool -L %s/lib/%s | grep @exe\n" test_cmd += "otool -L %s/lib/%s | grep build-mb\n" test_cmd += "otool -L %s/lib/%s | grep build-mb | wc -l\n" @@ -329,10 +353,10 @@ def steps_osx_dmg_sanity_checks(opts,build_type,ctx): # verify the app test_cmd += "spctl -a -t exec -vv mount/VisIt.app\n" test_cmd += "hdiutil detach mount\n" - test_cmd = test_cmd % (actual_version,test_base,test_dylib, - test_base,test_dylib, - test_base,test_dylib, - test_base,test_dylib) + test_cmd = test_cmd % (test_base,test_dylib, + test_base,test_dylib, + test_base,test_dylib, + test_base,test_dylib) saction = "osx_sanity_" + build_type.lower() ctx.actions[saction] = shell(cmd=test_cmd, description="sanity check", diff --git a/src/tools/dev/masonry/masonry.py b/src/tools/dev/masonry/masonry.py index 3cd90512d18..6600dad014d 100755 --- a/src/tools/dev/masonry/masonry.py +++ b/src/tools/dev/masonry/masonry.py @@ -398,7 +398,6 @@ def execute(self,base,key,tag,parent_res): cmd += ' --entitlements %s' % self.params["entitlements"] cmd += ' -s "%s" %s' % (self.params["cert"], binary) rcode, rout = shexe(cmd, ret_output=True, env=env) - print("[res: %s]" % rout) # codesign VisIt.app visit_app = pjoin(bundle_dir, "VisIt-%s/VisIt.app" % self.params["build_version"]) @@ -406,7 +405,6 @@ def execute(self,base,key,tag,parent_res): cmd += ' --entitlements %s' % self.params["entitlements"] cmd += ' -s "%s" %s' % (self.params["cert"], visit_app) rcode, rout = shexe(cmd, ret_output=True, echo=True, env=env) - print("[res: %s]" % rout) # Create DMG to upload to Apple notarize_dir = pjoin(self.params["build_dir"], "notarize.%s" % self.params["build_type"]) @@ -427,6 +425,13 @@ def execute(self,base,key,tag,parent_res): # the dmg creation process is unreliable, it can often fail with: # hdiutil: create failed - Resource busy # but then works fine on subsequent tries, so we try here multiple times + # + # NOTE (miller86) Mark C. Miller, Fri Dec 13 19:12:02 PST 2024 + # I believe the "Resource busy" condition we sometimes hit is actually not + # from hdiutil commands here but instead down in CMake's `make package` + # logic when large parallel task counts are used (e.g. -j8 or more). + # So, in the trigger in the bootstrap, we override nthreads to 1 there in + # hopes of preventing the "Resource busy" error in hdiutil commands. ########################################################################## dmg_created = False @@ -447,52 +452,49 @@ def execute(self,base,key,tag,parent_res): raise RuntimeError(msg, cmd, dmg_create_output) ###################################### - # Upload to Apple Notary Service + # Submit to Apple Notary Service ###################################### - cmd = [ - "xcrun", "notarytool", "submit", - "--apple-id", self.params["username"], - "--keychain-profile", self.params["password"], - "--team-id", self.params["asc_provider"], - "--output-format", "json", - temp_dmg - ] + cmd = 'xcrun notarytool submit' + cmd += ' --apple-id "%s"' % self.params["username"] + cmd += ' --keychain-profile %s' % self.params["password"] + cmd += ' --team-id %s' % self.params["asc_provider"] + cmd += ' --output-format json' + cmd += ' %s' % temp_dmg rcode, rout = shexe(cmd, ret_output=True, echo=True, env=env) if rcode != 0: - raise RuntimeError("[error submitting VisIt dmg for notarization]", cmd) + raise RuntimeError("[error submitting VisIt dmg for notarization, error='%s']"%rout, cmd) jr = json.loads(rout) uuid = jr.get("id") print("[id: %s]" % uuid) # Check status of notarization request - cmd = [ - "xcrun", "notarytool", "info", - "--apple-id", self.params["username"], - "--keychain-profile", self.params["password"], - "--team-id", self.params["asc_provider"], - "--output-format", "json", - uuid - ] + cmd = 'xcrun notarytool info' + cmd += ' --apple-id "%s"' % self.params["username"] + cmd += ' --keychain-profile %s' % self.params["password"] + cmd += ' --team-id %s' % self.params["asc_provider"] + cmd += ' --output-format json' + cmd += ' %s' % uuid status = "in progress" - while "in progress" in status: - time.sleep(30) + while "progress" in status: + time.sleep(120) # check status every two minutes rcode, rout = shexe(cmd, ret_output=True, echo=True, env=env) jr = json.loads(rout) - status = jr.get("status") - status = status.strip() - status = status.lower() - print("[status: %s]" % status) + status = jr.get("status").strip().lower() + print('Status check result: %s ("%s")'%(status,rout)) - ################################### + ################################################################# # Staple notarization ticket to app bundle - ################################### + # NOTE: Mark C. Miller, Sat Dec 14 09:06:34 PST 2024 + # Stapling helps users who are not connected to a network still + # be able to validate the VisIt .dmg download before using it. + ################################################################# - if status == "accepted": + if "accepted" in status: cmd = "xcrun stapler staple %s" % visit_app rcode, rout = shexe(cmd, ret_output=True, echo=True, env=env) - print("[stapler: %s]" % rout) + print('[stapler result: "%s"]' % rout) if rcode != 0: raise RuntimeError("[error stapling VisIt (bad network or on VPN?)]", cmd) @@ -500,16 +502,17 @@ def execute(self,base,key,tag,parent_res): dmg_stapled = pjoin(notarize_dir, "VisIt.stpl.dmg") cmd = "hdiutil create -srcFolder %s -o %s" % (src_folder, dmg_stapled) rcode, rout = shexe(cmd, ret_output=True, echo=True, env=env) - print("[hdiutil: %s]" % rout) + print('[hdiutil result: "%s"]' % rout) if rcode != 0: raise RuntimeError("[error creating stapled VisIt.stpl.dmg]", cmd) - dmg_release = pjoin(notarize_dir, "VisIt-%s.dmg" % self.params["build_version"]) + final_dmg_name = "visit%s.darwin%s-%s.dmg" % (self.params["build_version"].replace('.','_'),os.uname().release[0:2],os.uname().machine) + dmg_release = pjoin(notarize_dir, final_dmg_name) cmd = "hdiutil convert %s -format UDZO -o %s" % (dmg_stapled, dmg_release) rcode, rout = shexe(cmd, ret_output=True, echo=True, env=env) - print("[hdiutil:convert: %s]" % rout) + print('[hdiutil convert result: "%s"]' % rout) if rcode != 0: - raise RuntimeError("[error creating final VisIt-{0}.dmg]".format(self.params["build_version"]), cmd) + raise RuntimeError("[error creating final {0}]".format(final_dmg_name), cmd) else: raise RuntimeError("Notarization Failed!") except KeyboardInterrupt as e: