[Letux-kernel] build error 5.16-rc3 pvrsgx/1.17.4948957/eurasia_km

H. Nikolaus Schaller hns at goldelico.com
Fri Dec 3 21:56:33 CET 2021


Hi Rene,

> Am 03.12.2021 um 09:48 schrieb Jean Rene Dawin <jdawin at math.uni-bielefeld.de>:
> 
> Hi,
> 
> when compiling letux-5.16-rc3 with letux_defconfig into a separate build
> directory (e.g. make O=/tmp/letux/ ...) I get the following error:
> 
> /home/ploi/letux-kernel/drivers/gpu/drm/pvrsgx/1.17.4948957/eurasia_km/services4/srvkm/bridged/bridged_pvr_bridge.c:46:10: fatal error: stddef.h: No such file or directory
>   46 | #include <stddef.h>
>      |          ^~~~~~~~~~
> compilation terminated.

I had seen that as well, but thought I have fixed it already...
The reason is that there was some implicit import earlier and now we have to explicitly import it.

Yes:

https://git.goldelico.com/?p=letux-kernel.git;a=blobdiff;f=drivers/gpu/drm/pvrsgx/1.17.4948957/eurasia_km/Makefile;h=161018044f2deec78d614c4f7f41df5862c14db2;hp=dedf7e125617e669c0d2751200946cbbd8197256;hb=a6b1f5f95624d6eadd3a844bf45b99b736ec729e;hpb=1c6aac560ef688b4a3a8c3ca757882ac82009789

Well, this workd for in-tree compile only.

> 
> It can be fixed with this change:
> 
> diff --git a/drivers/gpu/drm/pvrsgx/1.17.4948957/eurasia_km/Makefile b/drivers/gpu/drm/pvrsgx/1.17.4948957/eurasia_km/Makefile
> index 161018044f2d..3b2a03eb29aa 100644
> --- a/drivers/gpu/drm/pvrsgx/1.17.4948957/eurasia_km/Makefile
> +++ b/drivers/gpu/drm/pvrsgx/1.17.4948957/eurasia_km/Makefile
> @@ -55,7 +55,7 @@ ccflags-y += \
>        -I$(srctree)/$(src)/services4/srvkm/hwdefs \
>        -I$(srctree)/$(src)/services4/srvkm/include \
>        -I$(srctree)/$(src)/services4/3rdparty/bufferclass_ti \
> -       -Iinclude/linux
> +       -I$(srctree)/include/linux
> 
> # choose SoC integration variant to choose the right source subtree
> 
> 
> Is this a sane approach?

Basically yes.

Obviously I forgot about the out-of tree build.

I have tried this patch:

diff --git a/drivers/gpu/drm/pvrsgx/1.17.4948957/eurasia_km/Makefile b/drivers/gpu/drm/pvrsgx/1.17.4948957/eurasia_km/Makefile
index 161018044f2de..88534e94847de 100644
--- a/drivers/gpu/drm/pvrsgx/1.17.4948957/eurasia_km/Makefile
+++ b/drivers/gpu/drm/pvrsgx/1.17.4948957/eurasia_km/Makefile
@@ -40,9 +40,9 @@ ccflags-y += -D$(SOC_VENDOR)_$(SOC)_$(SGX)_$(SGX_REV)
 ccflags-y += -DSGX_CORE_REV=$(SGX_REV)
 
 ccflags-y += \
-       -Iinclude \
-       -Iarch/arm/mach-omap2 \
-       -Idrivers/video/fbdev/omap2 \
+       -I$(srctree)/include \
+       -I$(srctree)/arch/arm/mach-omap2 \
+       -I$(srctree)/drivers/video/fbdev/omap2 \
        -I$(srctree)/$(src)/ \
        -I$(srctree)/$(src)/include4 \
        -I$(srctree)/$(src)/services4/include \
@@ -55,7 +55,7 @@ ccflags-y += \
        -I$(srctree)/$(src)/services4/srvkm/hwdefs \
        -I$(srctree)/$(src)/services4/srvkm/include \
        -I$(srctree)/$(src)/services4/3rdparty/bufferclass_ti \
-       -Iinclude/linux
+       -I$(srctree)/include/linux
 
 # choose SoC integration variant to choose the right source subtree
 
@@ -231,8 +231,8 @@ endif
 # gives duplicate export of drm_pvr_dev_add etc.
 # $(TARGET) += services4/3rdparty/linux_drm/pvr_drm_stubs.o
 
-ccflags-y += -Iinclude/drm \
-       -I$(src)/services4/3rdparty/linux_drm
+ccflags-y += -I$(srctree)/include/drm \
+       -I$(srctree)/$(src)/services4/3rdparty/linux_drm
 
 ccflags-y += -DSUPPORT_HW_RECOVERY
 ccflags-y += -DPVR_LINUX_USING_WORKQUEUES
@@ -270,7 +270,7 @@ endif
 ifneq ($(SUPPORT_OMAPLFB),)
 
 ccflags-y += \
-       -I$(src)/services4/3rdparty/dc_omapfb3_linux \
+       -I$(srctree)/$(src)/services4/3rdparty/dc_omapfb3_linux \
        -DFBDEV_PRESENT=1 \
        -DSUPPORT_OMAP3430_OMAPFB3 \
        -DDISPLAY_CONTROLLER=omaplfb \

and it builds fine in-tree and makes everything more consistent.

Just a note: moving the -I$(srctree)/include/linux behind -I$(srctree)/drivers/video/fbdev/omap2
makes the build fail. Perhaps a name-clash of some other include files.

The same patch should be for drivers/gpu/drm/pvrsgx/1.14.3759903/eurasia_km/Makefile
and drivers/gpu/drm/pvrsgx/1.14.3699939/eurasia_km/Makefile where the
latter is missing all $(srctree)/ prefixes.

BR and thanks,
Nikolaus



More information about the Letux-kernel mailing list