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

How to build & install SoapySDR on Windows? #446

Open
eabase opened this issue Feb 12, 2025 · 10 comments
Open

How to build & install SoapySDR on Windows? #446

eabase opened this issue Feb 12, 2025 · 10 comments

Comments

@eabase
Copy link

eabase commented Feb 12, 2025

Looking at the page:
https://github.com/pothosware/SoapySDR/wiki/BuildGuide

Say that:

add C:\Program Files\SoapySDR\bin to the %PATH%

But:
cmake --build my_build_dir --config Release --target install

actually installs into the x86 directory:
C:\Program Files (x86)\SoapySDR

How to build SoapySDR on Windows?

What is the optional swig dependency used for?
(How should that be installed?)

I also suggest to fix these to prevent deprecation warnings:

# grep "cmake_minimum_required" CMakeLists.txt

ExampleDriver/CMakeLists.txt:5:cmake_minimum_required(VERSION 2.6)
luajit/CMakeLists.txt:4:cmake_minimum_required(VERSION 3.1.0)
swig/csharp/apps/CMakeLists.txt:1:cmake_minimum_required(VERSION 3.3.0)
swig/python/CMakeLists.txt:4:cmake_minimum_required(VERSION 3.3)
CMakeLists.txt:4:cmake_minimum_required(VERSION 3.3.0)
@eabase
Copy link
Author

eabase commented Feb 13, 2025

BUMP

How do install the python package after compilation?
(Where is it?)

Seem #442 could be of interest as well.

@eabase
Copy link
Author

eabase commented Feb 24, 2025

Ok, managed to build the optional SoapyRTLSDR, here:
pothosware/SoapyRTLSDR#79

Sort of works...but need more testing. (How?)

Does anyone, know how I can test this?

@zuckschwerdt
Copy link
Member

rx_sdr from https://github.com/rxseger/rx_tools should work as test tool for any SoapySDR module.

@eabase
Copy link
Author

eabase commented Feb 25, 2025

They don't have any binary releases and the compile fails. 💩
rxseger/rx_tools#105

@eabase
Copy link
Author

eabase commented Feb 25, 2025

BTW. Where exactly is the code that does the Python package installation?

@zuckschwerdt
Copy link
Member

Where exactly is the code that does the Python package installation?

install(
TARGETS ${SWIG_MODULE_SoapySDR${PYTHON_VERSION}_REAL_NAME}
DESTINATION ${PYTHON_INSTALL_DIR}
)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/SoapySDR.py
DESTINATION ${PYTHON_INSTALL_DIR}
)

@eabase
Copy link
Author

eabase commented Feb 26, 2025

@zuckschwerdt
That is not very helpful.

How and where do I do pip install ... to get this package to show up in my pip list?

@zuckschwerdt
Copy link
Member

I don't think that SoapySDR is on pypi, so no pip. You just get the swig module and wrapper .py installed to the Python dir.

@eabase
Copy link
Author

eabase commented Feb 26, 2025

You just get the swig module and wrapper .py installed to the Python dir.

That's not how it works AFAIK. So how would you import into your python code? If it's not available by the package manager, you can't import (as you suggest in all the example code), with import SoapySDR.

If it's not in pypi, you would (typically) just go to the project directory and do pip install . But that require that you have at least the minimal setup.py (and setup.cfg) and/or pyproject.toml files configured. And you guys don't have any!

@zuckschwerdt
Copy link
Member

I didn't write any (Python) example code, sorry. I never used the Python bindings. To my understanding you can either install a package from a registry (pypi) or local source (setup.py) -- or just dump the files somewhere into Python's search path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants