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

[BUG] Cannot build on NixOS #215

Closed
magnetophon opened this issue Sep 4, 2021 · 2 comments
Closed

[BUG] Cannot build on NixOS #215

magnetophon opened this issue Sep 4, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@magnetophon
Copy link
Contributor

Describe the bug
The output is too long for an issue comment.
https://gist.github.com/magnetophon/a315559adab71202c1b0f529f9fc2945
I hope you can spot the issue!

Thanks!

@magnetophon magnetophon added the bug Something isn't working label Sep 4, 2021
@jatinchowdhury18
Copy link
Owner

Hi @magnetophon, I was actually thinking about #164 the other day (possibly a duplicate?), and was wondering whether or not we had actually solved it (I guess not).

Anyway, looking at the latest build logs in your above link, I think the problem is something to do with this message on line 140:

[ 47%] Linking CXX static library libjuce_plugin_modules.a
/nix/store/v8imx1nvyz0hgvx9cbcmh6gp4ngw3ffj-binutils-2.35.1/bin/ar: CMakeFiles/juce_plugin_modules.dir/DISTRHO-JUCE/modules/juce_audio_utils/juce_audio_utils.cpp.o: plugin needed to handle lto object
/nix/store/v8imx1nvyz0hgvx9cbcmh6gp4ngw3ffj-binutils-2.35.1/bin/ranlib: libjuce_plugin_modules.a(juce_audio_utils.cpp.o): plugin needed to handle lto object

From looking at this Reddit post, one idea is to try using the lto tools from gcc instead of binutils. So maybe try setting these environment variables before building:

AR="/nix/store/4xs1xyj8728yvh9y5v6ji819kwgfy2fv-gcc-wrapper-10.3.0/bin/gcc-ar"
NM="/nix/store/4xs1xyj8728yvh9y5v6ji819kwgfy2fv-gcc-wrapper-10.3.0/bin/gcc-nm"
RANLIB="/nix/store/4xs1xyj8728yvh9y5v6ji819kwgfy2fv-gcc-wrapper-10.3.0/bin/gcc-ranlib:

@magnetophon
Copy link
Contributor Author

Yes, that does the trick!

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants