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

v8: fixes darwin build #25837

Merged
merged 1 commit into from May 17, 2017
Merged

v8: fixes darwin build #25837

merged 1 commit into from May 17, 2017

Conversation

czyzykowski
Copy link
Contributor

@czyzykowski czyzykowski commented May 16, 2017

Motivation for this change

v8 compilation on macOS was failing because of missing dependency and wrong linker. This PR fixes those problems.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • 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/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@czyzykowski, thanks for your PR! By analyzing the history of the files in this pull request, we identified @proglodyte and @peti to be potential reviewers.


NIX_CFLAGS_COMPILE = "-Wno-error=strict-overflow";

buildFlags = [
"LINK=g++"
(if clangFlag == "1" then "LINK=clang++" else "LINK=g++")
Copy link
Member

Choose a reason for hiding this comment

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

I think it's better practice to just do "LINK=c++", that should work in gcc and clang.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll try that.

@@ -10198,6 +10198,7 @@ with pkgs;

v8 = callPackage ../development/libraries/v8 {
inherit (python2Packages) python gyp;
libtool = darwin.cctools;
Copy link
Member

Choose a reason for hiding this comment

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

This name seems a bit confusing because it will get confused with GNU lib tool. How about just calling it "cctools" instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I followed what I found already in the file, but that would make more sense.

Copy link
Member

Choose a reason for hiding this comment

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

Ok I see now it is used by others, so it's fine to leave it as is.

@matthewbauer
Copy link
Member

Thanks for your contribution! If you are able to you might want to look into applying these patches to other versions of v8. I'm not sure if any others have these problems, though.

@czyzykowski
Copy link
Contributor Author

@matthewbauer should that be a separate PR or part of this one?

@LnL7 LnL7 added the 6.topic: darwin Running or building packages on Darwin label May 17, 2017
Copy link
Member

@LnL7 LnL7 left a comment

Choose a reason for hiding this comment

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

This still needs some changes to work properly without xcode (or with sandboxing) gyp needs an xcode patch similar to nodejs. Currently this will fail with gyp: No Xcode or CLT version detected! on hydra.

@czyzykowski
Copy link
Contributor Author

@LnL7 The latest change successfully builds on a machine without Xcode.

Copy link
Member

@LnL7 LnL7 left a comment

Choose a reason for hiding this comment

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

Perfect! Can you squash the commits.

@matthewbauer
Copy link
Member

matthewbauer commented May 17, 2017

On the commit message:

Format the commits in the following way:

(pkg-name | service-name): (from -> to | init at version | refactor | etc)

(Motivation for change. Additional information.)

v8 compilation on macOS was failing because of missing dependency and
wrong linker. The approach to make it work is similar to the nodejs
package.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: darwin Running or building packages on Darwin 12. first-time contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants