You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/02/06 23:37:35 UTC

[GitHub] [incubator-mxnet] leezu commented on a change in pull request #17448: cmake: staticbuild for binary distribution

leezu commented on a change in pull request #17448: cmake: staticbuild for binary distribution
URL: https://github.com/apache/incubator-mxnet/pull/17448#discussion_r376142791
 
 

 ##########
 File path: tools/dependencies/openblas.sh
 ##########
 @@ -33,12 +34,24 @@ if [[ ! -e $DEPS_PATH/lib/libopenblas.a ]]; then
 
     # Adding NO_DYNAMIC=1 flag causes make install to fail
     $MAKE DYNAMIC_ARCH=1 USE_OPENMP=1
+
+    if [[ -v CMAKE_STATICBUILD ]]; then
+        # We link and redistribute libopenblas.so for cmake staticbuild
+        # cf https://gitlab.kitware.com/cmake/cmake/issues/16221#note_143330
+        patchelf --set-rpath '$ORIGIN' --force-rpath libopenblas.so
 
 Review comment:
   The outcome is equivalent and the current solution is easier to support in cmake, as `libopenblas.so` declares it's dependencies correctly unlike `.a` files.
   
   We could reconsider after fixing https://gitlab.kitware.com/cmake/cmake/issues/16221

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services