pothosware / SoapySDR

Vendor and platform neutral SDR support library.
https://github.com/pothosware/SoapySDR/wiki
Boost Software License 1.0
1.09k stars 176 forks source link

_SoapySDR.so / SoapySDRPYTHON_wrap.h reproducible builds issue #428

Open bmwiedemann opened 6 months ago

bmwiedemann commented 6 months ago

While working on reproducible builds for openSUSE, I found that our soapy-sdr 0.8.1 build output can vary, unless we run non-parallel builds.

There is some race condition in the build-system about how the python and python3 files are created.

-/usr/src/debug/SoapySDR-soapy-sdr-0.8.1/build/python 0 (none) 40755 root root 0 4294967295
-/usr/src/debug/SoapySDR-soapy-sdr-0.8.1/build/python/CMakeFiles 0 (none) 40755 root root 0 4294967295
-/usr/src/debug/SoapySDR-soapy-sdr-0.8.1/build/python/CMakeFiles/_SoapySDR.dir 0 (none) 40755 root root 0 4294967295
-/usr/src/debug/SoapySDR-soapy-sdr-0.8.1/build/python/CMakeFiles/_SoapySDR.dir/SoapySDRPYTHON_wrap.cxx 0 (none) 100644 root root 0 4294967295
-/usr/src/debug/SoapySDR-soapy-sdr-0.8.1/build/python/CMakeFiles/_SoapySDR.dir/SoapySDRPYTHON_wrap.h 0 (none) 100644 root root 0 4294967295
+/usr/src/debug/SoapySDR-soapy-sdr-0.8.1/build/python3 0 (none) 40755 root root 0 4294967295
+/usr/src/debug/SoapySDR-soapy-sdr-0.8.1/build/python3/CMakeFiles 0 (none) 40755 root root 0 4294967295
+/usr/src/debug/SoapySDR-soapy-sdr-0.8.1/build/python3/CMakeFiles/SoapySDR3.dir 0 (none) 40755 root root 0 4294967295
+/usr/src/debug/SoapySDR-soapy-sdr-0.8.1/build/python3/CMakeFiles/SoapySDR3.dir/SoapySDRPYTHON_wrap.cxx 0 (none) 100644 root root 0 4294967295
+/usr/src/debug/SoapySDR-soapy-sdr-0.8.1/build/python3/CMakeFiles/SoapySDR3.dir/SoapySDRPYTHON_wrap.h 0 (none) 100644 root root 0 4294967295

Is there a way to always generate the python3 variant after the python one?

guruofquality commented 5 months ago

The swig/python directory should operate as its own CMake project

So once soapysdr the c++ library is built and installed, you can invoke swig/python/ in parallel to build against as many different python installations as needed

That what I had done for other build systems at least