-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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: split outputs to reduce closure sizes w/ cmake fixup #278643
Conversation
Turns out this is a mass rebuild 😲 and I have re-targeted towards staging. I have never gone through the staging workflow, so please advise what to do 🥺 |
2a0987d
to
1c7c748
Compare
c3de49f
to
c287d7a
Compare
@dcecile @andrewhamon @aaronjheng This is ready for review. I don't know much about I have pinged some people who have recently contributed watchman and/or folly. Sorry about the multiple force pushes as I struggled to fix the cmake issues, but I believe it is finally resolved! |
@ofborg build watchman fbthrift wangle fizz |
Update: oh I understand what is happening, we must rebuild |
This shaves off a 100MiB+ `boost.dev` dependence from `folly.out`, which would benefit all downstream packages that dynamically link to folly. Upstream's cmake configuration is not suitable for split packages, and some tweaks are applied for it to work; these are taken from: - NixOS@04384d5 - NixOS@8d712cc See: https://github.com/jtojnar/cmake-snips
c287d7a
to
960a1f6
Compare
Rebasing to see whether we can have some new darwin caches. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The linux versions of downsteam dependencies build, so I think this is good to go into staging. Please take look during the next staging-next cycle :)
# see https://github.com/NixOS/nixpkgs/issues/144170 | ||
"-DCMAKE_INSTALL_INCLUDEDIR=include" | ||
"-DCMAKE_INSTALL_LIBDIR=lib" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice if they use GnuInstallDirs
and not use bespoke re-implementations.... but facebook does what facebook does....
Would also simplify the .pc
(e.g. https://github.com/protocolbuffers/protobuf/blob/main/cmake/protobuf.pc.cmake)
Also, they pretty much don't look at public feedback: facebook/folly#1715
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
facebook does what facebook does....
Yeah! They also use a homemade build system with thousands of LoCs to wrap cmake, which is impossible to comprehend for amateurs like me... Oh, and they actually discourage packaging. So there is nothing much we could do... I will try to raise an issue upstream and see if anything happens.
Checked: watchman builds fine on top of staging! Here are some outdated confusion about possible broken builds...I found out that darwin watchman already fails on Some logs from building on watchman> Running phase: buildPhase
watchman> build flags: -j4 SHELL=/nix/store/5dbzggaw2194zb986zg9yzyjl14kxjra-bash-5.2-p21/bin/bash
watchman> [ 0%] Building CXX object CMakeFiles/err.dir/watchman/Poison.cpp.o
watchman> [ 1%] Building pywatchman
watchman> [ 2%] Building CXX object CMakeFiles/log.dir/watchman/PubSub.cpp.o
watchman> [ 3%] Building C object CMakeFiles/wildmatch.dir/watchman/thirdparty/wildmatch/wildmatch.c.o
watchman> Traceback (most recent call last):
watchman> File "/tmp/nix-build-watchman-2023.08.14.00.drv-0/source/watchman/python/setup.py", line 12, in <module>
watchman> from setuptools import Extension, setup
watchman> ModuleNotFoundError: No module named 'setuptools'
watchman> During handling of the above exception, another exception occurred:
watchman> Traceback (most recent call last):
watchman> File "/tmp/nix-build-watchman-2023.08.14.00.drv-0/source/watchman/python/setup.py", line 14, in <module>
watchman> from distutils.core import Extension, setup
watchman> ModuleNotFoundError: No module named 'distutils'
watchman> make[2]: *** [CMakeFiles/pybuild.dir/build.make:79: build/pytimestamp] Error 1
watchman> make[1]: *** [CMakeFiles/Makefile2:216: CMakeFiles/pybuild.dir/all] Error 2
watchman> make[1]: *** Waiting for unfinished jobs....
watchman> [ 3%] Building CXX object CMakeFiles/log.dir/watchman/LogConfig.cpp.o
watchman> [ 3%] Linking C static library libwildmatch.a
watchman> [ 3%] Built target wildmatch
watchman> [ 4%] Building CXX object CMakeFiles/log.dir/watchman/Logging.cpp.o
watchman> [ 4%] Building CXX object CMakeFiles/log.dir/watchman/portability/Backtrace.cpp.o
watchman> [ 5%] Building CXX object CMakeFiles/err.dir/watchman/root/warnerr.cpp.o
watchman> [ 6%] Linking CXX static library liblog.a
watchman> /nix/store/ybd6k83z67yjz427d4qji5i7dycr7azi-clang-wrapper-16.0.6/bin/ranlib: file: liblog.a(Backtrace.cpp.o) has no symbols
watchman> [ 6%] Built target log
watchman> [ 6%] Linking CXX static library liberr.a
watchman> [ 6%] Built target err
watchman> make: *** [Makefile:146: all] Error 2 Update: watchman builds fine on 4a88766, so something in: broke watchman on darwin, but it is possible that it has already been fixed in Update: ok, it seems that python is invoked without the needed |
Description of changes
This shaves off a 100MiB+
boost.dev
dependence fromfolly.out
, which would benefit all downstream packages that dynamically link to folly.Before:
After:
Fixes #248660.
Technical issues
Upstream's cmake configuration is not suitable for split packages, and some tweaks are needed for it to work; these are taken from:
See the tracking issue:
Update: turns out this will be a mass rebuild, re-targeted towards
staging
.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.