CarlosYeverino opened a new issue #13248: Cannot compile a cpp predictor including the library c_predict_api.h URL: https://github.com/apache/incubator-mxnet/issues/13248 Hi all, I successfully installed mxnet by: ``` git clone --recursive https://github.com/apache/incubator-mxnet.git cd incubator-mxnet make -j $(nproc) USE_OPENCV=1 USE_BLAS=openblas USE_CUDA=1 USE_CUDA_PATH=/usr/local/cuda USE_CUDNN=1 USE_CPP_PACKAGE=1 ``` Now I want to create a cpp predictor that includes the library c_predict_api.h, however, when I compile the the program I got the following error: ``` carlos@carlos-ubuntu:~/Documents/git/torcs_dl/doc/deep_driving_project/target/Mastercomponent/build$ cmake .. -- Using these message generators: gencpp;genlisp;genpy -- Configuring done -- Generating done -- Build files have been written to: /home/carlos/Documents/git/torcs_dl/doc/deep_driving_project/target/Mastercomponent/build carlos@carlos-ubuntu:~/Documents/git/torcs_dl/doc/deep_driving_project/target/Mastercomponent/build$ make [ 25%] Linking CXX static library libdp_mastercomponent.a [ 25%] Built target dp_mastercomponent [ 50%] Linking CXX static library libRosAdapter_dp_mastercomponent.a [ 50%] Built target RosAdapter_dp_mastercomponent [ 75%] Building CXX object dp_mastercomponent/coordinator/CMakeFiles/Coordinator_dp_mastercomponent.dir/Coordinator_dp_mastercomponent.cpp.o In file included from /home/carlos/Documents/git/torcs_dl/doc/deep_driving_project/target/Mastercomponent/dp_mastercomponent/cpp/dp_mastercomponent_dpnet.h:7:0, from /home/carlos/Documents/git/torcs_dl/doc/deep_driving_project/target/Mastercomponent/dp_mastercomponent/cpp/dp_mastercomponent.h:7, from /home/carlos/Documents/git/torcs_dl/doc/deep_driving_project/target/Mastercomponent/dp_mastercomponent/coordinator/IAdapter_dp_mastercomponent.h:2, from /home/carlos/Documents/git/torcs_dl/doc/deep_driving_project/target/Mastercomponent/dp_mastercomponent/coordinator/Coordinator_dp_mastercomponent.cpp:6: /home/carlos/Documents/git/torcs_dl/doc/deep_driving_project/target/Mastercomponent/dp_mastercomponent/cpp/CNNPredictor_dp_mastercomponent_dpnet.h:4:33: fatal error: mxnet/c_predict_api.h: No such file or directory compilation terminated. dp_mastercomponent/coordinator/CMakeFiles/Coordinator_dp_mastercomponent.dir/build.make:62: recipe for target 'dp_mastercomponent/coordinator/CMakeFiles/Coordinator_dp_mastercomponent.dir/Coordinator_dp_mastercomponent.cpp.o' failed make[2]: *** [dp_mastercomponent/coordinator/CMakeFiles/Coordinator_dp_mastercomponent.dir/Coordinator_dp_mastercomponent.cpp.o] Error 1 CMakeFiles/Makefile2:128: recipe for target 'dp_mastercomponent/coordinator/CMakeFiles/Coordinator_dp_mastercomponent.dir/all' failed make[1]: *** [dp_mastercomponent/coordinator/CMakeFiles/Coordinator_dp_mastercomponent.dir/all] Error 2 Makefile:83: recipe for target 'all' failed ``` Then I added the path /incubator-mxnet/lib to LD_LIBRARY_PATH in ~/.bashrc and now I get the follofing output for LD_LIBRARY_PATH: ``` carlos@carlos-ubuntu:~/Documents/git/torcs_dl/doc/deep_driving_project/target/Mastercomponent/build$ echo $LD_LIBRARY_PATH /usr/local/lib:/home/carlos/Documents/git/incubator-mxnet/lib ``` However, this did not solve the issue. This is why I have in the CMakeLists.txt related to mxnet: `set(LIBS ${LIBS} mxnet)` I also can see the following in build/dp_mastercomponent/cpp/dp_mastercomponent.cmake: `INTERFACE_LINK_LIBRARIES "/usr/lib/x86_64-linux-gnu/libarmadillo.so;mxnet"` **What is the proper way to make MXNet visible to the cpp predictor?**
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
