Skip to content

Conversation

@Dentrax
Copy link
Member

@Dentrax Dentrax commented Jul 18, 2025

BLOCKED by: #59972

configure: error: Package requirements (xproto x11 xextproto xext xf86miscproto) were not met:

Package 'xf86miscproto' not found

Fixes:

Related:

Pre-review Checklist

For new package PRs only

  • This PR is marked as fixing a pre-existing package request bug
    • Alternatively, the PR is marked as related to a pre-existing package request bug, such as a dependency
  • REQUIRED - The package is available under an OSI-approved or FSF-approved license
  • REQUIRED - The version of the package is still receiving security updates
  • This PR links to the upstream project's support policy (e.g. endoflife.date)

For new version streams

  • The upstream project actually supports multiple concurrent versions.
  • Any subpackages include the version string in their package name (e.g. name: ${{package.name}}-compat)
  • The package (and subpackages) provides: logical unversioned forms of the package (e.g. nodejs, nodejs-lts)
  • If non-streamed package names no longer built, open PR to withdraw them (see WITHDRAWING PACKAGES)

For package updates (renames) in the base images

When updating packages part of base images (i.e. cgr.dev/chainguard/wolfi-base or ghcr.io/wolfi-dev/sdk)

  • REQUIRED cgr.dev/chainguard/wolfi-base and ghcr.io/wolfi-dev/sdk images successfully build
  • REQUIRED cgr.dev/chainguard/wolfi-base and ghcr.io/wolfi-dev/sdk contain no obsolete (no longer built) packages
  • Upon launch, does apk upgrade --latest successfully upgrades packages or performs no actions

For security-related PRs

  • The security fix is recorded in the advisories repo

For version bump PRs

  • The epoch field is reset to 0

For PRs that add patches

  • Patch source is documented

@octo-sts
Copy link
Contributor

octo-sts bot commented Jul 18, 2025

📦 Build Failed: Missing Dependency

configure: error: Package requirements (xproto x11 xextproto xext xf86miscproto) were not met: Package 'xf86miscproto' not found

Build Details

Category Details
Build System autoconf
Failure Point ./configure

Root Cause Analysis 🔍

The build is attempting to compile libXxf86misc-1.0.4 but is missing a required dependency 'xf86miscproto'. The package manager (pkg-config) cannot find this protocol header package which is needed for compilation. This is a common issue in X11 library builds where protocol definition headers are separate packages.


🔍 Build failure fix suggestions

Found similar build failures that have been fixed in the past and analyzed them to suggest a fix:

Suggested Changes

File: Melange YAML file

  • add at line after the fetch uses step (pipeline section before autoconf/configure)
    Original:
  - uses: autoconf/configure

Replacement:

  - uses: patch/collection
    with:
      patches: 
        - patches/0001-use-xorgproto.patch

  - uses: autoconf/configure

Content:

Add a patch collection step to apply a fix for the xf86miscproto dependency
  • add at line new file (patches directory)
    Replacement:
diff --git a/configure.ac b/configure.ac
index abc123..def456 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,7 +43,7 @@
 
 # Obtain compiler/linker options for dependencies
 PKG_CHECK_MODULES(XXF86MISC, [xproto x11 xextproto xext xf86miscproto])
