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

hugs: fix build on darwin #100216

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

hugs: fix build on darwin #100216

wants to merge 1 commit into from

Conversation

@siraben
Copy link
Member

@siraben siraben commented Oct 11, 2020

Motivation for this change

Fix build on darwin. Had to pick some commits from a repository that was working on the same issue.

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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@siraben
Copy link
Member Author

@siraben siraben commented Oct 11, 2020

@symphorien changing gcc to gccStdenv breaks the binary at runtime, giving

./result/bin/hugs 
__   __ __  __  ____   ___      _________________________________________
||   || ||  || ||  || ||__      Hugs 98: Based on the Haskell 98 standard
||___|| ||__|| ||__||  __||     Copyright (c) 1994-2005
||---||         ___||           World Wide Web: http://haskell.org/hugs
||   ||                         Bugs: http://hackage.haskell.org/trac/hugs
||   || Version: September 2006 _________________________________________

Haskell 98 mode: Restart with command line option -98 to enable extensions

Prelude not found on current path: ".:{Home}/lib/hugs/packages/*:/usr/local/lib/hugs/packages/*:{Hugs}/packages/*"

FATAL ERROR: Unable to load prelude

@siraben siraben requested a review from symphorien Oct 11, 2020
@symphorien symphorien removed their request for review Oct 11, 2020
@symphorien
Copy link
Member

@symphorien symphorien commented Oct 11, 2020

I have no idea why that would cause it, sorry.

@siraben
Copy link
Member Author

@siraben siraben commented Oct 11, 2020

@joachifm (package maintainer), any suggestions?

@siraben
Copy link
Member Author

@siraben siraben commented Oct 11, 2020

@jtojnar could you help take a look as well?

@jtojnar
Copy link
Contributor

@jtojnar jtojnar commented Oct 11, 2020

@siraben
Copy link
Member Author

@siraben siraben commented Oct 12, 2020

@jtojnar here is the issue when I use clang to build

$ ./result/bin/hugs
__   __ __  __  ____   ___      _________________________________________
||   || ||  || ||  || ||__      Hugs 98: Based on the Haskell 98 standard
||___|| ||__|| ||__||  __||     Copyright (c) 1994-2005
||---||         ___||           World Wide Web: http://haskell.org/hugs
||   ||                         Bugs: http://hackage.haskell.org/trac/hugs
||   || Version: September 2006 _________________________________________

Haskell 98 mode: Restart with command line option -98 to enable extensions

Prelude not found on current path: ".:{Home}/lib/hugs/packages/*:/usr/local/lib/hugs/packages/*:{Hugs}/packages/*"

FATAL ERROR: Unable to load prelude

url = "https://aur.archlinux.org/cgit/aur.git/plain/hsbase_inline.patch?h=hugs";
name = "hsbase_inline.patch";
sha256 = "1h0sp16d17hlm6gj7zdbgwrjwi2l4q02m8p0wd60dp4gn9i9js0v";
}) ] ++ lib.optionals stdenv.isDarwin [
Copy link
Member

@SuperSandro2000 SuperSandro2000 Jan 18, 2021

Please always apply all patches.

})
];

buildInputs = [ gcc ];
Copy link
Member

@SuperSandro2000 SuperSandro2000 Jan 18, 2021

nativeBuildInputs.

@SuperSandro2000
Copy link
Member

@SuperSandro2000 SuperSandro2000 commented Jan 18, 2021

This is a semi-automatic executed nixpkgs-review which is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 100216 run on x86_64-darwin 1

1 package built:
  • hugs

@siraben
Copy link
Member Author

@siraben siraben commented Jan 18, 2021

I'll apply those changes.

@stale
Copy link

@stale stale bot commented Jul 21, 2021

I marked this as stale due to inactivity. → More info

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

Successfully merging this pull request may close these issues.

None yet

4 participants