From 951d82b476dab239aa838c6f9c9c0408c33d1dd2 Mon Sep 17 00:00:00 2001 From: "staticfloat@gmail.com" Date: Tue, 8 May 2018 15:33:58 -0700 Subject: [PATCH 1/3] Just use all supported platforms --- build_tarballs.jl | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/build_tarballs.jl b/build_tarballs.jl index 684626b..22a8d50 100644 --- a/build_tarballs.jl +++ b/build_tarballs.jl @@ -63,16 +63,7 @@ make ${flags} PREFIX=$prefix install # These are the platforms we will build for by default, unless further # platforms are passed in on the command line. -platforms = [ - Windows(:i686), - Windows(:x86_64), - Linux(:i686, :glibc), - Linux(:x86_64, :glibc), - Linux(:aarch64, :glibc), - Linux(:armv7l, :glibc), - Linux(:powerpc64le, :glibc), - MacOS() -] +platforms = supported_platforms() # The products that we will ensure are always built products(prefix) = [ From dc15cde1883dd8dcde2b8188ec63e962bd39e685 Mon Sep 17 00:00:00 2001 From: "staticfloat@gmail.com" Date: Fri, 25 May 2018 13:06:18 -0700 Subject: [PATCH 2/3] Rename libraries appropriately for Julia compatibility --- build_tarballs.jl | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/build_tarballs.jl b/build_tarballs.jl index 22a8d50..6dfa27e 100644 --- a/build_tarballs.jl +++ b/build_tarballs.jl @@ -19,8 +19,12 @@ flags="${flags} OBJCONV=objconv" if [[ ${nbits} == 64 ]]; then # If we're building for a 64-bit platform, engage ILP64 - flags="${flags} INTERFACE64=1 SYMBOLSUFFIX=64_ LIBPREFIX=libopenblas64_" + LIBPREFIX=libopenblas64_ + flags="${flags} INTERFACE64=1 SYMBOLSUFFIX=64_" +else + LIBPREFIX=libopenblas fi +flags="${flags} LIBPREFIX=${LIBPREFIX}" # Set BINARY=32 on 32-bit platforms if [[ ${nbits} == 32 ]]; then @@ -52,13 +56,39 @@ elif [[ ${target} == powerpc64le-* ]]; then fi # Enter the fun zone -cd ${WORKSPACE}/srcdir/OpenBLAS-0.3.0/ +cd ${WORKSPACE}/srcdir/OpenBLAS-*/ # Build the library make ${flags} -j${nproc} # Install the library make ${flags} PREFIX=$prefix install + +# Force the library to be named the same as in Julia-land. +# Move things around, fix symlinks, and update install names/SONAMEs. +ls -la ${prefix}/lib +for f in ${prefix}/lib/libopenblas*p-r0*; do + name=${LIBPREFIX}.0.${f#*.} + + # Move this file to a julia-compatible name + mv -v ${f} ${prefix}/lib/${name} + + # If there were links that are now broken, fix 'em up + for l in $(find ${prefix}/lib -xtype l); do + if [[ $(basename $(readlink ${l})) == $(basename ${f}) ]]; then + ln -vsf ${name} ${l} + fi + done + + # If this file was a .so or .dylib, set its SONAME/install name + if [[ ${f} == *.so.* ]] || [[ ${f} == *.dylib ]]; then + if [[ ${target} == *linux* ]] || [[ ${target} == *freebsd* ]]; then + patchelf --set-soname ${name} ${prefix}/lib/${name} + elif [[ ${target} == *apple* ]]; then + install_name_tool -id ${name} ${prefix}/lib/${name} + fi + fi +done """ # These are the platforms we will build for by default, unless further @@ -67,7 +97,7 @@ platforms = supported_platforms() # The products that we will ensure are always built products(prefix) = [ - LibraryProduct(prefix, ["libopenblasp-r0", "libopenblas64_p-r0"], :libopenblas) + LibraryProduct(prefix, ["libopenblas", "libopenblas64_"], :libopenblas) ] # Dependencies that must be installed before this package can be built From 451f3520c22b09d18d23b29ac45fd507a5e4cdc8 Mon Sep 17 00:00:00 2001 From: "staticfloat@gmail.com" Date: Fri, 25 May 2018 15:08:32 -0700 Subject: [PATCH 3/3] Cut back on Travis testing since windows always times out --- .travis.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7324e62..3f5afa8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,13 +18,18 @@ env: # Our build takes too long for one job, so split targets across multiple jobs matrix: - TARGET=x86_64-linux-gnu - - TARGET=i686-linux-gnu - TARGET=aarch64-linux-gnu - - TARGET=arm-linux-gnueabihf - - TARGET=powerpc64le-linux-gnu - TARGET=x86_64-apple-darwin14 - - TARGET=x86_64-w64-mingw32 - - TARGET=i686-w64-mingw32 + + # Windows times out, even with sharding. Since we have to upload one, might as well upload + # them all, so to avoid wasting CI time, we just disable most of these, leaving only + # enough to make sure we aren't breaking something obvious when we push. + + # - TARGET=i686-linux-gnu + # - TARGET=arm-linux-gnueabihf + # - TARGET=powerpc64le-linux-gnu + # - TARGET=x86_64-w64-mingw32 + # - TARGET=i686-w64-mingw32 sudo: required jobs: