-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
soapysdr: fix modules-directory for extraPackages #53051
Conversation
Is the wrapper actually necessary (i.e. did this issue break something)? If so, we should make sure it won't break in the future. If |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment.
It looks like the wrapper is not needed anymore. I can run, for example, the remote server and welle-io without the wrappers. |
@betaboon can you please check if it works for you without the wrapper? |
@markuskowa i will during the next couple of days ;) |
@markuskowa I can't seem to get it to work without some kind of wrapper. how did you do it ? |
@betaboon You are right. It does not work without the wrapper. It found somehow the modules from my local installation. I would recommend to implement timokau's suggestion (see my source comment). |
@markuskowa i made some more changes include your suggestion. how about it? |
@GrahamcOfBorg build soapysdr-with-plugins |
${lndir}/bin/lndir -silent $i $out | ||
mkdir -p $out/${modulesPath} | ||
for package in ${toString extraPackages}; do | ||
${lndir}/bin/lndir -silent $package/${modulesPath} $out/${modulesPath} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now the binaries are not linked anymore. As a consequence binaries from the modules, such as SoapySDRServer
, are not wrapped any longer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markuskowa i was kindof annoyed by the collisions caused by symlinking all the packages into this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldnt it be better to wrap the binaries in the individual packages ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i just noticed, that we can use SOAPY_SDR_ROOT-environment-variable when we symlink everything into the soapysdr-package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is always a little bit of a chicken-egg problem with the plugins, since they require the soapy library. With the modules we have at the moment, the whole wrapping is only needed for the SoapySDRServer
from soapyremote
. The binaries that come with limesuite
are unnecessarily wrapped. All packages that will use soapy as backend and build against soapysdr-with-plugins
do not need to worry, since SOAPY_SDR_ROOT
is set at compile time and we have symlinked all modules into the base of soapysdr-with-plugins
.
Suggestions: we take the version that you have now (symlinking only the lib modules) but also create a wrapper for the SoapySDRServer
binary explicitly (in $out/bin).
The alternative could be to add an attribute wrappedBinaries
to all plugins where it is excplicitly stated, which binaries should be symlinked and wrapped. However, since it is really only needed for one binary at moment, this seems to be a little bit of an overkill.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what i find weird:
- without wrapping
SoapySDRServer
running it wont find my limesdr. - when i export
SOAPY_SDR_ROOT
first it can find it, even without it being wrapped.
which kind of contradictsSOAPY_SDR_ROOT
being set at compile-time. but it obviously gets set at compile-time, either defaulting toCMAKE_INSTALL_PREFIX
or by being set explicitly withcmakeFlags
(which i tried, but doesn't make any difference).
so yeah... even tho i would prefer a cleaner
(tm) solution we should stick to full symlinking as it as been before.
i will clean up this PR tomorrow.
@markuskowa i think I'm done here |
@GrahamcOfBorg build soapysdr-with-plugins |
Thanks for cleaning it up. Maybe a short clarification on why we have this mess with wrapping and module paths:
As I said above it is a chicken-egg problem. The final package is build in 3 steps:
It is not the most beautiful solution but it gets the job done. I will try to come up with a cleaner solution in a future PR, since the wrapping is only relevant for the remote server. |
@markuskowa thanks for clearing that up. now that i read your explanation in understood my misconception on one aspect. Maybe in the future it would be a good idea to separate soapysdr-plugins into a module-package and a bin-package. |
That is a good idea, I have not thought of that yet. |
@GrahamcOfBorg build soapysdr-with-plugins |
builds locally. |
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)