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

Add Mac fixes to hashstack's proteus configuration. #991

Open
wants to merge 10 commits into
base: stable/proteus
Choose a base branch
from
21 changes: 13 additions & 8 deletions examples/proteus.darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ extends:
- file: osx_clt.yaml


# The packages list specifies all the packages that you
# The packages list specifies all the packages that you
# require installed. <#> will ensure that all packages
# and their dependencies are installed when you build this
# profile.
Expand All @@ -25,6 +25,7 @@ packages:
version: '2.1'
python:
host: false
link: shared
build_with: |

blas:
Expand All @@ -33,7 +34,7 @@ packages:
use: host-osx-framework-accelerate
daetk:
mpi:
use: mpich
use: openmpi
mpi4py:
nose:
hdf5:
Expand All @@ -44,22 +45,23 @@ packages:
ipython:
matplotlib:
petsc:
version: 3.6.1
version: 3.7.5
build_with: |
parmetis
parmetis, cmake, suitesparse
download: |
superlu
superlu, superlu_dist
coptflags: -O2
link: shared
debug: false
disable_fortran: true
petsc4py:
version: 3.6.0
version: 3.7.0
with_conf: true
pillow:
pytables:
scorec:
sphinx:
superlu:
#superlu:
sympy:
tetgen:
triangle:
Expand All @@ -73,9 +75,12 @@ packages:
python-netcdf4:
h5py:
ode:
openblas:
jupyter:
functools:
use: host-functools
yaml:
pytest:
pytest-xdist:
pytest-xdist:
boost:
toolset: darwin
2 changes: 2 additions & 0 deletions osx_clt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ parameters:
platform: Darwin
fortran: false
PATH: /usr/bin:/bin:/usr/sbin:/sbin
PROLOGUE: |
export MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion | sed -E "s/([0-9]+\.[0-9]+).*/\1/")
12 changes: 2 additions & 10 deletions pkgs/boost/boost.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ dependencies:
build: [bzip2, mpi, zlib, {{build_with}}]

sources:
- key: tar.bz2:oj5jgizc3fbipnrkxmn5fvaxepxminlk
url: http://downloads.sourceforge.net/boost/boost_1_59_0.tar.bz2
- key: tar.bz2:nbvp774ytlberd3zvf5zi6ppxhzkxlqd
url: http://downloads.sourceforge.net/boost/boost_1_60_0.tar.bz2

build_stages:
- name: bootstrap
Expand All @@ -17,14 +17,6 @@ build_stages:
bash: |
./bootstrap.sh --with-toolset={{toolset}} --prefix=${ARTIFACT}

- name: boost_1_55_fix_warnings
before: bjam
after: bootstrap
handler: bash
files: [boost_1_55_fix_warnings.patch]
bash: |
patch -p2 < _hashdist/boost_1_55_fix_warnings.patch

- name: set-address_model
before: bjam
handler: bash
Expand Down
4 changes: 2 additions & 2 deletions pkgs/cmake.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ dependencies:
build: [zlib, bzip2, curl, openssl, libidn, expat, ncurses]

sources:
- key: tar.gz:3j6mgtq44hmc4z5dfkyidqbmfbcvgtgy
url: https://cmake.org/files/v3.4/cmake-3.4.2.tar.gz
- key: tar.gz:zzozcyjznydfagya4uutg6brkcuhymyi
url: https://cmake.org/files/v3.8/cmake-3.8.1.tar.gz

build_stages:
- when: platform == 'Darwin'
Expand Down
9 changes: 0 additions & 9 deletions pkgs/doxygen/doxygen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,3 @@ dependencies:
sources:
- key: tar.gz:chw522awd5akqmsoig2jnhncxz67neew
url: https://github.com/doxygen/doxygen/archive/Release_1_8_13.tar.gz

build_stages:
- when: platform == 'Darwin'
name: patch
before: configure
files: [libiconv_plug.patch]
handler: bash
bash: |
patch -up1 < _hashdist/libiconv_plug.patch
3 changes: 2 additions & 1 deletion pkgs/h5py.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ build_stages:
before: install
handler: bash
bash: |
export HDF5_VERSION='1.8.16'
export HDF5_VERSION='1.8.13'
Copy link
Contributor

