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/libiberty-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

38 lines
847 B
Plaintext

[manifest]
name = libiberty-python
[rpms]
binutils-devel
binutils
[debs.not(all(distro=ubuntu,distro_vers="24.04"))]
binutils-dev
[debs.all(distro=ubuntu,distro_vers="24.04")]
binutils-x86-64-linux-gnu
[download]
url = https://ftpmirror.gnu.org/gnu/binutils/binutils-2.43.tar.xz
sha256 = b53606f443ac8f01d1d5fc9c39497f2af322d99e14cea5c0b4b124d630379365
[dependencies]
zlib-python
[build]
builder = autoconf
subdir = binutils-2.43/libiberty
patchfile = libiberty_install_pic_lib.patch
[build.not(os=linux)]
builder = nop
# only build the parts needed for demangling
# as we still want to use system linker and assembler etc
[autoconf.args]
--enable-install-libiberty
# libiberty builds pic/libiberty.a, the archive that
# libiberty_install_pic_lib.patch installs, only when shared is enabled.
--enable-shared
CFLAGS=-fPIC -O2
PICFLAG=-fPIC