1
0
mirror of https://github.com/facebook/proxygen.git synced 2026-10-24 01:33:54 +03:00
Files
proxygen/build/fbcode_builder/manifests/folly-python
Indu Suresh 6461cf9a84 Fix libiberty install and shared glog for folly-python
Summary:
Fixes the two getdeps regressions that break the BGP++ OSS builds (`fboss-oss-build-bgp`, `fboss-oss-build-bgp-bb`) and FBOSS OSS builds that build dependencies from HEAD. They ship together because either fix alone still leaves `fboss-oss-build-ondiff` red on the other.

libiberty: getdeps-built libiberty installs its headers but no `libiberty.a`, so `fbthrift-python` configure fails with `Could NOT find Libiberty (missing: LIBIBERTY_LIBRARY)`. `AutoconfBuilder` adds `--disable-shared` when a manifest passes neither shared flag, and libiberty's configure then empties `PICFLAG`, so `pic/libiberty.a` is never built and `libiberty_install_pic_lib.patch` copies nothing while the install still exits 0. The miss was silent until D125047475 renamed the package in `FindLibiberty.cmake` to `Libiberty`, which made `find_package(Libiberty REQUIRED)` in fbthrift enforce REQUIRED. Passing `--enable-shared` keeps `PICFLAG`; libiberty builds no shared library either way.

glog: since D124075105 made glog static by default, the `-python` shared libraries built on `folly-python` each embed a copy of glog, and every copy registers its flags with the one shared gflags, so test binaries abort with `linked both statically and dynamically`. glog's `[cmake.defines.feature_shared_libs=on]` could never turn on because glog declared no features. This declares `shared_libs` in glog and requests it from `folly-python`; getdeps unions features per project, so graphs that contain `folly-python` (`bgp`, `fboss`) get one shared glog, and graphs without it (`cachelib`, `mcrouter`, `folly`, `fbthrift`) keep static glog.

Reviewed By: yfeldblum, shitanshu-shah

Differential Revision: D125332467

fbshipit-source-id: 4ff0cb077de91afc86f79f09e1ab6b15fac2c7f0
2026-10-14 20:39:27 -07:00

86 lines
1.6 KiB
Plaintext

[manifest]
name = folly-python
fbsource_path = fbcode/folly
shipit_project = folly
shipit_fbcode_builder = true
[git]
repo_url = https://github.com/facebook/folly.git
[build]
builder = cmake
job_weight_mib = 1024
[build.not(os=linux)]
builder = nop
[dependencies]
gflags
# folly-python's shared libraries and the binaries that load them must use one
# copy of glog.
glog = shared_libs
googletest
boost-python
libdwarf-python
libevent-python
libsodium
fast_float
fmt-python
lz4-python
snappy
zstd-python
# no openssl or zlib in the linux case, why?
# these are usually installed on the system
# and are the easiest system deps to pull in.
# In the future we want to be able to express
# that a system dep is sufficient in the manifest
# for eg: openssl and zlib, but for now we don't
# have it.
# macOS doesn't expose the openssl api so we need
# to build our own.
[dependencies.os=darwin]
openssl
# Windows has neither openssl nor zlib, so we get
# to provide both
[dependencies.os=windows]
openssl
zlib
[dependencies.os=linux]
libaio-python
libiberty-python
libunwind
# xz depends on autoconf which does not build on
# Windows
[dependencies.not(os=windows)]
xz
[shipit.pathmap]
fbcode/folly/public_tld = .
fbcode/folly = folly
[shipit.strip]
^fbcode/folly/folly-config\.h$
^fbcode/folly/public_tld/build/facebook_.*
[cmake.defines.os=linux]
PYTHON_EXTENSIONS=ON
BUILD_SHARED_LIBS=ON
[cmake.defines.not(os=windows)]
BOOST_LINK_STATIC=ON
[cmake.defines.os=freebsd]
LIBDWARF_FOUND=NO
[cmake.defines.test=on]
BUILD_TESTS=ON
BUILD_BENCHMARKS=OFF
[cmake.defines.test=off]
BUILD_TESTS=OFF
BUILD_BENCHMARKS=OFF