Choose a reason for hiding this comment

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

What necessitated going backward on the release?

Copy link
Author

Choose a reason for hiding this comment

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

This change was made by @mfarthin.

export CC=${MPICC}
export SETUPTOOLS_PACKAGE_EXTRA_OPTIONS="configure --mpi"
#export HDF5_VERSION='1.8.16'
11 changes: 6 additions & 5 deletions pkgs/hdf5/hdf5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ dependencies:
build: [mpi, zlib, szip]

sources:
- key: tar.bz2:covk4w5bbnyhjhxbogebnjfux7vnrf6c
url: http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.16/src/hdf5-1.8.16.tar.bz2

- key: tar.bz2:yl22ieqqpk5g7gp5pjfj3nwol5p4qfy6
url: https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.13/src/hdf5-1.8.13.tar.bz2
defaults:
# /bin/h5pcc contains hard-coded path
relocatable: false
Expand All @@ -24,8 +23,8 @@ build_stages:
after: configure
before: make
bash: |
for f in {test,testpar,tools/*,perform,hl/*,hl/*/*}/Makefile
do
for f in {test,testpar,tools/*,perform,hl/*,hl/*/*}/Makefile
do
sed -i 's/CCLD = $(CC)/CCLD = $(CC) -static/g' $f
done

Expand All @@ -37,6 +36,7 @@ build_stages:
'--enable-shared',
'--enable-production=yes',
'--enable-parallel=yes',
'--enable-largefile=yes',
'--with-default-api-version=v18']

- when: machine == 'CrayXE6'
Expand All @@ -49,6 +49,7 @@ build_stages:
'--enable-shared',
'--enable-production=yes',
'--enable-parallel=yes',
'--enable-largefile=yes',
'--with-default-api-version=v18',
'--with-pic']

Expand Down
2 changes: 1 addition & 1 deletion pkgs/mpich.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ build_stages:
- when: not fortran
name: configure
mode: update
extra: ['--disable-f77', '--disable-fc']
extra: ['--disable-f77', '--disable-fc', '--disable-fortran']

sources:
- key: tar.gz:a54gpgtlne6xw7fp6n77tuufnxbl7rit
Expand Down
4 changes: 2 additions & 2 deletions pkgs/openmpi.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
extends: [autotools_package]

sources:
- url: http://www.open-mpi.org/software/ompi/v1.6/downloads/openmpi-1.6.5.tar.bz2
key: tar.bz2:7y33voe3l3zdjyfmqlohtaucykvqreal
- url: https://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.6.tar.bz2
key: tar.bz2:mvqgdbfaqsqo3jqqfma6li3kr4bnggk5

defaults:
# lib/openmpi/mca_carto_auto_detect.la contains hard-coded path
Expand Down
2 changes: 1 addition & 1 deletion pkgs/parmetis/parmetis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defaults:
# lib/libmetis.so contains hard-coded path
relocatable: false
# Skip build-time tests (not recommended)
without_check: false
without_check: platform != "Darwin"

build_stages:
- name: setup_builddir
Expand Down
10 changes: 9 additions & 1 deletion pkgs/readline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,16 @@ build_stages:
mode: override
extra: ['--enable-shared', '--with-curses']

- name: make
- when: platform != 'Darwin'
name: make
mode: replace
handler: bash
bash: |
make SHOBJ_CFLAGS="-fPIC -D_REENTRANT" SHOBJ_LDFLAGS="-shared -Wl,-rpath=$NCURSES_DIR/lib" SHLIB_LIBS="-ltinfo"

- when: platform == 'Darwin'
name: make
mode: replace
handler: bash
bash: |
make SHOBJ_CFLAGS="-fPIC -D_REENTRANT" SHOBJ_LDFLAGS="-shared -Wl,-rpath,$NCURSES_DIR/lib" SHLIB_LIBS="-ltinfo"
14 changes: 14 additions & 0 deletions pkgs/remus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
extends: [cmake_package]
dependencies:
build: [boost, zmq]

