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

folly: support macOS #59846

Closed
wants to merge 2 commits into from
Closed

folly: support macOS #59846

wants to merge 2 commits into from

Conversation

strager
Copy link
Contributor

@strager strager commented Apr 18, 2019

Motivation for this change

Enable building the folly library on macOS (Darwin).

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 nix-review --run "nix-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.

@veprbl
Copy link
Member

veprbl commented Apr 27, 2019

The patches to disable tests might require more work to maintain. Do you think we could do it cleaner with just substituteInPlace?

@strager
Copy link
Contributor Author

strager commented Apr 29, 2019

@veprbl, I uploaded a new version which uses substituteInPlace. I don't have experience maintaining packages to know which is better. Let me know what you think about the substituteInPlace version compared to the old version (strager@700f99d).

@strager strager mentioned this pull request Apr 29, 2019
10 tasks
Copy link
Member

@veprbl veprbl left a comment

Choose a reason for hiding this comment

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

LGTM

@veprbl
Copy link
Member

veprbl commented May 2, 2019

@GrahamcOfBorg build folly

@veprbl
Copy link
Member

veprbl commented May 2, 2019

Fails to build

@strager
Copy link
Contributor Author

strager commented May 3, 2019

Yeah, f75c68c introduced problems. I'll rebase and fix them.

Make it easier to catch possible misconfiguration and regressions for the
folly package by running folly's test suite.
* operator new + align() is supported only since macOS 10.13. Disable
  uses of align() to support macOS 10.11 and 10.12. This affects
  performance but should not affect correctness.
* Clang 5 fails to emit typeinfo symbols for some folly::dynamic
  classes. Work around this bug by compiling folly with a newer version
  of Clang.
* Clang fails to compile some sketchy code in Boost.Atomic. Boost.Atomic
  is a dependency of folly. Backport the fix for this bug to Boost 1.67.
Copy link
Member

@veprbl veprbl left a comment

Choose a reason for hiding this comment

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

Since we just had a breakage due to the patches, perhaps we could remove some of them.

// Errors attempting to format the message should not throw
FB_LOGC(footest1234, ERR, "width overflow: %999999999999999999999d", 5);
ASSERT_EQ(1, messages.size());
+#if 0
Copy link
Member

Choose a reason for hiding this comment

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

Should we just disable PrintfTest?

@@ -50,10 +50,10 @@ TEST(Simple, Path) {
}

TEST(Simple, CanonicalizeParent) {
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if this is sandbox-safe. Should we just disable this test?

stdenv.mkDerivation rec {
let
disableTests = import ./disable-tests.nix { inherit (stdenv) lib; };
optionals = stdenv.lib.optionals;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
optionals = stdenv.lib.optionals;
inherit (stdenv.lib) optionals;

@@ -0,0 +1,88 @@
--- a/folly/IndexedMemPool.h
Copy link
Member

@veprbl veprbl May 7, 2019

Choose a reason for hiding this comment

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

I can build folly without this patch. Is this for uses in the code built with clang 5?

folly = callPackage ../development/libraries/folly { };
folly = callPackage ../development/libraries/folly {
# Clang 5 miscompiles folly. Build with a newer compiler on Darwin.
stdenv = if stdenv.isDarwin then llvmPackages_7.stdenv else stdenv;
Copy link
Member

Choose a reason for hiding this comment

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

Not needed anymore since ae1e940 has just landed on master #60491

@veprbl
Copy link
Member

veprbl commented Jun 7, 2019

macOS support was merged as a part of #62330

@veprbl
Copy link
Member

veprbl commented Dec 27, 2019

@strager Are you still interested in contributing the tests?

@strager
Copy link
Contributor Author

strager commented Dec 31, 2019

@strager Are you still interested in contributing the tests?

I have no plans to work on this PR or on folly. You can take over my work if you want.

@stale
Copy link

stale bot commented Jun 28, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 28, 2020
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Oct 3, 2020
@SuperSandro2000
Copy link
Member

@strager please resolve the merge conflicts.

@prusnak
Copy link
Member

prusnak commented Nov 28, 2020

Closing. macOS support was added #62330 and @Stragger expressed he does not want to work on the tests: #59846 (comment)

@prusnak prusnak closed this Nov 28, 2020
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

7 participants