aldebaran / libqi-python

qiSDK python bindings
BSD 3-Clause "New" or "Revised" License
15 stars 10 forks source link

Error Building libqi-python for Windows: 'qi/[~4]' Package Not Resolved #28

Open jhonatanramires opened 3 months ago

jhonatanramires commented 3 months ago

Goal

I'm working on building libqi-python for Windows to expand its compatibility and make it more accessible for Windows users, particularly for NAO robot development.

Current Status

Steps Taken So Far

  1. Cloned the libqi-python repository running git clone --depth=1 --branch "master" https://github.com/aldebaran/libqi-python.
  2. Set up a Python virtual environment.
  3. Installed dependencies from the provided requirements.txt.
  4. Navigated to the project directory.
  5. run conan profile detect
  6. Attempted to install Conan dependencies using the command mentioned above.

Current Roadblock

When running the command:

conan install . --build=missing -c tools.build:skip_test=true

I encounter the following error:

ERROR: Package 'qi/[~4]' not resolved: Version range '~4' from requirement 'qi/[~4]' required by '' could not be resolved.

Questions

  1. How can I resolve the 'qi/[~4]' package not being found? Is there a specific version of qi I should be using or a particular Conan remote I need to add?
  2. Are there any Windows-specific configurations I need to set in Conan or CMake?
  3. How should I specify the Visual Studio toolchain in the build process?
  4. Are there any known issues with specific versions of dependencies on Windows?
  5. Is there any additional setup required for building libqi-python on Windows that isn't mentioned in the README?

Additional Information

System Information

Thank you for your time and assistance with this issue. Any guidance or pointers would be greatly appreciated!

nyibbang commented 3 months ago

Hello @jhonatanramires,

Sorry for the delay, I was absent the last few days.

How can I resolve the 'qi/[~4]' package not being found? Is there a specific version of qi I should be using or a particular Conan remote I need to add?

libqi-python needs libqi. You need to clone libqi and then export the project recipe into your Conan cache, so that Conan may know how to build it. You can clone the libqi project in a local directory, checkout one of the qi-framework-v4.xxx tags then export it with the command conan export <libqi_path>.

Are there any Windows-specific configurations I need to set in Conan or CMake?

No, not that I know of, but I haven't really tested it. You might be our first tester here !

How should I specify the Visual Studio toolchain in the build process?

I think Conan can generate the appropriate CMake toolchain so that it points to your Visual Studio toolchain. That's my hypothesis anyway.

Are there any known issues with specific versions of dependencies on Windows?

Not that I know of.

Is there any additional setup required for building libqi-python on Windows that isn't mentioned in the README?

There might be additional steps regarding the build of a wheel for Windows, especially about shared libraries (DLL) that need to be embedded in the wheel. On Linux, this is done by the auditwheel Python module, and on MacOS, this is done by the delocate module. But there is no module for this on Windows.