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

[sdl2] build failure on debian sid, make dbus optional dep of sdl2 #40632

Closed
dsvensson opened this issue Aug 25, 2024 · 1 comment · Fixed by #40633
Closed

[sdl2] build failure on debian sid, make dbus optional dep of sdl2 #40632

dsvensson opened this issue Aug 25, 2024 · 1 comment · Fixed by #40633
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@dsvensson
Copy link
Contributor

dsvensson commented Aug 25, 2024

Operating system

Linux (Debian/Sid)

Compiler

gcc

Steps to reproduce the behavior

Install sdl2, which tries to install dbus (which I don't need) which tries to install libsystemd which fails to build because jinja2 is not installed. The real bug is that sdl2 depends on dbus even if it's not requested:

{ "name": "sdl2", "default-features": false, "features": ["wayland", "x11", "alsa"], "platform": "linux" }

This makes the build pull in a huge set of dependencies that are ultimately unused by my application.

Failure logs

Elapsed time to handle liblzma:x64-linux: 29.7 ms
liblzma:x64-linux package ABI: 4b3dd4181f1229be301f610f786c055e3e73cf3607b66a854228e3daba30d182
Installing 26/32 libcap:x64-linux@2.69#5...
Elapsed time to handle libcap:x64-linux: 13 ms
libcap:x64-linux package ABI: c48be7dd6cc5beb48c55ef1a52154d2b8910f586206ded0039b760eba9544021
Installing 27/32 gperf:x64-linux@3.1#6...
Elapsed time to handle gperf:x64-linux: 7.8 ms
gperf:x64-linux package ABI: 33975efbb275813282c4f75dc89158ae991f168e94a4ebcf470f1dc6cc3f38e2
Installing 28/32 libsystemd:x64-linux@256.4...
Building libsystemd:x64-linux@256.4...
-- Found Python version '3.12.5 at /usr/bin/python3'
-- Using meson: /src/vcpkg/downloads/tools/meson-1.5.1-81f7e3/meson.py
-- Using cached systemd-systemd-v256.4.tar.gz.
-- Extracting source /src/vcpkg/downloads/systemd-systemd-v256.4.tar.gz
-- Applying patch disable-warning-nonnull.patch
-- Applying patch only-libsystemd.patch
-- Applying patch pkgconfig.patch
-- Using source at /src/vcpkg/buildtrees/libsystemd/src/v256.4-825386a66f.clean
-- Found external ninja('1.12.1').
-- Configuring x64-linux-dbg
-- Getting CMake variables for x64-linux
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message):
    Command failed: /usr/bin/python3 -I /src/vcpkg/downloads/tools/meson-1.5.1-81f7e3/meson.py setup -Dmode=release -Dstatic-libsystemd=pic -Dtests=false -Ddns-over-tls=false -Dtranslations=false -Dacl=disabled -Dapparmor=disabled -Daudit=disabled -Dblkid=disabled -Dbpf-framework=disabled -Dbzip2=disabled -Ddbus=disabled -Delfutils=disabled -Dfdisk=disabled -Dgcrypt=disabled -Dglib=disabled -Dgnutls=disabled -Dkmod=disabled -Dlibcurl=disabled -Dlibcryptsetup=disabled -Dlibfido2=disabled -Dlibidn=disabled -Dlibidn2=disabled -Dlibiptc=disabled -Dmicrohttpd=disabled -Dopenssl=disabled -Dp11kit=disabled -Dpam=disabled -Dpcre2=disabled -Dpolkit=disabled -Dpwquality=disabled -Dpasswdqc=disabled -Dseccomp=disabled -Dselinux=disabled -Dtpm2=disabled -Dxenctrl=disabled -Dxkbcommon=disabled -Dzlib=disabled -Dlz4=enabled -Dxz=enabled -Dzstd=enabled --backend ninja --wrap-mode nodownload -Doptimization=plain --native /src/vcpkg/buildtrees/libsystemd/meson-x64-linux-dbg.log --libdir lib --pkgconfig.relocatable -Ddebug=true --prefix /src/vcpkg/packages/libsystemd_x64-linux/debug --includedir ../include --pkg-config-path ['/src/vcpkg_installed/x64-linux/debug/lib/pkgconfig','/src/vcpkg_installed/x64-linux/share/pkgconfig'] -Dcmake_prefix_path=['/src/vcpkg_installed/x64-linux/debug','/src/vcpkg_installed/x64-linux'] /src/vcpkg/buildtrees/libsystemd/src/v256.4-825386a66f.clean
    Working Directory: /src/vcpkg/buildtrees/libsystemd/x64-linux-dbg
    Error code: 1
    See logs for more information:
      /src/vcpkg/buildtrees/libsystemd/config-x64-linux-dbg-meson-log.txt.log
      /src/vcpkg/buildtrees/libsystemd/config-x64-linux-dbg-out.log

Call Stack (most recent call first):
  /src/vcpkg_installed/x64-linux/share/vcpkg-tool-meson/vcpkg_configure_meson.cmake:467 (vcpkg_execute_required_process)
  ports/libsystemd/portfile.cmake:17 (vcpkg_configure_meson)
  scripts/ports.cmake:192 (include)


error: building libsystemd:x64-linux failed with: BUILD_FAILED
Elapsed time to handle libsystemd:x64-linux: 29 s
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
  https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+libsystemd
You can submit a new issue at:
  https://github.com/microsoft/vcpkg/issues/new?title=[libsystemd]+Build+error+on+x64-linux&body=Copy+issue+body+from+%2Fsrc%2Fvcpkg_installed%2Fvcpkg%2Fissue_body.md

and after installing some more deps that are of no use to me:

Program check-filesystems.sh found: YES (/home/git/ezquake-nano/vcpkg/buildtrees/libsystemd/src/v254-832da4078b.clean/src/basic/check-filesystems.sh)

../src/v254-832da4078b.clean/src/basic/meson.build:234:8: ERROR: Problem encountered: Unknown filesystems defined in kernel headers:

Filesystem found in kernel header but not in filesystems-gperf.gperf: BCACHEFS_SUPER_MAGIC
Filesystem found in kernel header but not in filesystems-gperf.gperf: PID_FS_MAGIC

Additional context

Removing:

{
      "name": "dbus",
      "default-features": false,
      "platform": "linux"
    },

from ports/sdl2/vcpkg.json solves the issue. Obviously to the dismay of others who have interest in dbus.

@dsvensson dsvensson added the category:port-bug The issue is with a library, which is something the port should already support label Aug 25, 2024
dsvensson added a commit to dsvensson/vcpkg that referenced this issue Aug 25, 2024
dsvensson added a commit to dsvensson/vcpkg that referenced this issue Aug 25, 2024
dsvensson added a commit to dsvensson/vcpkg that referenced this issue Aug 25, 2024
dsvensson added a commit to dsvensson/vcpkg that referenced this issue Aug 25, 2024
@dsvensson dsvensson changed the title [sdl2] build failure on debian sid [sdl2] build failure on debian sid, make dbus optional dep of sdl2 Aug 25, 2024
@dsvensson
Copy link
Contributor Author

dsvensson commented Aug 25, 2024

Here's an example that shows how sdl2 pulls in dbus:

FROM debian:sid

RUN apt-get update && apt-get -qq install --no-install-recommends build-essential git cmake ninja-build autoconf libtool python3 python3-jinja2 curl zip unzip tar ca-certificates libltdl-dev pkg-config

RUN <<EOF cat >> vcpkg.json
{
  "\$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
  "name": "test",
  "version": "1.0.0",
  "dependencies": [
    { "name": "sdl2", "default-features": false }
  ]
}
EOF

RUN git clone https://github.com/microsoft/vcpkg
# RUN git clone https://github.com/dsvensson/vcpkg && (cd vcpkg; git reset --hard origin/patch-1)
RUN VCPKG_DISABLE_METRICS=1 vcpkg/bootstrap-vcpkg.sh && vcpkg/vcpkg install

For some reason that happens to work, perhaps differs when debian sid is installed in vm/hw. But anyways, don't need dbus so making it optional is the way to go, and leads to faster builds if build cache is missing.

The upstream build takes 640.8s. If swapping the git clone in the Dockerfile there, the build finishes in 100.5s seconds. A whooping drop of 540 seconds, or 9 minutes on this particular hardware.

dsvensson added a commit to dsvensson/vcpkg that referenced this issue Aug 26, 2024
dsvensson added a commit to dsvensson/vcpkg that referenced this issue Aug 26, 2024
dsvensson added a commit to dsvensson/vcpkg that referenced this issue Aug 26, 2024
dsvensson added a commit to dsvensson/vcpkg that referenced this issue Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants