operon icon indicating copy to clipboard operation
operon copied to clipboard

building operon

Open yanbing777 opened this issue 2 years ago • 7 comments

I am completely new to this, I followed your document step by step and when I did the 'make -j pyoperon' step at the end, I got this error, can you please tell me what is the reason? THANKS a lot!!!

image

  • Build command

mkdir build && cd build cmake .. -G "Visual Studio 15 2017" -A x64 -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_PYBIND=ON -DUSE_OPENLIBM=ON -DUSE_SINGLE_PRECISION=ON -DCERES_TINY_SOLVER=ON make -j pyoperon

yanbing777 avatar Dec 06 '21 11:12 yanbing777

Hi, it seems like the pyoperon target is not generated by CMake. Could you post the whole output of the cmake command?

foolnotion avatar Dec 06 '21 12:12 foolnotion

Hi, it seems like the pyoperon target is not generated by CMake. Could you post the whole output of the cmake command?

Thanks for your reply, here is my whole output,what I should do?

image

yanbing777 avatar Dec 06 '21 13:12 yanbing777

Hi,

I think you are missing the Python libraries which are necessary to build the python module. Normally, CMake should find them and display something like this:

-- Found Python3: /nix/store/k3agmx8hndsfd68cal0m9qc9dnbvfq1i-python3-3.9.6-env/bin/python3.9 (found version "3.9.6") found components: Development Interpreter Development.Module Development.Embed 

Possibly you need to install Python3 via vcpkg install Python3:x64-windows or similar. Apologies, this should have been mentioned in the documentation.

foolnotion avatar Dec 06 '21 13:12 foolnotion

Thanks a lot. I tried your suggestion, but vcpkg tells me Python3:x64-windows already exists, image

I tried adding my python path to cmake, however the problem still exists image image

yanbing777 avatar Dec 06 '21 13:12 yanbing777

To rule out this cause could you make the following change to the CMakeLists.txt file and then re-run cmake?

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 27e5746..f2eceb6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,7 +40,7 @@ set_package_properties(doctest PROPERTIES TYPE OPTIONAL) # unit tests
 set_package_properties(cxxopts PROPERTIES TYPE OPTIONAL) # command-line parser
 
 # python binding
-set_package_properties(Python3 PROPERTIES TYPE OPTIONAL)
+set_package_properties(Python3 PROPERTIES TYPE REQUIRED)
 set_package_properties(pybind11 PROPERTIES TYPE OPTIONAL)
 
 # get revision information from git

This way, if there is a bug in the Python3 port and for some reason CMake can't find it, then it will throw an error.

foolnotion avatar Dec 06 '21 14:12 foolnotion

According to your suggestion, I modified the CMakeLists.txt file, not sure if the changes are correct image the output is as follows(┯_┯) image

yanbing777 avatar Dec 07 '21 01:12 yanbing777

I made a few more attempts, and this time CMake should find python3 But the problem still exists(┯_┯) image

yanbing777 avatar Dec 07 '21 11:12 yanbing777

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Jul 27 '23 01:07 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Aug 10 '23 01:08 github-actions[bot]