+PKG_CHECK_MODULES(XXF86MISC, [xproto x11 xextproto xext])
 
 AC_CONFIG_FILES([Makefile
		 src/Makefile

Content:

Create a patch file that modifies the configure.ac to use xorgproto instead of xf86miscproto

File: Melange YAML file

  • modify at line near line with xorgproto (environment.contents.packages section)
    Original:
      - xorgproto

Replacement:

      - xorgproto
      - xorg-x11-util-macros

Content:

Add xorg-x11-util-macros which may contain additional required build tools

File: Melange YAML file

  • add at line before autoconf/configure (after fetch step)
    Original:
  - uses: autoconf/configure

Replacement:

  - runs: |
      sed -i 's/xf86miscproto//g' configure.ac
      autoreconf -fiv

  - uses: autoconf/configure

Content:

Alternative approach: use a runs step to directly modify the configure.ac file and regenerate the configure script
Click to expand fix analysis

Analysis

The build failure shows that the package 'xf86miscproto' is missing during the configuration of libXxf86misc-1.0.4. This is a common issue in X11 library builds where specific protocol headers are needed as dependencies. The error occurs during the ./configure stage when pkg-config checks for required packages: "xproto x11 xextproto xext xf86miscproto".

Looking at the Melange YAML file, the environment section already includes 'xorgproto' package, which is the modern consolidated package that includes various X11 protocol definitions including xf86miscproto. However, it appears that the build system isn't finding the xf86miscproto definitions specifically, likely because it's looking for the older individual package name rather than the consolidated xorgproto package.

Click to expand fix explanation

Explanation

The build failure is caused by the configure script looking for the deprecated 'xf86miscproto' package, which has been consolidated into the newer 'xorgproto' package in modern X.Org distributions.

There are two main approaches to fix this:

  1. The primary suggested fix is to create a patch that modifies the configure.ac file to remove the dependency on 'xf86miscproto', as this functionality is already provided by the 'xorgproto' package that's included in the environment. The patch would need to be applied before the configure step runs.

  2. Alternatively, we can add a direct modification using a 'runs' step to edit the configure.ac file and then run autoreconf to regenerate the configure script. This approach is more direct but less maintainable than using a proper patch file.

In either case, the fix works because:

  1. The 'xorgproto' package in modern X.Org distributions contains the definitions previously found in individual proto packages including xf86miscproto
  2. By removing the explicit dependency on the old package name, we allow the build to proceed with the consolidated package
  3. All the necessary header files and definitions are already available through xorgproto, so the build should complete successfully

Additionally, adding 'xorg-x11-util-macros' may be helpful as it contains common build tools and macros used by X.Org packages, which could provide additional required dependencies for the autoconf process.

Click to expand alternative approaches

Alternative Approaches

  • Create a symbolic link from the xf86miscproto.pc location to the corresponding definitions in xorgproto during the build
  • Add a configure flag to explicitly specify the location of xf86miscproto headers within the xorgproto package
  • Update the package to a newer version if available that might use the consolidated xorgproto package instead of individual proto packages
  • Create a separate xf86miscproto package in Wolfi that extracts just those headers from xorgproto if needed by multiple packages

Was this comment helpful? Please use 👍 or 👎 reactions on this comment.

@octo-sts octo-sts bot added the ai/skip-comment Stop AI from commenting on PR label Jul 18, 2025
@Dentrax Dentrax force-pushed the libXxf86misc branch 2 times, most recently from 182095d to 66c0a11 Compare July 18, 2025 14:05
dannf pushed a commit that referenced this pull request Jul 21, 2025
Part 1/2:

`xf86miscproto` is deprecated and replaced with `xorgproto`:
https://gitlab.freedesktop.org/xorg/proto/xf86miscproto/-/blob/master/autogen.sh?ref_type=heads

To build this: #59993 we do need
some headers. It builds if we do enable xorgproto with legacy support.
libx11-dev doesn't provide `xf86mscstr.h`.

But some headers like `XKBgeom.h XKBsrv.h XKBstr.h` is still provided by
`libx11`, which resulting conflict during install:

```
installing apk packages: installing packages: installing libx11-dev (ver:1.8.12-r1 arch:aarch64): unable to install files for pkg libx11-dev: writing header for "usr/include/X11/extensions/XKBgeom.h": packages map[libx11-dev:libx11 xorgproto:xorgproto] has conflicting file: "usr/include/X11/extensions/XKBgeom.h"
```

So remove those from libx11 and re-build xorgproto with having those
headers. So we can build `libXxf86misc`.

Signed-off-by: Dentrax <furkan.turkal@chainguard.dev>
Dentrax added a commit that referenced this pull request Jul 21, 2025
Part 1/2: #60251

Part 2/2:

`xf86miscproto` is deprecated and replaced with `xorgproto`:
https://gitlab.freedesktop.org/xorg/proto/xf86miscproto/-/blob/master/autogen.sh?ref_type=heads

To build this: #59993 we do need
some headers. It builds if we do enable xorgproto with legacy support.
libx11-dev doesn't provide `xf86mscstr.h`.

But some headers like `XKBgeom.h XKBsrv.h XKBstr.h` is still provided by
`libx11`, which resulting conflict during install:

```
installing apk packages: installing packages: installing libx11-dev (ver:1.8.12-r1 arch:aarch64): unable to install files for pkg libx11-dev: writing header for "usr/include/X11/extensions/XKBgeom.h": packages map[libx11-dev:libx11 xorgproto:xorgproto] has conflicting file: "usr/include/X11/extensions/XKBgeom.h"
```

So remove those from libx11 and re-build xorgproto with having those
headers. So we can build `libXxf86misc`.

Signed-off-by: Dentrax <furkan.turkal@chainguard.dev>
Dentrax added 4 commits July 21, 2025 20:42
Signed-off-by: Dentrax <furkan.turkal@chainguard.dev>
Signed-off-by: Dentrax <furkan.turkal@chainguard.dev>
Signed-off-by: Dentrax <furkan.turkal@chainguard.dev>
Signed-off-by: Dentrax <furkan.turkal@chainguard.dev>
@octo-sts octo-sts bot added the bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. label Jul 21, 2025
@Dentrax Dentrax marked this pull request as ready for review July 21, 2025 17:51
Copy link
Member

@tulilirockz tulilirockz left a comment

Choose a reason for hiding this comment

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

Tiny nits around dependencies, looking great though!

Signed-off-by: Dentrax <furkan.turkal@chainguard.dev>
Co-authored-by: Arthur Exaltação <arthur.exaltacao@chainguard.dev>
@Dentrax
Copy link
Member Author

Dentrax commented Jul 21, 2025

Tiny nits around dependencies, looking great though!

Thanks, good catch! It seems mostly b/c of copy/paste stuff.

@Dentrax Dentrax requested a review from tulilirockz July 21, 2025 20:48
@Dentrax Dentrax merged commit 297a373 into wolfi-dev:main Jul 21, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/skip-comment Stop AI from commenting on PR bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants