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

lazarus: fix linking by the IDE; #88839

Merged
merged 1 commit into from May 25, 2020
Merged

Conversation

7c6f434c
Copy link
Member

using the results of an investigation by @deliciouslytyped

will self-merge at some point

Motivation for this change

#48871

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • (N/A) Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@deliciouslytyped
Copy link
Contributor

Thanks!
The replacement of all rpaths seems a bit shotgun, but I'm not sure how it's supposed to work, so at the least it will fix the immediately apparent issue.

More specifically, would it not be better to only filter the nonexistent /lib and /lib64 (I think it was?) of the startlazarus derivation? - at least, on a the specific level, that's what it was complaining about.

I don't know if other rpaths will ever be necessary?
Or in that case should one just pass NIX_LDFLAGS in the external environment, as per the usual extension mechanism of makeWrapper? (it makes a provision for appending to the env var it sets, if I read the source correctly.)

@7c6f434c
Copy link
Member Author

Well, this will only matter if someone overrides lazarus derivation in a very specific way as by default only $out is added anyway.

@deliciouslytyped
Copy link
Contributor

deliciouslytyped commented May 25, 2020

¯\_(ツ)_/¯ ok.

@deliciouslytyped
Copy link
Contributor

Can you clarify what that would be?

@7c6f434c
Copy link
Member Author

Well, current stdenv only adds $out directories to rpath things, but I guess one could in principle manually add some more -rpath entries by overriding NIX_LDFLAGS. Which might or might not need propagation. so let's wait and see.

@deliciouslytyped
Copy link
Contributor

Ah ok, I think I get it.

@deliciouslytyped
Copy link
Contributor

Well, I don't remember what the original problem was exactly, so note to self: write the stuff from IRC in here. I think it was something about quoting?

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

Successfully merging this pull request may close these issues.

None yet

2 participants