Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source build failure on Windows for UHD 4.5.0.0 when building with Python API and SIM #708

Open
icyveins7 opened this issue Oct 19, 2023 · 0 comments

Comments

@icyveins7
Copy link
Contributor

icyveins7 commented Oct 19, 2023

Issue Description

When building UHD 4.5.0.0 from source (downloading the source from Releases directly) and enabling the LibUHD - Python API and SIM (i.e. simulator), the build fails when processing host\build\python\simulator\usrp_mpm.vcxproj. Internally, this calls a setup.py from host\build\python\simulator, which incorrectly parses the package_dir value in the dictionary.

In my case, this resulted in the path being written as

'E:/uhd-4.5.0.0/host/build/python/simulator'

which caused MSVC to interpret the path with the escaped characters, causing the following error:

error : package directory 'E:uhd-4.5.0.0\host\build\python\simulator\usrp_mpm' does not exist

Note the missing backslash after the drive letter.

Setup Details

UHD 4.5.0.0 source build (downloaded from Releases page of github)
Windows 10
Visual Studio 2022
CMake 3.27.7
Python 3.11 (Built with a virtual environment interpreter)

Expected Behavior

Build should succeed.

Actual Behaviour

Error when processing host\build\python\simulator\usrp_mpm.vcxproj.

error : package directory 'E:uhd-4.5.0.0\host\build\python\simulator\usrp_mpm' does not exist

Steps to reproduce the problem

CMake as usual. Enable Python API during CMake.
Build.

Additional Information

The fix for this was simple: I changed my line in host\build\python\simulator\setup.py from

package_dir={'': 'E:/uhd-4.5.0.0/host/build/python/simulator'},

to

package_dir={'': r'E:\uhd-4.5.0.0\host\build\python\simulator'},

This is odd, because in the parent folder, the host\build\python\setup.py file does it correctly:

package_dir={'': r'E:\uhd-4.5.0.0\host\build\python'},
@icyveins7 icyveins7 changed the title Source build failure on Windows for UHD 4.5.0.0 when building with Python API Source build failure on Windows for UHD 4.5.0.0 when building with Python API and SIM Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants