Skip to content

runtime/build: Install swig even without python#3874

Closed
doronbehar wants to merge 1 commit intognuradio:maint-3.8from
doronbehar:3.8/runtime/always-install-swig
Closed

runtime/build: Install swig even without python#3874
doronbehar wants to merge 1 commit intognuradio:maint-3.8from
doronbehar:3.8/runtime/always-install-swig

Conversation

@doronbehar
Copy link
Copy Markdown
Contributor

On NixOS, we noticed that if python-support is not enabled, many applications that depend on gnuradio-runtime fail to build. With this patch, swig files are always installed, regardless of whether python-support is enabled.

@doronbehar
Copy link
Copy Markdown
Contributor Author

3.7 backport: #3875

@jacobagilbert
Copy link
Copy Markdown
Contributor

Can you be more specific on the failures you are seeing?

@jacobagilbert jacobagilbert added Backport-3.8 Should be backported to 3.8 CMake and removed swig labels Oct 20, 2020
@doronbehar
Copy link
Copy Markdown
Contributor Author

Sure, for (3.7) with gr-osmosdr (with the last version of gr-osmosdr that supports 3.7):

gr-osmosdr> /build/gr-osmosdr/swig/osmosdr_swig.i:8: Error: Unable to find 'gnuradio.i'
gr-osmosdr> make[2]: *** [swig/CMakeFiles/osmosdr_swig_swig_2d0df.dir/build.make:117: swig/osmosdr_swig_swig_2d0df] Error 1
gr-osmosdr> make[2]: *** Deleting file 'swig/osmosdr_swig_swig_2d0df'
gr-osmosdr> make[1]: *** [CMakeFiles/Makefile2:358: swig/CMakeFiles/osmosdr_swig_swig_2d0df.dir/all] Error 2
gr-osmosdr> make[1]: *** Waiting for unfinished jobs....

@jacobagilbert
Copy link
Copy Markdown
Contributor

jacobagilbert commented Oct 20, 2020

It seems to me like the OOT should not be building swig related stuff at all if it is being built with -DENABLE_PYTHON=OFF

https://github.com/osmocom/gr-osmosdr/blob/gr3.7/CMakeLists.txt#L240

I wonder why its doing swig stuff at all... are you sure this is being passed into the OOT?

@mormj
Copy link
Copy Markdown
Contributor

mormj commented Oct 20, 2020

There should be no reason for swig if python is not enabled. Seems like this should be fixed on the OOT side

@doronbehar
Copy link
Copy Markdown
Contributor Author

Well if python and swig are available during build of gr-osmosdr, it assumes (righteously I suppose) that GNUradio was built with swig files as well. And, if I don't add python and swig to the build of gr-osmosdr, and I build it with a gnuradio without python support, it builds fine, as expected. Hence it means we should not enable python support for gr-osmosdr when it's built with a gnuradio without python support as well. I'll close this and the other PR as they are not justified indeed. Thanks for the feedback.

@doronbehar doronbehar closed this Oct 21, 2020
@doronbehar doronbehar mentioned this pull request Oct 21, 2020
10 tasks
@willcode willcode removed the Backport-3.8 Should be backported to 3.8 label Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants