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

gcj: fix build on Darwin #54578

Merged
merged 1 commit into from Feb 8, 2019
Merged

gcj: fix build on Darwin #54578

merged 1 commit into from Feb 8, 2019

Conversation

alyssais
Copy link
Member

Motivation for this change

Partially addresses #29715.
Part of #54573.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@matthewbauer
Copy link
Member

Awesome work!

@@ -7012,7 +7012,9 @@ in
profiledCompiler = false;
inherit zip unzip zlib boehmgc gettext pkgconfig perl;
inherit (gnome2) libart_lgpl;
});
}).overrideAttrs (oldAttrs: {
strictDeps = stdenv.isDarwin;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC gcc has strictDeps=true alread?
/cc @Ericson2314

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it does, it didn't in November when I first authored this commit. Although this should definitely be oldAttrs.strictDeps or stdenv.isDarwin.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You were right! We didn't need this, so I've dropped this change.

int_out=$(install_name_tool -id "$fn" "${flags[@]}" "$fn" 2>&1)
result=$?
if [ "$result" -ne 0 ] &&
! grep "shared library stub file and can't be changed" <<< "$out"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to filter out these cases instead of ignoring potential other problems?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My research at the time suggested that checking the output of install_name_tool was by far the simplest way to do it. I don’t think this would really ignore any other problems, since it’s quite specific.

@alyssais alyssais merged commit 21d991b into NixOS:staging Feb 8, 2019
@alyssais alyssais deleted the gcj-darwin branch February 8, 2019 16:54
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

4 participants