Skip to content

Regression in 25.2.x on macOS: hw/xquartz/GL/indirect.c pulls in dri.h, which unconditionally pulls Linux headers #3462

Description

@barracuda156

Select the version

25.1.X

Describe your issue

Somehow this include/dri.h started breaking macOS build, since it includes unconditionally headers which should not be included on macOS. Not sure yet why.

Steps to reproduce

Run the build.

What did you expect?

No response

Additional Information

:info:build FAILED: [code=1] hw/xquartz/GL/libCGLCore.a.p/indirect.c.o 
:info:build /opt/local/bin/gcc-mp-16 -Ihw/xquartz/GL/libCGLCore.a.p -Ihw/xquartz/GL -I../xserver-25.2.2/hw/xquartz/GL -I. -I../xserver-25.2.2 -IXext -I../xserver-25.2.2/Xext -IXext/dri2 -I../xserver-25.2.2/Xext/dri2 -I../xserver-25.2.2/exa -Ifb -I../xserver-25.2.2/fb -I../xserver-25.2.2/glamor -Imi -I../xserver-25.2.2/mi -Imiext/damage -I../xserver-25.2.2/miext/damage -Imiext/shadow -I../xserver-25.2.2/miext/shadow -Imiext/sync -I../xserver-25.2.2/miext/sync -Idix -I../xserver-25.2.2/dix -Iinclude -I../xserver-25.2.2/include -Ihw/xquartz -I../xserver-25.2.2/hw/xquartz -Ihw/xquartz/xpr -I../xserver-25.2.2/hw/xquartz/xpr -I/opt/local/include/pixman-1 -I/opt/local/include -fdiagnostics-color=always -Wall -Winvalid-pch -std=gnu99 -O2 -g -fno-strict-aliasing -fvisibility=hidden -fno-common -Wchar-subscripts -Wchar-subscripts -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=array-bounds -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Woverride-init -Wshift-negative-value -Wvla -Wincompatible-pointer-types -pipe -Os -Wno-error=array-bounds= -Wno-error=implicit-function-declaration -Wno-error=int-conversion -Wno-error=incompatible-pointer-types -arch ppc -MD -MQ hw/xquartz/GL/libCGLCore.a.p/indirect.c.o -MF hw/xquartz/GL/libCGLCore.a.p/indirect.c.o.d -o hw/xquartz/GL/libCGLCore.a.p/indirect.c.o -c ../xserver-25.2.2/hw/xquartz/GL/indirect.c
:info:build In file included from ../xserver-25.2.2/hw/xquartz/GL/indirect.c:51:
:info:build ../xserver-25.2.2/include/dri.h:37:10: fatal error: pciaccess.h: No such file or directory
:info:build    37 | #include <pciaccess.h>
:info:build       |          ^~~~~~~~~~~~~
:info:build compilation terminated.

:info:build [1/122] /opt/local/bin/gcc-mp-16 -Ihw/xquartz/GL/libCGLCore.a.p -Ihw/xquartz/GL -I../xserver-25.2.2/hw/xquartz/GL -I. -I../xserver-25.2.2 -IXext -I../xserver-25.2.2/Xext -IXext/dri2 -I../xserver-25.2.2/Xext/dri2 -I../xserver-25.2.2/exa -Ifb -I../xserver-25.2.2/fb -I../xserver-25.2.2/glamor -Imi -I../xserver-25.2.2/mi -Imiext/damage -I../xserver-25.2.2/miext/damage -Imiext/shadow -I../xserver-25.2.2/miext/shadow -Imiext/sync -I../xserver-25.2.2/miext/sync -Idix -I../xserver-25.2.2/dix -Iinclude -I../xserver-25.2.2/include -Ihw/xquartz -I../xserver-25.2.2/hw/xquartz -Ihw/xquartz/xpr -I../xserver-25.2.2/hw/xquartz/xpr -I/opt/local/include/pixman-1 -I/opt/local/include -fdiagnostics-color=always -Wall -Winvalid-pch -std=gnu99 -O2 -g -fno-strict-aliasing -fvisibility=hidden -fno-common -Wchar-subscripts -Wchar-subscripts -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=array-bounds -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Woverride-init -Wshift-negative-value -Wvla -Wincompatible-pointer-types -pipe -Os -Wno-error=array-bounds= -Wno-error=implicit-function-declaration -Wno-error=int-conversion -Wno-error=incompatible-pointer-types -arch ppc -MD -MQ hw/xquartz/GL/libCGLCore.a.p/indirect.c.o -MF hw/xquartz/GL/libCGLCore.a.p/indirect.c.o.d -o hw/xquartz/GL/libCGLCore.a.p/indirect.c.o -c ../xserver-25.2.2/hw/xquartz/GL/indirect.c
:info:build FAILED: [code=1] hw/xquartz/GL/libCGLCore.a.p/indirect.c.o 
:info:build /opt/local/bin/gcc-mp-16 -Ihw/xquartz/GL/libCGLCore.a.p -Ihw/xquartz/GL -I../xserver-25.2.2/hw/xquartz/GL -I. -I../xserver-25.2.2 -IXext -I../xserver-25.2.2/Xext -IXext/dri2 -I../xserver-25.2.2/Xext/dri2 -I../xserver-25.2.2/exa -Ifb -I../xserver-25.2.2/fb -I../xserver-25.2.2/glamor -Imi -I../xserver-25.2.2/mi -Imiext/damage -I../xserver-25.2.2/miext/damage -Imiext/shadow -I../xserver-25.2.2/miext/shadow -Imiext/sync -I../xserver-25.2.2/miext/sync -Idix -I../xserver-25.2.2/dix -Iinclude -I../xserver-25.2.2/include -Ihw/xquartz -I../xserver-25.2.2/hw/xquartz -Ihw/xquartz/xpr -I../xserver-25.2.2/hw/xquartz/xpr -I/opt/local/include/pixman-1 -I/opt/local/include -fdiagnostics-color=always -Wall -Winvalid-pch -std=gnu99 -O2 -g -fno-strict-aliasing -fvisibility=hidden -fno-common -Wchar-subscripts -Wchar-subscripts -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=array-bounds -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Woverride-init -Wshift-negative-value -Wvla -Wincompatible-pointer-types -pipe -Os -Wno-error=array-bounds= -Wno-error=implicit-function-declaration -Wno-error=int-conversion -Wno-error=incompatible-pointer-types -arch ppc -MD -MQ hw/xquartz/GL/libCGLCore.a.p/indirect.c.o -MF hw/xquartz/GL/libCGLCore.a.p/indirect.c.o.d -o hw/xquartz/GL/libCGLCore.a.p/indirect.c.o -c ../xserver-25.2.2/hw/xquartz/GL/indirect.c
:info:build In file included from ../xserver-25.2.2/hw/xquartz/GL/indirect.c:51:
:info:build ../xserver-25.2.2/include/dri.h:38:10: fatal error: xf86dri.h: No such file or directory
:info:build    38 | #include "xf86dri.h"
:info:build       |          ^~~~~~~~~~~
:info:build compilation terminated.

Extra fields

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageThis needs to be reviewed and categorized.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions