Skip to content

Commit

Permalink
Fix HDF5, OpenBLAS, and OpenCV builds on linux-armhf, linux-x86, …
Browse files Browse the repository at this point in the history
…and `windows-x86` platforms
  • Loading branch information
saudet committed Nov 14, 2016
1 parent a09ac28 commit 531acf0
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 13 deletions.
4 changes: 2 additions & 2 deletions hdf5/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ We can use [Maven 3](http://maven.apache.org/) to download and install automatic
<modelVersion>4.0.0</modelVersion>
<groupId>org.bytedeco.javacpp-presets.hdf5</groupId>
<artifactId>H5tutrCmprss</artifactId>
<version>1.2.5-SNAPSHOT</version>
<version>1.2</version>
<properties>
<exec.mainClass>H5tutrCmprss</exec.mainClass>
</properties>
<dependencies>
<dependency>
<groupId>org.bytedeco.javacpp-presets</groupId>
<artifactId>hdf5</artifactId>
<version>1.10.0-patch1-1.2.5-SNAPSHOT</version>
<version>1.10.0-patch1-1.2</version>
</dependency>
</dependencies>
</project>
Expand Down
11 changes: 6 additions & 5 deletions hdf5/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ case $PLATFORM in
# make -j $MAKEJ
# make install-strip
# ;;
linux-x86)
./configure --prefix=$INSTALL_PATH CC="$OLDCC -m32" CXX="$OLDCXX -m32" --enable-cxx
make -j $MAKEJ
make install-strip
;;
# linux-armhf)
# ./configure --prefix=$INSTALL_PATH --host="arm-linux-gnueabihf" CC="arm-linux-gnueabihf-gcc" CXX="arm-linux-gnueabihf-g++" --enable-cxx
# make -j $MAKEJ
# make install-strip
# ;;
linux-x86)
./configure --prefix=$INSTALL_PATH CC="$OLDCC -m32" CXX="$OLDCXX -m32" --enable-cxx
make -j $MAKEJ
make install-strip
;;
linux-x86_64)
./configure --prefix=$INSTALL_PATH CC="$OLDCC -m64" CXX="$OLDCXX -m64" --enable-cxx
make -j $MAKEJ
Expand All @@ -52,6 +52,7 @@ case $PLATFORM in
make install-strip
;;
macosx-*)
patch -Np1 < ../../../hdf5-$HDF5_VERSION-macosx.patch
./configure --prefix=$INSTALL_PATH --enable-cxx
make -j $MAKEJ
make install-strip
Expand Down
45 changes: 45 additions & 0 deletions hdf5/hdf5-1.10.0-patch1-macosx.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
diff -ruN hdf5-1.10.0-patch1/configure hdf5-1.10.0-patch1-macosx/configure
--- hdf5-1.10.0-patch1/configure 2016-05-19 04:06:24.000000000 +0900
+++ hdf5-1.10.0-patch1-macosx/configure 2016-11-13 18:25:13.411194861 +0900
@@ -16070,9 +16070,9 @@
esac
if test yes = "$_lt_dar_can_shared"; then
output_verbose_link_cmd=func_echo_all
- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
- archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+ archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"

else
@@ -19243,13 +19243,13 @@
esac
if test yes = "$_lt_dar_can_shared"; then
output_verbose_link_cmd=func_echo_all
- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
- archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+ archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
if test yes != "$lt_cv_apple_cc_single_mod"; then
- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
- archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
+ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name @rpath/\$soname \$verstring$_lt_dsymutil"
+ archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name @rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
fi

else
@@ -23420,9 +23420,9 @@
esac
if test yes = "$_lt_dar_can_shared"; then
output_verbose_link_cmd=func_echo_all
- archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+ archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
module_cmds_FC="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
- archive_expsym_cmds_FC="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+ archive_expsym_cmds_FC="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
module_expsym_cmds_FC="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"

else
4 changes: 2 additions & 2 deletions openblas/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ We can use [Maven 3](http://maven.apache.org/) to download and install automatic
<modelVersion>4.0.0</modelVersion>
<groupId>org.bytedeco.javacpp-presets.openblas</groupId>
<artifactId>openblas</artifactId>
<version>1.2.5-SNAPSHOT</version>
<version>1.2</version>
<properties>
<exec.mainClass>ExampleDGELSrowmajor</exec.mainClass>
</properties>
<dependencies>
<dependency>
<groupId>org.bytedeco.javacpp-presets</groupId>
<artifactId>openblas</artifactId>
<version>0.2.19-1.2.5-SNAPSHOT</version>
<version>0.2.19-1.2</version>
</dependency>
</dependencies>
</project>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@
"mkl_intel_thread", "mkl_rt", "mkl_rt#openblas@.0", "gcc_s@.1", "gomp@.1", "quadmath@.0", "gfortran@.3"}, compiler = "fastfpu"),
@Platform(value = "android", include = {"openblas_config.h", "cblas.h", "blas_extra.h" /* no LAPACK */}, link = "openblas", preload = "", compiler = "fastfpu"),
@Platform(value = "windows", preload = {"libiomp5md", "mkl_avx", "mkl_avx2", "mkl_avx512_mic", "mkl_def", "mkl_mc3", "mkl_core", "mkl_gnu_thread", "mkl_intel_lp64",
"mkl_intel_thread", "mkl_rt", "mkl_rt#libopenblas", "libwinpthread-1", "libgcc_s_seh-1", "libgomp-1", "libstdc++-6", "libquadmath-0", "libgfortran-3", "libopenblas"}),
"mkl_intel_thread", "mkl_rt", "mkl_rt#libopenblas", "libwinpthread-1", "libgcc_s_dw2-1", "libgcc_s_seh-1", "libgomp-1",
"libstdc++-6", "libquadmath-0", "libgfortran-3", "libopenblas"}),
@Platform(value = "linux", preloadpath = {"/usr/lib/", "/usr/lib32/", "/usr/lib64/"}),
@Platform(value = "linux-x86", preloadpath = {"/usr/lib32/", "/usr/lib/"}),
@Platform(value = "linux-x86_64", preloadpath = {"/usr/lib64/", "/usr/lib/"}),
@Platform(value = "linux-armhf", preloadpath = {"/usr/arm-linux-gnueabihf/lib/", "/usr/lib/", "/usr/lib32/", "/usr/lib64/"}),
@Platform(value = "linux-x86", preloadpath = {"/lib32/", "/lib/", "/usr/lib32/", "/usr/lib/"}),
@Platform(value = "linux-x86_64", preloadpath = {"/lib64/", "/lib/", "/usr/lib64/", "/usr/lib/"}),
@Platform(value = "linux-ppc64", preloadpath = {"/usr/lib/powerpc64-linux-gnu/", "/usr/lib/powerpc64le-linux-gnu/"}),
@Platform(value = "macosx-x86_64", preloadpath = {"/usr/local/lib/", "/usr/local/opt/gcc5/lib/gcc/5/", "/usr/local/opt/gcc/lib/gcc/6/"}),
@Platform(value = "windows-x86", preloadpath = {"C:/msys64/mingw32/bin/"}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"<opencv2/core/utility.hpp>", "<opencv2/core/types_c.h>", "<opencv2/core/core_c.h>", "<opencv2/core/types.hpp>",
"<opencv2/core.hpp>", "<opencv2/core/operations.hpp>", "<opencv2/core/bufferpool.hpp>", "<opencv2/core/mat.hpp>",
"<opencv2/core/persistence.hpp>", "<opencv2/core/optim.hpp>", "opencv_adapters.h"}, link = {"opencv_core@.3.1", "opencv_imgproc@.3.1"}),
@Platform(value = "linux", preloadpath = "/usr/lib/", preload = "gomp@.1"),
@Platform(value = "linux", preloadpath = {"/usr/lib/", "/usr/lib32/", "/usr/lib64/"}, preload = "gomp@.1"),
@Platform(value = "linux-armhf", preloadpath = {"/usr/arm-linux-gnueabihf/lib/", "/usr/lib/", "/usr/lib32/", "/usr/lib64/"}),
@Platform(value = "linux-x86", preloadpath = {"/usr/lib32/", "/usr/lib/"}),
@Platform(value = "linux-x86_64", preloadpath = {"/usr/lib64/", "/usr/lib/"}),
@Platform(value = "linux-ppc64", preloadpath = {"/usr/lib/powerpc64-linux-gnu/", "/usr/lib/powerpc64le-linux-gnu/"}),
Expand Down

0 comments on commit 531acf0

Please sign in to comment.