-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[cmake][cpp-package] Building with cmake does not install the cpp-package API #12849
Comments
Hi, Ensure that the MXNet shared library is built from source with the USE_CPP_PACKAGE = 1. While building the program, ensure that the correct paths to the directories containing header files and MXNet shared library are specified. Typically, paths to the following directories in the MXNet respository would be needed. The 'incubator-mxnet' in following path is a directory where MXNet Github repository is cloned (recursively.) The program links the MXNet shared library dynamically. Hence the library needs to be accessible to the program during runtime. This can be achieved by including the path to the shared library in the environment variable LD_LIBRARY_PATH for Linux, Mac. and Ubuntu OS and PATH for Windows OS. Please note that the cpp-package API are not standalone API yet. The MXNet sources are needed to be accessible while building the program that intends to use cpp-package API. Please refer to Makefile in cpp-package/example directory. I hope this helps. |
@mxnet-label-bot please add [c++, installation] |
Hi, Is my interpretation correct? Is it possible to provide the complete CMake functionality? Thanks. |
@inglada I am not very expert on CMake or how it is used in this repo. Someone from @mxnet-jenkins team might be able to answer. @marcoabreu would you be able to answer above question? |
The cmake build can be considered as 'true' and should be used instead of make whenever possible. Currently, it's not supported only for 1 case: cross-compilation with CUDA, for example for Jetson. The fact that installing does not include the nessesary files probably should be fixed in CMakeLists.txt |
@inglada Please let us know if you were able to build cpp-package using CMakefiles so that we can close this issue. |
@mxnet-label-bot add [Pending Requester Info] |
@leleamol I did not go further on this. Since "make install" does not install the C++ package (only the C one) I need to add this in the CMakeLists.txt of the client projects: include_directories(${MXNET_SOURCE_DIR}/include) But it's been I while since I last tried. |
@inglada Thanks for the update. |
Hi,
I have successfully built mxnet from sources on Debian stretch using cmake. The cpp-package is correctly built. However, the "make install" step only installs the library and the header files for the C API, but not the ones for the cpp-package.
Thanks.
The text was updated successfully, but these errors were encountered: