You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks to all the contributors for this great work. I am planning to use the NNabla C++ API for personal projects. However, I’ve encountered some compilation issues and potential enhancements.
First, when trying to compile NNabla from source, I encountered an error when the CMake flags BUILD_CPP_UTILS = ON and option(BUILD_PYTHON_PACKAGE "Build Python package" ON) are set (everything works fine when both flags are set to BUILD_CPP_UTILS = OFF and BUILD_PYTHON_PACKAGE = OFF). My setup configuration is as follows:
Ninja 1.12.1
CMake 3.29.0-rc-2
MSVC 19.40.33808.0
Visual Studio 17 2022
Windows 11
Enhancement
While trying to integrate NNabla with CPM, I used the following script placed in my CMake module path:
Everything works except for one issue. Since the NNabla CMakeLists.txt will be included by the main project's CMakeLists.txt, all CMake variables and paths will be referred to in the context of the main project. The use of ${CMAKE_SOURCE_DIR} in NNabla creates conflicts because CMake will generate the required third-party directories and includes with respect to the main project, not with respect to the NNabla tree.
This leads to errors like: "file <Eigen/Dense> .." I recommend changing ${CMAKE_SOURCE_DIR} to ${CMAKE_CURRENT_SOURCE_DIR}reference in all files.
Additionally, change the following line (Line 28) in CMakeLists.txt: Line 28
to ${CMAKE_CURRENT_SOURCE_DIR}/../../build-tools/cmake/utf8_to_utf16.py
This will make it build by any project either using CPM or "add_subdiractory()", in cmake
This change will make it build with any project, whether using CPM or add_subdirectory() in CMake.
This is the error that is triggered when building with the CPP utils flag on.
Updating C:\Users\chiha\OneDrive\Documents\nnabla-master\python/src/nnabla/_version.py.
Updating C:\Users\chiha\OneDrive\Documents\nnabla-master\src/nbla/version.cpp.
Error renaming from "C:/Users/chiha/OneDrive/Documents/nnabla-master/third_party/flatc" to "C:/Users/chiha/OneDrive/Documents/nnabla-master/third_party/flatc_mac": No error
Error renaming from "C:/Users/chiha/OneDrive/Documents/nnabla-master/third_party/flatc" to "C:/Users/chiha/OneDrive/Documents/nnabla-master/third_party/flatc_linux": No error
Error renaming from "C:/Users/chiha/OneDrive/Documents/nnabla-master/third_party/flatc.exe" to "C:/Users/chiha/OneDrive/Documents/nnabla-master/third_party/flatc_windows.exe": No error
CMake Error at C:/Program Files/CMake/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find LibArchive (missing: LibArchive_LIBRARY
LibArchive_INCLUDE_DIR)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.29/Modules/FindLibArchive.cmake:67 (find_package_handle_standard_args)
src/nbla_utils/CMakeLists.txt:85 (find_package)
This error is triggered during the Python generation process when the "BUILD_PYTHON_PACKAGE" flag is enabled.
[18/18] Cythonizing C:\Users\chiha\OneDrive\Documents\nnabla-master\python\src\nnabla\utils/dlpack.pyx
C:\Users\chiha\AppData\Roaming\Python\Python311\site-packages\setuptools\__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!
********************************************************************************
Requirements should be satisfied by a PEP 517 installer.
If you are using pip, you can try `pip install --use-pep517`.
********************************************************************************
!!
dist.fetch_build_eggs(dist.setup_requires)
cl : Command line warning D9025 : overriding '/W3' with '/W0'
_variable.cpp
C:\Users\chiha\AppData\Local\Programs\Python\Python311\Lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
C:\Users\chiha\OneDrive\Documents\nnabla-master\python\src\nnabla\_variable.cpp(20953): error C2106: '=': left operand must be l-value
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.40.33807\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
ninja: build stopped: subcommand failed.
i will try, to figure out how to solve it on windows, and test on unix based system potentially, and post the answer here.
The text was updated successfully, but these errors were encountered:
Hi, thanks to all the contributors for this great work. I am planning to use the NNabla C++ API for personal projects. However, I’ve encountered some compilation issues and potential enhancements.
First, when trying to compile NNabla from source, I encountered an error when the CMake flags
BUILD_CPP_UTILS = ON
andoption(BUILD_PYTHON_PACKAGE "Build Python package" ON)
are set (everything works fine when both flags are set toBUILD_CPP_UTILS = OFF
andBUILD_PYTHON_PACKAGE = OFF
). My setup configuration is as follows:Enhancement
While trying to integrate NNabla with CPM, I used the following script placed in my CMake module path:
Everything works except for one issue. Since the NNabla
CMakeLists.txt
will be included by the main project'sCMakeLists.txt
, all CMake variables and paths will be referred to in the context of the main project. The use of${CMAKE_SOURCE_DIR}
in NNabla creates conflicts because CMake will generate the required third-party directories and includes with respect to the main project, not with respect to the NNabla tree.This leads to errors like: "file <Eigen/Dense> .." I recommend changing
${CMAKE_SOURCE_DIR}
to${CMAKE_CURRENT_SOURCE_DIR}
reference in all files.Additionally, change the following line (Line 28) in
CMakeLists.txt
: Line 28to
${CMAKE_CURRENT_SOURCE_DIR}/../../build-tools/cmake/utf8_to_utf16.py
This will make it build by any project either using CPM or "add_subdiractory()", in cmake
This change will make it build with any project, whether using CPM or add_subdirectory() in CMake.
This is the error that is triggered when building with the CPP utils flag on.
This error is triggered during the Python generation process when the "BUILD_PYTHON_PACKAGE" flag is enabled.
i will try, to figure out how to solve it on windows, and test on unix based system potentially, and post the answer here.
The text was updated successfully, but these errors were encountered: