Skip to content

Commit

Permalink
try #83 if it helps
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterPetrik committed Sep 22, 2020
1 parent 841e35f commit 36f8675
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 11 deletions.
4 changes: 1 addition & 3 deletions qgis_bundle/recipes/openblas/recipe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,19 @@ function bundle_openblas() {

function fix_binaries_openblas() {
install_name_id @rpath/$LINK_libopenblas $BUNDLE_LIB_DIR/$LINK_libopenblas
install_name_id @rpath/$LINK_libopenblas_haswellp $BUNDLE_LIB_DIR/$LINK_libopenblas_haswellp

for i in \
$LINK_libopenblas \
$LINK_libquadmath \
$LINK_libgfortran \
$LINK_gcc_s
do
install_name_change $DEPS_LIB_DIR/$i @rpath/$i $BUNDLE_LIB_DIR/$LINK_libopenblas_haswellp
install_name_change $DEPS_LIB_DIR/$i @rpath/$i $BUNDLE_LIB_DIR/$LINK_libopenblas
done
}

function fix_binaries_openblas_check() {
verify_binary $BUNDLE_LIB_DIR/$LINK_libopenblas
verify_binary $BUNDLE_LIB_DIR/$LINK_libopenblas_haswellp
}

function fix_paths_openblas() {
Expand Down
1 change: 0 additions & 1 deletion qgis_bundle/recipes/python_numpy/recipe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ function fix_binaries_python_numpy() {
linalg/lapack_lite \
linalg/_umath_linalg
do
install_name_change $DEPS_LIB_DIR/$LINK_libopenblas_haswellp @rpath/$LINK_libopenblas_haswellp $NUMPY_EGG_DIR/numpy/$i.cpython-${VERSION_major_python//./}m-darwin.so
install_name_change $DEPS_LIB_DIR/$LINK_libopenblas @rpath/$LINK_libopenblas $NUMPY_EGG_DIR/numpy/$i.cpython-${VERSION_major_python//./}m-darwin.so
done
}
Expand Down
17 changes: 10 additions & 7 deletions qgis_deps/recipes/openblas/recipe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ source $RECIPES_PATH/gcc/recipe.sh
VERSION_openblas=0.3.10

LINK_libopenblas=libopenblas.0.dylib
LINK_libopenblas_haswellp=libopenblas_haswellp-r$VERSION_openblas.dylib

# dependencies of this recipe
DEPS_openblas=(sqlite libxml2 openssl gcc)
Expand Down Expand Up @@ -51,29 +50,33 @@ function build_openblas() {
push_env

export CFLAGS="$CFLAGS -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET"
# lapacke_sggsvd_work.c:48:9: error: implicit declaration of function 'sggsvd_' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
export CFLAGS="$CFLAGS -Wno-implicit-function-declaration"
export CXXFLAGS="$CFLAGS"

# Contains FORTRAN LAPAC sources
# Contains FORTRAN LAPACK sources
export DYNAMIC_ARCH=1
export USE_OPENMP=0 # ? this is 1 in homebrew..?..
export NO_AVX512=1

try $MAKESMP FC=gfortran libs netlib shared
try $MAKE install PREFIX=$STAGE_PATH

try install_name_tool -change @rpath/$LINK_libquadmath $DEPS_LIB_DIR/$LINK_libquadmath $DEPS_LIB_DIR/$LINK_libopenblas_haswellp
try install_name_tool -change @rpath/$LINK_libgfortran $DEPS_LIB_DIR/$LINK_libgfortran $DEPS_LIB_DIR/$LINK_libopenblas_haswellp
try install_name_tool -change @rpath/$LINK_gcc_s $DEPS_LIB_DIR/$LINK_gcc_s $DEPS_LIB_DIR/$LINK_libopenblas_haswellp
unset DYNAMIC_ARCH
unset USE_OPENMP
unset NO_AVX512

pop_env
}

# function called after all the compile have been done
function postbuild_openblas() {
verify_binary lib/$LINK_libopenblas
verify_binary lib/$LINK_libopenblas_haswellp
}

# function to append information to config file
function add_config_info_openblas() {
append_to_config_file "# openblas-${VERSION_openblas}: ${DESC_openblas}"
append_to_config_file "export VERSION_openblas=${VERSION_openblas}"
append_to_config_file "export LINK_libopenblas=${LINK_libopenblas}"
append_to_config_file "export LINK_libopenblas_haswellp=${LINK_libopenblas_haswellp}"
}
12 changes: 12 additions & 0 deletions qgis_deps/recipes/python_numpy/recipe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,20 @@ function build_python_numpy() {
try cd $BUILD_PATH/python_numpy/build-$ARCH
push_env

export OPENBLAS=$STAGE_PATH/lib
export BLAS=None
export LAPACK=None
export ATLAS=None
export ACCELERATE=None

DYLD_LIBRARY_PATH=$STAGE_PATH/lib try $PYTHON setup.py install

unset OPENBLAS
unset BLAS
unset LAPACK
unset ATLAS
unset ACCELERATE

pop_env
}

Expand Down

0 comments on commit 36f8675

Please sign in to comment.