sources:
- url: https://gitlab.kitware.com/cmb/remus.git
key: git:1148df5bb86a2dc9bd61d19edbe6f77c582a5641

defaults:
relocatable: true

build_stages:
- name: configure
extra: ['-D BUILD_SHARED_LIBS:BOOL=ON']
7 changes: 3 additions & 4 deletions pkgs/scorec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ dependencies:
build: [mpi, parmetis, zoltan]

sources:
- url: https://github.com/SCOREC/core.git
key: git:e219777edd875d35096dfedd7197300b8e2f3837
- url: https://github.com/tjcorona/core.git
Copy link
Contributor

Choose a reason for hiding this comment

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

Have your changes to scorec core not been merged in? Maybe we should put and if statement here to do this conditionally only for darwin or do it as a patch instead. Maybe @zhanga can look into the changes on scorec core.

Copy link
Author

Choose a reason for hiding this comment

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

I think the version we were using had the error, and the newest version of SCOREC/core wasn't compatible with other things. The easiest fix was to branch and patch the version we were using.

key: git:374c1f0640d2a96242e7a5fd01fd27bd5a935b11

defaults:
relocatable: true

Expand All @@ -29,4 +29,3 @@ build_stages:
'-DZOLTAN_PREFIX:PATH=${ZOLTAN_DIR}',
'-DPARMETIS_PREFIX:PATH=${PARMETIS_DIR}',
]

31 changes: 31 additions & 0 deletions pkgs/smtk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
extends: [cmake_package]
dependencies:
build: [boost, gdal, hdf5, netcdf4, mpi, python, remus, vtk, zmq]

sources:
- url: https://gitlab.kitware.com/tjcorona/smtk.git
key: git:9c18b1d7207d17995ce260e095e7a5e9ae5f63cb

defaults:
relocatable: true

build_stages:
- name: configure
extra: ['-D SMTK_ENABLE_VTK_SUPPORT:BOOL=ON',
'-D SMTK_ENABLE_DISCRETE_SESSION:BOOL=ON',
'-D SMTK_ENABLE_EXODUS_SESSION:BOOL=ON',
'-D SMTK_ENABLE_MESH_SESSION:BOOL=ON',
'-D SMTK_ENABLE_POLYGON_SESSION:BOOL=ON',
'-D SMTK_ENABLE_REMOTE_SESSION:BOOL=ON',
'-D SMTK_ENABLE_REMUS_SUPPORT:BOOL=ON',
'-D SMTK_ENABLE_PYTHON_WRAPPING:BOOL=ON',
'-D SMTK_USE_PYBIND11:BOOL=ON',
'-D SMTK_USE_SYSTEM_MOAB:BOOL=OFF',
'-D ENABLE_HDF5:BOOL=ON',
'-D ENABLE_NETCDF:BOOL=ON',
'-D NETCDF_ROOT:STRING=${NETCDF4_DIR}',
'-D VTK_DIR:STRING=${VTK_DIR}',
'-D PYTHON_LIBRARY:FILEPATH=${PYTHON_DIR}/lib/libpython2.7.dylib',
'-D PYTHON_EXECUTABLE:FILEPATH=${PYTHON_DIR}/bin/python2.7',
'-D PYTHON_INCLUDE_DIR:PATH=${PYTHON_DIR}/include/python2.7',
'-D NETCDF_C_LIBRARY=${NETCDF4_DIR}/lib/libnetcdf.dylib']
2 changes: 1 addition & 1 deletion pkgs/szip.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
extends: [cmake_package]

sources:
- url: http://www.hdfgroup.org/ftp/lib-external/szip/2.1/src/szip-2.1.tar.gz
- url: https://support.hdfgroup.org/ftp/lib-external/szip/2.1/src/szip-2.1.tar.gz
key: tar.gz:valnsxkwmlucpfrfvpn6u7iomikx27i7

build_stages:
Expand Down
60 changes: 16 additions & 44 deletions pkgs/vtk/vtk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ extends: [cmake_package]
dependencies:
build:
- python
- gdal
- setuptools
- libtiff
- when platform == 'linux':
Expand All @@ -14,7 +15,7 @@ sources:
url: http://www.vtk.org/files/release/7.1/VTK-7.1.1.tar.gz

defaults:
# lib/vtk-5.10/libvtkHybrid.so.5.10.1 contains hard-coded path
# lib/vtk-7.1/libvtkHybrid.so.7.1.0 contains hard-coded path
relocatable: false
vtk_use_tk: false

Expand All @@ -28,37 +29,27 @@ build_stages:
export PYTHONPATH=${ARTIFACT}/{{python_site_packages_rel}}:$PYTHONPATH
mkdir -p ${ARTIFACT}/{{python_site_packages_rel}}

- when: platform == 'Cygwin'
files: [vtk-5.10.1-cygwin.patch]
name: vtk_cygwin_patch
handler: bash
before: setup_builddir
bash: |
patch -p1 < _hashdist/vtk-5.10.1-cygwin.patch

- when: platform == 'Darwin'
files: [vtk-disable-gc.patch]
name: vtk_disable_gc_patch
handler: bash
before: setup_builddir
bash: |
patch -p1 < _hashdist/vtk-disable-gc.patch

- name: configure
extra:
extra:
- '-D BUILD_TESTING:BOOL=OFF'
- '-D BUILD_EXAMPLES:BOOL=OFF'
- '-D BUILD_SHARED_LIBS:BOOL=ON'
- '-D VTK_WRAP_PYTHON:BOOL=ON'
- '-D VTK_WRAP_TCL:BOOL=OFF'
- '-D PYTHON_EXECUTABLE:FILEPATH="${PYTHON}"'
- '-D VTK_USE_GL2PS:BOOL=ON'
- '-D VTK_PYTHON_SETUP_ARGS:STRING="--prefix=. --root=${ARTIFACT} --single-version-externally-managed"'
- '-D PYTHON_EXECUTABLE:FILEPATH=${PYTHON_DIR}/bin/python2.7'
- '-D PYTHON_INCLUDE_DIR:PATH=${PYTHON_DIR}/include/python2.7'
- '-D PYTHON_LIBRARY:FILEPATH=${PYTHON_DIR}/lib/libpython2.7.dylib'
- '-D VTK_USE_SYSTEM_TIFF:BOOL=ON'
- '-D VTK_Group_Imaging:BOOL=ON'
- '-D VTK_Group_MPI:BOOL=ON'
- '-D VTK_Group_Rendering:BOOL=ON'
- '-D VTK_Group_StandAlone:BOOL=ON'
- '-D VTK_Group_Views:BOOL=ON'
- '-D VTK_Group_Web:BOOL=ON'
- '-D Module_vtkGeovisCore:BOOL=ON'
- '-D Module_vtkIOGDAL:BOOL=ON'
- '-D Module_vtkViewsInfovis:BOOL=ON'
- '-D Module_vtkRenderingMatplotlib:BOOL=ON'
- '-D Module_vtkRenderingGL2PSOpenGL2:BOOL=ON'
- '-D Module_vtkTestingRendering:BOOL=ON'
- '-D Module_vtkIOParallelExodus:BOOL=ON'
- '-D GDAL_DIR:PATH=${GDAL_DIR}'

- when: vtk_use_tk
name: configure
Expand All @@ -70,25 +61,6 @@ build_stages:
mode: update
extra: ['-D VTK_USE_TK:BOOL=OFF']

- when: platform == 'Darwin'
name: rpath_fix
after: install
handler: bash
bash: |
for vtklib in ${ARTIFACT}/lib/vtk-5.10/*.dylib; do
if [ ! -L ${vtklib} ]; then
install_name_tool -id @rpath/$(basename ${vtklib}) ${vtklib}
otool -L ${vtklib} | while read line; do
set +e
lib=$(echo $line | sed 's/\(lib.*\.dylib\).*/\1/' | grep ^lib)
set -e
if [ ! -z ${lib} ]; then
install_name_tool -change ${lib} @rpath/${lib} ${vtklib}
fi
done
fi
done

profile_links:
- name: python_packages
link: 'lib/python{{pyver}}/site-packages/*'
Expand Down