apache / mxnet

Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more
https://mxnet.apache.org
Apache License 2.0
20.79k stars 6.79k forks source link

emscripten emcmake failed #19098

Closed Yongle-Fu closed 4 years ago

Yongle-Fu commented 4 years ago

emcmake failed. emcmake cmake .. -DUSE_CUDA=0 -DUSE_OPENCV=0 -DUSE_OPENMP=0 -DUSE_CPP_PACKAGE=1

but without emcmake success. cmake .. -DUSE_CUDA=0 -DUSE_OPENCV=0 -DUSE_OPENMP=0 -DUSE_CPP_PACKAGE=1

emcmake cmake .. -DUSE_CUDA=0 -DUSE_OPENCV=0 -DUSE_OPENMP=0 -DUSE_CPP_PACKAGE=1 configure: cmake .. -DUSE_CUDA=0 -DUSE_OPENCV=0 -DUSE_OPENMP=0 -DUSE_CPP_PACKAGE=1 -DCMAKE_TOOLCHAIN_FILE=/path/to/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR="/path/to/emsdk/node/12.18.1_64bit/bin/node" -- CMAKE_CROSSCOMPILING TRUE -- CMAKE_HOST_SYSTEM_PROCESSOR x86_64 -- CMAKE_SYSTEM_PROCESSOR x86 -- CMAKE_SYSTEM_NAME Emscripten -- CMake version '3.18.2' using generator 'Unix Makefiles' -- Could NOT find MKL (missing: MKL_INCLUDE_DIR MKL_INTEL_LIBRARY MKL_INTEL_THREAD_LIBRARY MKL_CORE_LIBRARY IOMP_LIBRARY) -- Could not find OpenBLAS include. Turning OpenBLAS_FOUND off -- Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off CMake Error at cmake/Modules/FindOpenBLAS.cmake:82 (MESSAGE): Could not find OpenBLAS Call Stack (most recent call first): cmake/ChooseBlas.cmake:42 (find_package) CMakeLists.txt:303 (include)

-- Configuring incomplete, errors occurred! See also "/path/to/mxnet/build_emsdk/CMakeFiles/CMakeOutput.log".

github-actions[bot] commented 4 years ago

Welcome to Apache MXNet (incubating)! We are on a mission to democratize AI, and we are glad that you are contributing to it by opening this issue. Please make sure to include all the relevant context, and one of the @apache/mxnet-committers will be here shortly. If you are interested in contributing to our project, let us know! Also, be sure to check out our guide on contributing to MXNet and our development guides wiki.

szha commented 4 years ago

@Yongle-Fu it looks like when you use emcmake, the build system can't find a blas library. Which blas are you using?

Yongle-Fu commented 4 years ago

openblas 0.3.10_1 /usr/local/opt/openblas

szha commented 4 years ago

hmm it should have been found in this path https://github.com/apache/incubator-mxnet/blob/master/cmake/Modules/FindOpenBLAS.cmake#L29. What might be happening is that the emcmake wrapper didn't pass on the environment variables that helped you find openblas due to its choice of shebang. Try setting ${OpenBLAS_HOME} instead.

Yongle-Fu commented 4 years ago

resolved by add setting

IF(NOT OpenBLAS_LIB) set(OpenBLAS_INCLUDE_DIR "/usr/local/opt/openblas/include") set(OpenBLAS_LIB "/usr/local/opt/openblas/lib/libopenblas.dylib") ENDIF()