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

gnuradio-blocks should not link publicly to libsndfile #6109

Closed
ryanvolz opened this issue Aug 22, 2022 · 1 comment · Fixed by #6178
Closed

gnuradio-blocks should not link publicly to libsndfile #6109

ryanvolz opened this issue Aug 22, 2022 · 1 comment · Fixed by #6178

Comments

@ryanvolz
Copy link
Contributor

What happened?

GNSS-SDR links to gnuradio-blocks, and consuming the existing gnuradio::gnuradio-blocks CMake target requires the downstream library (GNSS-SDR) to link against libsndfile and thus have it as a dependency. This shouldn't be the case, because the use of libsndfile is (as far as I can tell) limited to the internal implementation and headers of the WAV source/sink and is not required to consume any public GNU Radio headers.

The fix would be to move sndfile::sndfile from the PUBLIC to PRIVATE link section for the CMake target: https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/CMakeLists.txt#L184-L199. Doing so would not effect the compilation of GNU Radio itself, so testing of the fix would have to involve re-building the changed GR and ensuring that something linking against gnuradio-blocks does not need the sndfile headers available.

System Information

Ubuntu, but applies to all.

GNU Radio Version

3.10 (maint-3.10)

Specific Version

3.10.3.0

Steps to Reproduce the Problem

Link against gnuradio-blocks using the gnuradio::gnuradio-blocks CMake target.

Relevant log output

No response

@jwmelto
Copy link

jwmelto commented Aug 22, 2022

First observed on Ubuntu 22.04 / GNU Radio 3.10.1
Also present on Fedora rawhide / GNU Radio 3.10.3

Minimizing external linkage is great, but if the linkage is actually required, then the gnuradio packages should depend on their distro-specific sources (libsndfile1-dev for Ubuntu; libsndfile-devel for Fedora).

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

Successfully merging a pull request may close this issue.

3 participants