-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
gnuradio: [3.7.10.1->3.7.11] [Enable Darwin support] #26144
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
Conversation
@lukeadams, thanks for your PR! By analyzing the history of the files in this pull request, we identified @bjornfor, @wkennington and @FRidh to be potential reviewers. |
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.
Cool! Thanks!
''; | ||
|
||
# Check needs to run after install due to dependencies on nix store paths | ||
phases = [ "unpackPhase" "patchPhase" "configurePhase" "buildPhase" "installPhase" "fixupPhase" "checkPhase" "distPhase" ]; |
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.
You should be able to use the installCheckPhase
instead of reordering all the phases.
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 didn't even see that phase! fixed
postInstall = '' | ||
printf "backend : Qt4Agg\n" > "$out/share/gnuradio/matplotlibrc" | ||
|
||
for file in "$out"/bin/* "$out"/share/gnuradio/examples/*/*.py; do | ||
wrapProgram "$file" \ | ||
--prefix PYTHONPATH : $PYTHONPATH:$(toPythonPath "$out") \ | ||
--set MATPLOTLIBRC "$out/share/gnuradio" | ||
--set MATPLOTLIBRC "$out/share/gnuradio" ${stdenv.lib.optionalString stdenv.isDarwin " --set DYLD_FRAMEWORK_PATH /System/Library/Frameworks"} |
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.
Can you add a comment pointing to #24693, when that's fixed we should be able to get rid of the DYLD_FRAMEWORK_PATH
stuff.
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.
👍
cd836c0
to
48d6e8a
Compare
buildInputs = [ qt4 ]; | ||
buildInputs = [ | ||
qt4 | ||
] ++ stdenv.lib.optional stdenv.isDarwin [ AGL ]; |
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.
Need to change this to stdenv.lib.optionals
which returns a list given a list
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.
👍 fixed
48d6e8a
to
4ca0f44
Compare
edit: it was because i had -v 4 for increased verbosity in nix-shell. Oops. I just re-ran it with |
You should use |
qwt6_qt4: enableParallelBuilding
- Add CoreAudio dependency (Darwin) for Gnuradio - Use qwt6_qt4 instead of older qwt5 - qwt is not being linked by full path so install_name_tool is used on Darwin - Clean up build inputs with link to source - Enclose Darwin modifications in `optionalString` - Enable testing - Use installCheckPhase instead of (post-build) checkPhase - Add link to DYLD_LIBRARY_PATH GH issue
I'm getting some test failures https://gist.github.com/LnL7/34bc91c98e28cafdc40e09013bc39e45 |
@LnL7 Test 166 seems to be one of a handful which intermittently fail due to generating (and capturing) large amounts of data. I can compile a list of these as we may want to disable them to prevent spurious failures.
notes:
|
Apparently the qwt framework name was a relative path. Using I'm wondering if it might be helpful to create a darwin post-build hook that searches for issues like this, something like unrelated to above:
|
4ca0f44
to
eadc23b
Compare
I'm going to close this until i have a chance to polish it. (next week)
Since GR-3.8 is coming soon with some breaking changes, I may be able to work on that too. Of note
|
@fpletz : I noticed you merged 3.7.11, which is awesome! This method prevents the need for any interpreter patching and eliminates potential user profile conflicts (e.g. GNUr-enabled python 2 being linked in the user profile), and also makes all gnuradio executables and example scripts "just work" when used within the shell. |
Something like |
Motivation for this change
GNU Radio only required a few small tweaks to enable compilation on Darwin. Updated to 3.7.11 which is compatible with 3.10.1 and includes bugfixes.
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)buildPythonPackage
.Attached is the output log of nox-review:
gnuradio_qwt6-qt4_uhd_darwin_buildoutput.txt