Comments (7)
This seems to be a ABI linking error.
By default SoapySDR seems to do C++ linkage which is OK when you build both your application and Soapy with the same compiler and [std]libc++. As soon as these do not match (e.g. app with stdlibc++ and soapy with libc++, or different compiler versions) then there is an ABI mismatch.
I tried to work around this using soapy's C-API which helps because of the C-Linkage (which has more ABI guarantees):
See for example here. PRO: linkage isn't a problem anymore. CON: you have C-style resource management where there might be memory leaks and ASAN issues (N.B. we are investigating the latter).
from soapysdr.
Thanks!
Closing as it's not likely that we can work around (or even warn on) C++ ABI mismatch. But do comment and update if there is anything to improve here.
from soapysdr.
In the link I provided, there is a C++ wrapper around the C-API that makes builds between different compilers and [std]libc++ compatible. The path through the extern "C"
linkage works.
Maybe this could be integrated into SoapySDR?
Similarly, to detect these types and other CI-related issue, it might be worthwhile to incorporate something similar to this:
https://github.com/JuliaTelecom/SoapyLoopback
in the SoapySDR core. That would help debugging, unit tests, and fixing ASAN, UBSAN, and TSAN issues much easier IMO.
Maybe @guruofquality, @cjcliffe, and/or others who seemed to have worked a lot on this may help?
from soapysdr.
Avoiding the C++ ABI will of course help. We can't provide a compiled C++ wrapper since part of that solution is to build that wrapper with the ABI expectations of your projects.
On the other hand I had good success with these bugs in the past by methodically tracking down and avoiding risky API (on parts like polymorphism and implicit bahaviour).
But "dumbing down" the C++ API will likely be breaking.
from soapysdr.
Btw, the original error shows a safety feature in action: libc++ uses inline namespaces to help ensure that ABI incompatible types cannot be mistaken for one another; if an interface uses libc++ std::string directly a library expecting libstdc++ std::string will not link to the interface, because the actual symbols are different: std::string
vs. std::__1::string
.
The only way out of that incompatibility would be to forgo std::string -- not really an option for the C++ API.
from soapysdr.
@zuckschwerdt my proposal is not to forgo the C++ API but rather use an immediate C++ -> C-API (ABI backward/forward compatibility) -> C++ API between the user's application and soapy abstraction.
This is also used in other C++-based libraries, for example, libzmq to allow for non-C++ API bindings (Python, etc.).
from soapysdr.
but rather use an immediate C++ -> C-API (ABI backward/forward compatibility) -> C++ API
Understood. But that would have to be source and can't be provided with the Soapy lib (except maybe as a header-only thing).
from soapysdr.
Related Issues (20)
- Help with integrating SoapySDR into UHD
- PlutoSDR needs zeroconf to work HOT 2
- Problems importing SoapySDR at venv
- Icom ICR8600 driver
- I Need Help Searching for Open Source Software Stack for 3G
- "soapy=0/1/2/3/4..." definitions? HOT 4
- SoapySDR not finding airspy after updates to raspberry pi OS HOT 7
- SoapySDR::Device::readStream timeout! Rsp1 HOT 1
- SoapySDRUtil does not find RTL-SDR v4 HOT 3
- _SoapySDR.so / SoapySDRPYTHON_wrap.h reproducible builds issue HOT 1
- Module loading issue related to differences in dlopen default flags in macOS and linux HOT 7
- Soapy SDR No devices found HOT 9
- hackrf.h ### Example TX code utilizing the transfer and flush callbacks. HOT 2
- SoapyAirspy crashes when making device with log level SOAPY_SDR_DEBUG HOT 4
- Adding support for up/down converters
- soapy_power not working with a BladeRF HOT 10
- Ubuntu 22: Build python3-soapysdr for UHD 4.6 HOT 2
- ZMQ virtual radio driver HOT 1
- SoapySDR Python only connects to channel 0. HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from soapysdr.