Skip to content

Commit

Permalink
Fix build for OpenBLAS on Mac OS X
Browse files Browse the repository at this point in the history
  • Loading branch information
saudet committed Nov 21, 2019
1 parent 95a37bf commit 0a3bf1a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
15 changes: 15 additions & 0 deletions openblas/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,21 @@
<goal>build</goal>
</goals>
</execution>
<execution>
<id>javacpp-postbuild</id>
<phase>process-classes</phase>
<goals>
<goal>build</goal>
</goals>
<configuration>
<skip>${javacpp.compiler.skip}</skip>
<buildCommand>
<program>bash</program>
<argument>${project.basedir}/postbuild.sh</argument>
</buildCommand>
<workingDirectory>${project.basedir}</workingDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
Expand Down
11 changes: 11 additions & 0 deletions openblas/postbuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
# Fix GCC library incorrectly linking for rpath on Mac
for VER in 5 6 7 8 9; do
for LIB in libopenblas.0.dylib libjniopenblas.dylib; do
LIBFILE=target/native/org/bytedeco/openblas/macosx-x86_64/$LIB
if [[ -f $LIBFILE ]]; then
echo Fixing $LIBFILE
install_name_tool -change /usr/local/lib/gcc/$VER/libgcc_s.1.dylib @rpath/libgcc_s.1.dylib $LIBFILE
fi
done
done

0 comments on commit 0a3bf1a

Please sign in to comment.