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

systemd 257.2 #203531

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Formula/s/systemd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

desc "System and service manager"
homepage "https://systemd.io"
url "https://github.com/systemd/systemd/archive/refs/tags/v257.1.tar.gz"
sha256 "375365b9f3718ba5fc2a972445eefcd9e229cc18bffe95818220c2a52efe8ed9"
url "https://github.com/systemd/systemd/archive/refs/tags/v257.2.tar.gz"
sha256 "7f2bc3253e4f87578132c5e433ef9ff7e8fee01d9eb5a5b7c64376d617f694d0"
license all_of: [
# Main license is LGPL-2.1-or-later while systemd-udevd is GPL-2.0-or-later
"LGPL-2.1-or-later",
Expand All @@ -27,7 +27,6 @@
{ any_of: ["MIT", "GPL-2.0-or-later" => { with: "Linux-syscall-note" }] },
{ any_of: ["GPL-2.0-only", "BSD-2-Clause"] },
]
revision 1
head "https://github.com/systemd/systemd.git", branch: "main"

bottle do
Expand Down Expand Up @@ -69,7 +68,9 @@
sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0"
end

def install

Check failure on line 71 in Formula/s/systemd.rb

View workflow job for this annotation

GitHub Actions / Linux

`brew install --verbose --formula --build-bottle systemd` failed on Linux!

running build_ext building 'lxml.etree' extension creating build/temp.linux-x86_64-cpython-312/src/lxml gcc-11 -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc/lxml/includes -I/tmp/systemd-20250108-7528-g2l2wy/systemd-257.2/venv/include -I/home/linuxbrew/.linuxbrew/opt/[email protected]/include/python3.12 -c src/lxml/etree.c -o build/temp.linux-x86_64-cpython-312/src/lxml/etree.o -w In file included from src/lxml/etree.c:1328: src/lxml/includes/etree_defs.h:12:10: fatal error: libxml/xmlversion.h: No such file or directory 12 | #include "libxml/xmlversion.h" | ^~~~~~~~~~~~~~~~~~~~~ compilation terminated. Compile failed: command '/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super/gcc-11' failed with exit code 1 creating tmp cc -I/usr/include/libxml2 -c /tmp/xmlXPathInitaoodw24a.c -o tmp/xmlXPathInitaoodw24a.o /tmp/xmlXPathInitaoodw24a.c:1:10: fatal error: libxml/xpath.h: No such file or directory 1 | #include "libxml/xpath.h" | ^~~~~~~~~~~~~~~~ compilation terminated. ********************************************************************************* Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed? ********************************************************************************* error: command '/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super/gcc-11' failed with exit code 1 error: subprocess-exited-with-error × Building wheel for lxml (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. full command: /tmp/systemd-20250108-7528-g2l2wy/systemd-257.2/venv/bin/python /home/linuxbrew/.linuxbrew/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmpwc__wyfj cwd: /tmp/systemd--lxml-20250108-7528-b8heq5/lxml-5.3.0 Building wheel for lxml (pyproject.toml): finished with status 'error' ERROR: Failed building wheel for lxml Failed to build lxml ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (lxml) ==> Formula Path: /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/s/systemd.rb ==> Configuration HOMEBREW_VERSION: 4.4.15-28-g1870398 ORIGIN: https://github.com/Homebrew/brew HEAD: 1870398907af5709e68aedb4e89446b60c689c91 Last commit: 2 hours ago Branch: master Core tap HEAD: 9ef9534c724317c81c75b9ed753c4097738dd3ce Core tap last commit: 8 minutes ago Core tap JSON: 08 Jan 00:41 UTC HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew HOMEBREW_BOOTSNAP: set HOMEBREW_CASK_OPTS: [] HOMEBREW_COLOR: set HOMEBREW_CURL_PATH: /usr/bin/curl HOMEBREW_FAIL_LOG_LINES: 150 HOMEBREW_GITHUB_API_TOKEN: set HOMEBREW_GIT_EMAIL: [email protected] HOMEBREW_GIT_NAME: BrewTestBot HOMEBREW_GIT_PATH: /usr/bin/git HOMEBREW_LOGS: /github/home/bottles/logs HOMEBREW_MAKE_JOBS: 4 HOMEBREW_NO_AUTO_UPDATE: set HOMEBREW_NO_EMOJI: set HOMEBREW_NO_ENV_HINTS: set HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: set HOMEBREW_NO_INSTALL_FROM_API: set HOMEBREW_SORBET_RUNTIME: set HOMEBREW_VERIFY_ATTESTATIONS: set Homebrew Ruby: 3.3.6 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/bin/ruby CPU: quad-core 64-bit zen3 Clang: N/A Git: 2.47.0 => /usr/bin/git Curl: 7.81.0 => /usr/bin/curl Kernel: Linux 6.8.0-1017-azure x86_64 GNU/Linux OS: Ubuntu 22.04.5 LTS Host glibc: 2.35 /usr/bin/gcc: 11.4.0 /usr/bin/ruby: N/A glibc: N/A gcc@11: N/A gcc: N/A xorg: N/A ==> ENV HOMEBREW_CC: gcc-11 HOMEBREW_CXX: g++-11 MAKEFLAGS: -j4 CMAKE_PREFIX_PATH: /home/linuxbrew/.linuxbrew/opt/berkeley-db@5:/home/linuxbrew/.linuxbrew PKG_CONFIG_PATH: /home/linuxbrew/.linuxbrew/opt/libxml2/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/libxslt/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/pkgconf/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/[email protected]/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/bzip2/lib/pkgc
ENV.prepend_path "PKG_CONFIG_PATH", Formula["libxml2"].opt_lib/"pkgconfig"
Copy link
Member

Choose a reason for hiding this comment

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

Seems suspicious. Is this a regression with Homebrew/brew#19023?

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, but that did not fix the issue though

still got this

    building 'lxml.etree' extension
    creating build/temp.linux-x86_64-cpython-312/src/lxml
    gcc-11 -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc/lxml/includes -I/tmp/systemd-20250108-7528-g2l2wy/systemd-257.2/venv/include -I/home/linuxbrew/.linuxbrew/opt/[email protected]/include/python3.12 -c src/lxml/etree.c -o build/temp.linux-x86_64-cpython-312/src/lxml/etree.o -w
    In file included from src/lxml/etree.c:1328:
    src/lxml/includes/etree_defs.h:12:10: fatal error: libxml/xmlversion.h: No such file or directory
       12 | #include "libxml/xmlversion.h"
          |          ^~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    Compile failed: command '/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super/gcc-11' failed with exit code 1
    creating tmp
    cc -I/usr/include/libxml2 -c /tmp/xmlXPathInitaoodw24a.c -o tmp/xmlXPathInitaoodw24a.o
    /tmp/xmlXPathInitaoodw24a.c:1:10: fatal error: libxml/xpath.h: No such file or directory
        1 | #include "libxml/xpath.h"
          |          ^~~~~~~~~~q~~~~~~
    compilation terminated.

Copy link
Member

@cho-m cho-m Jan 8, 2025

Choose a reason for hiding this comment

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

It's probably the same behavior we get on macOS now. Recursive build deps are missing from PKG_CONFIG_PATH.

I recall there were prior discussions for macOS side on this topic. Particularly seen with glib/GNOME dependency trees as glib is usually included in Requires.

Which is why we end up with stuff like:

depends_on "glib" => :build # to add to PKG_CONFIG_PATH for gobject-introspection
depends_on "gobject-introspection" => [:build, :test]
depends_on "meson" => :build
depends_on "ninja" => :build
depends_on "pcre2" => :build # to add to PKG_CONFIG_PATH for glib


EDIT: I do think that if build dependency is in PKG_CONFIG_PATH, then the runtime dependencies of the build dependency should also be included as pkg-config may be used for things like static library builds

Copy link
Member

Choose a reason for hiding this comment

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

There is a depends_on "libxml2" => :build already

Copy link
Member

@cho-m cho-m Jan 8, 2025

Choose a reason for hiding this comment

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

It's due to Requires.private, which are used to detect --cflags for both shared and static builds. And --libs for static builds.

Not ideal workaround would be depends_on "icu4c@76" => :build and depends_on "zlib" => :build

I do think we should just add these paths to determine_pkg_config_path. Not sure what is easiest way, maybe just computing them based on (deps - run_time_deps).map(&:runtime_dependencies)

EDIT: Maybe some variation of:

(deps + (deps - run_time_deps).flat_map(&:runtime_dependencies).map(&:to_formula)).uniq!

Copy link
Member

@cho-m cho-m Jan 8, 2025

Choose a reason for hiding this comment

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

Another alternative is the pkg-config rewrite to convert Requires/Requires.private to absolute paths (Homebrew/brew#18229). Haven't found a way of handling whitespace though. May not be possible in current spec and I haven't found much documentation on absolute paths.


venv = virtualenv_create(buildpath/"venv", "python3.12")
venv.pip_install resources
ENV.prepend_path "PATH", venv.root/"bin"
Expand Down
Loading