facebook / facebook/watchman

Help me get the homebrew formula building again

Open
#851 16 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
13.7k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Hello @wez! As per https://github.com/facebook/watchman/issues/665#issuecomment-465404481 I am trying to get the homebrew formula building again. Sadly my knowledge of: homebrew internals; watchman; and native toolchains of any kind are all pretty poor 🙂 .

I made the suggested changes to the [formula](https://github.com/Homebrew/homebrew-core/blob/cafa253cfdd34e994f301cc41c25243366593144/Formula/watchman.rb):
```
modified Formula/watchman.rb
@@ -1,21 +1,12 @@
class Watchman < Formula
desc "Watch files and take action when they change"
homepage "https://github.com/facebook/watchman"
+ url "https://github.com/facebook/watchman/archive/v2020.08.17.00.tar.gz"
+ sha256 "9229687ee834b4527746f61a8071a9d1bb16415e948787120703c5f511383e6e"
license "Apache-2.0"
- revision 4
+ version_scheme 1
head "https://github.com/facebook/watchman.git"

- stable do
- url "https://github.com/facebook/watchman/archive/v4.9.0.tar.gz"
- sha256 "1f6402dc70b1d056fffc3748f2fdcecff730d8843bb6936de395b3443ce05322"
-
- # Upstream commit from 1 Sep 2017: "Have bin scripts use iter() method for python3"
- patch do
- url "https://github.com/facebook/watchman/commit/17958f7d.diff?full_index=1"
- sha256 "edad4971fceed2aecfa2b9c3e8e22c455bfa073732a3a0c77b030e506ee860af"
- end
- end
-
bottle do
sha256 "7840f564c11d33425c9eb8985f9156e782e66ef2a3578329dba83ee15a9bf0be" => :catalina
sha256 "ba2338b0f23c8b8817fd7bfa92466b7a97ab416e93ec6c3a400041aef013de86" => :mojave
@@ -26,6 +17,7 @@ class Watchman < Formula
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "pkg-config" => :build
+ depends_on "folly"
depends_on "openssl@1.1"
depends_on "pcre"
depends_on "python@3.8"

```
But `getdeps.py` is, well, still trying to get all of the deps. Right now it's trying and failing to build openssl. I'm not sure why, but I'm pretty sure it shouldn't be trying to build it in the first place.

OpenSSL build error

```
Assessing openssl...
Download https://www.openssl.org/source/openssl-1.1.1f.tar.gz -> /private/tmp/fbcode_builder_getdeps-ZprivateZtmpZwatchman-20200825-72628-nwvu33Zwatchman-2020.08.17.00ZbuildZfbcode_builder/downloads/openssl-openssl-1.1.1f.tar.gz ...
.. 0 of 9792828 [Complete in 0.834120 seconds]
---
+ cd /private/tmp/fbcode_builder_getdeps-ZprivateZtmpZwatchman-20200825-72628-nwvu33Zwatchman-2020.08.17.00ZbuildZfbcode_builder/build/openssl-UtXLnJ2t0v50wqKwl2XtYbrqHH1o2BVeZQYDPt0Ta_c && \
+ /usr/bin/perl \
+ /private/tmp/fbcode_builder_getdeps-ZprivateZtmpZwatchman-20200825-72628-nwvu33Zwatchman-2020.08.17.00ZbuildZfbcode_builder/extracted/openssl-openssl-1.1.1f.tar.gz/openssl-1.1.1f/Configure \
+ --prefix=/private/tmp/fbcode_builder_getdeps-ZprivateZtmpZwatchman-20200825-72628-nwvu33Zwatchman-2020.08.17.00ZbuildZfbcode_builder/installed/openssl-UtXLnJ2t0v50wqKwl2XtYbrqHH1o2BVeZQYDPt0Ta_c \
+ --openssldir=/private/tmp/fbcode_builder_getdeps-ZprivateZtmpZwatchman-20200825-72628-nwvu33Zwatchman-2020.08.17.00ZbuildZfbcode_builder/installed/openssl-UtXLnJ2t0v50wqKwl2XtYbrqHH1o2BVeZQYDPt0Ta_c \
+ darwin64-x86_64-cc \
+ enable-static-engine \
+ enable-capieng \
+ no-makedepend \
+ no-unit-test \
+ no-tests
Configuring OpenSSL version 1.1.1f (0x1010106fL) for darwin64-x86_64-cc
Using os-specific seed configuration
Creating configdata.pm
Creating Makefile

**********************************************************************
*** ***
*** OpenSSL has been successfully configured ***
*** ***
*** If you encounter a problem while building, please open an ***
*** issue on GitHub ***
*** and include the output from the following command: ***
*** ***
*** perl configdata.pm --dump ***
*** ***
*** (If you are new to OpenSSL, you might want to consult the ***
*** 'Troubleshooting' section in the INSTALL file first) ***
*** ***
**********************************************************************
---
+ cd /private/tmp/fbcode_builder_getdeps-ZprivateZtmpZwatchman-20200825-72628-nwvu33Zwatchman-2020.08.17.00ZbuildZfbcode_builder/build/openssl-UtXLnJ2t0v50wqKwl2XtYbrqHH1o2BVeZQYDPt0Ta_c && \
+ make \
+ install_sw \
+ install_ssldirs
/usr/bin/perl "-I." -Mconfigdata "../../extracted/openssl-openssl-1.1.1f.tar.gz/openssl-1.1.1f/util/dofile.pl" \
"-oMakefile" ../../extracted/openssl-openssl-1.1.1f.tar.gz/openssl-1.1.1f/include/crypto/bn_conf.h.in > include/crypto/bn_conf.h
/usr/bin/perl "-I." -Mconfigdata "../../extracted/openssl-openssl-1.1.1f.tar.gz/openssl-1.1.1f/util/dofile.pl" \
"-oMakefile" ../../extracted/openssl-openssl-1.1.1f.tar.gz/openssl-1.1.1f/include/crypto/dso_conf.h.in > include/crypto/dso_conf.h
/usr/bin/perl "-I." -Mconfigdata "../../extracted/openssl-openssl-1.1.1f.tar.gz/openssl-1.1.1f/util/dofile.pl" \
"-oMakefile" ../../extracted/openssl-openssl-1.1.1f.tar.gz/openssl-1.1.1f/include/openssl/opensslconf.h.in > include/openssl/opensslconf.h
created directory `/private/tmp/fbcode_builder_getdeps-ZprivateZtmpZwatchman-20200825-72628-nwvu33Zwatchman-2020.08.17.00ZbuildZfbcode_builder/installed/openssl-UtXLnJ2t0v50wqKwl2XtYbrqHH1o2BVeZQYDPt0Ta_c'
created directory `/private/tmp/fbcode_builder_getdeps-ZprivateZtmpZwatchman-20200825-72628-nwvu33Zwatchman-2020.08.17.00ZbuildZfbcode_builder/installed/openssl-UtXLnJ2t0v50wqKwl2XtYbrqHH1o2BVeZQYDPt0Ta_c/certs'
created directory `/private/tmp/fbcode_builder_getdeps-ZprivateZtmpZwatchman-20200825-72628-nwvu33Zwatchman-2020.08.17.00ZbuildZfbcode_builder/installed/openssl-UtXLnJ2t0v50wqKwl2XtYbrqHH1o2BVeZQYDPt0Ta_c/private'
created directory `/private/tmp/fbcode_builder_getdeps-ZprivateZtmpZwatchman-20200825-72628-nwvu33Zwatchman-2020.08.17.00ZbuildZfbcode_builder/installed/openssl-UtXLnJ2t0v50wqKwl2XtYbrqHH1o2BVeZQYDPt0Ta_c/misc'
Command '['make', 'install_sw', 'install_ssldirs']' returned non-zero exit status 2.
!! Failed
install ./apps/CA.pl -> /private/tmp/fbcode_builder_getdeps-ZprivateZtmpZwatchman-20200825-72628-nwvu33Zwatchman-2020.08.17.00ZbuildZfbcode_builder/installed/openssl-UtXLnJ2t0v50wqKwl2XtYbrqHH1o2BVeZQYDPt0Ta_c/misc/CA.pl
cp: ./apps/CA.pl: No such file or directory
make: *** [install_ssldirs] Error 1
make: *** Waiting for unfinished jobs....
```


Am I supposed to skip `autogen.sh` and invoke `getdeps.py` directly with something like `--allow-system-packages`? If so, I think I'd need to add homebrew dependencies on more than just folly. Boost, for example. Is there a full list handy anywhere?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.