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/08/11 01:29:00 UTC

[GitHub] [incubator-mxnet] Zha0q1 opened a new issue #18898: Static Build with OPENCV Linking Error

Zha0q1 opened a new issue #18898:
URL: https://github.com/apache/incubator-mxnet/issues/18898


   I used this cmake config
   ```
   set(CMAKE_BUILD_TYPE "Distribution" CACHE STRING "Build type")
   set(CFLAGS "-mno-avx" CACHE STRING "CFLAGS")
   set(CXXFLAGS "-mno-avx" CACHE STRING "CXXFLAGS")
   
   set(USE_CUDA OFF CACHE BOOL "Build with CUDA support")
   set(USE_OPENCV ON CACHE BOOL "Build with OpenCV support")
   set(USE_OPENMP ON CACHE BOOL "Build with Openmp support")
   set(USE_MKL_IF_AVAILABLE OFF CACHE BOOL "Use Intel MKL if found")
   set(USE_MKLDNN ON CACHE BOOL "Build with MKL-DNN support")
   set(USE_LAPACK OFF CACHE BOOL "Build with lapack support")
   set(USE_TVM_OP OFF CACHE BOOL "Enable use of TVM operator build system.")
   set(USE_SSE ON CACHE BOOL "Build with x86 SSE instruction support")
   set(USE_F16C OFF CACHE BOOL "Build with x86 F16C instruction support")
   set(USE_LIBJPEG_TURBO ON CACHE BOOL "Build with libjpeg-turbo")
   set(USE_DIST_KVSTORE ON CACHE BOOL "Build with DIST_KVSTORE support")
   
   set(USE_INT64_TENSOR_SIZE ON CACHE BOOL "Use int64_t to represent the total number of elements in a tensor")
   ```
   The compilation was successful but when importing mxnet this was the error message:
   ```
   OSError: /home/ubuntu/.local/mxnet/libmxnet.so: undefined symbol: _gfortran_concat_string
   ```
   Disabling opencv resolved the issue
   


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] leezu edited a comment on issue #18898: Static Build with OPENCV Linking Error

Posted by GitBox <gi...@apache.org>.
leezu edited a comment on issue #18898:
URL: https://github.com/apache/incubator-mxnet/issues/18898#issuecomment-672162202


   > I am building with ilp64 mkl 
   
   However you set `USE_MKL_IF_AVAILABLE OFF` and you didn't specify the `BLAS` option?
   
   If you build with mkl blas, mxnet will not depend on libgfortran. As you build opencv with a dependency on libgfortran and static link opencv, you need to manually specify the dependency on libgfortran. It would be better to use a consistent BLAS library when building OpenCV and MXNet, ie also use MKL for OpenCV


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] Zha0q1 edited a comment on issue #18898: Static Build with OPENCV Linking Error

Posted by GitBox <gi...@apache.org>.
Zha0q1 edited a comment on issue #18898:
URL: https://github.com/apache/incubator-mxnet/issues/18898#issuecomment-672107948


   > Is this on master or on your modified code?
   
   This is on master


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] Zha0q1 commented on issue #18898: Static Build with OPENCV Linking Error

Posted by GitBox <gi...@apache.org>.
Zha0q1 commented on issue #18898:
URL: https://github.com/apache/incubator-mxnet/issues/18898#issuecomment-672143328


   > Why do you turn `USE_LAPACK OFF`? 
   
   I am building with ilp64 mkl so lapack signatures are different. This is something I will work on fixing but for this build I turned it off.
   > Do you build via the tools/staticbuild/build.s?
   
   Yes. The build succeeded but I ran into that error at runtime


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] leezu commented on issue #18898: Static Build with OPENCV Linking Error

Posted by GitBox <gi...@apache.org>.
leezu commented on issue #18898:
URL: https://github.com/apache/incubator-mxnet/issues/18898#issuecomment-672120536


   Why do you turn `USE_LAPACK OFF`?


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] leezu commented on issue #18898: Static Build with OPENCV Linking Error

Posted by GitBox <gi...@apache.org>.
leezu commented on issue #18898:
URL: https://github.com/apache/incubator-mxnet/issues/18898#issuecomment-672088991


   Is this on master or on your modified code?


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] leezu edited a comment on issue #18898: Static Build with OPENCV Linking Error

Posted by GitBox <gi...@apache.org>.
leezu edited a comment on issue #18898:
URL: https://github.com/apache/incubator-mxnet/issues/18898#issuecomment-672120536


   Why do you turn `USE_LAPACK OFF`? Do you build via the `tools/staticbuild/build.s`? Otherwise the `Distribution` build type is not supported.


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] leezu edited a comment on issue #18898: Static Build with OPENCV Linking Error

Posted by GitBox <gi...@apache.org>.
leezu edited a comment on issue #18898:
URL: https://github.com/apache/incubator-mxnet/issues/18898#issuecomment-672162202


   > I am building with ilp64 mkl 
   
   However you set `USE_MKL_IF_AVAILABLE OFF` and you didn't specify the `BLAS` option. 
   
   If you build with mkl blas, mxnet will not depend on libgfortran. As you build opencv with a dependency on libgfortran and static link opencv, you need to manually specify the dependency on libgfortran. It would be better to use a consistent BLAS library when building OpenCV and MXNet, ie also use MKL for OpenCV


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] leezu commented on issue #18898: Static Build with OPENCV Linking Error

Posted by GitBox <gi...@apache.org>.
leezu commented on issue #18898:
URL: https://github.com/apache/incubator-mxnet/issues/18898#issuecomment-672162202


   > I am building with ilp64 mkl 
   
   However you set `USE_MKL_IF_AVAILABLE OFF` and you didn't specify the `BLAS` option


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] szha commented on issue #18898: Static Build with OPENCV Linking Error

Posted by GitBox <gi...@apache.org>.
szha commented on issue #18898:
URL: https://github.com/apache/incubator-mxnet/issues/18898#issuecomment-671731355


   Looks like the same issue as this? https://github.com/xianyi/OpenBLAS/issues/460


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] Zha0q1 commented on issue #18898: Static Build with OPENCV Linking Error

Posted by GitBox <gi...@apache.org>.
Zha0q1 commented on issue #18898:
URL: https://github.com/apache/incubator-mxnet/issues/18898#issuecomment-672423339


   
   > However you set `USE_MKL_IF_AVAILABLE OFF` and you didn't specify the `BLAS` option?
   
   Right, I overlooked this. But our cmake will still choose mkl as our choice of blas.
   
   > If you build with mkl blas, mxnet will not depend on libgfortran. As you build opencv with a dependency on libgfortran and static link opencv, you need to manually specify the dependency on libgfortran. It would be better to use a consistent BLAS library when building OpenCV and MXNet, ie also use MKL for OpenCV
   
   Thanks for the insight! As discussed offline we will be providing a fix to this


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] Zha0q1 commented on issue #18898: Static Build with OPENCV Linking Error

Posted by GitBox <gi...@apache.org>.
Zha0q1 commented on issue #18898:
URL: https://github.com/apache/incubator-mxnet/issues/18898#issuecomment-672107948


   > Is this on master or on your modified code?
   
   This is on Master


----------------------------------------------------------------
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