Bug 258025 - [stable/13/kernel/drm-fbsd13-kmod/linuxkpi] '__stringify' problem at /usr/src/sys/compat/linuxkpi/common/include/linux/kref.h:118:2
Summary: [stable/13/kernel/drm-fbsd13-kmod/linuxkpi] '__stringify' problem at /usr/src...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 13.0-STABLE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-24 16:47 UTC by Tomasz "CeDeROM" CEDRO
Modified: 2021-09-15 02:33 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz "CeDeROM" CEDRO 2021-08-24 16:47:20 UTC
Hello world :-) Some build problems in STABLE/13 branch? :-)


root@0xCFMX4:/usr/src # uname -a
FreeBSD 0xCFMX4 13.0-STABLE FreeBSD 13.0-STABLE #0 stable/13-n246220-a7761d19dac-dirty: Sat Jul 10 02:42:25 CEST 2021     root@0xCFMX4:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64


root@0xCFMX4:/usr/src # git branch
  main
* stable/13


root@0xCFMX4:/usr/src # git log -1
commit 17c83ffd10b528074f1dbdff1a0dfcf130430ef9 (HEAD -> stable/13, origin/stable/13)
Author: Alexander Motin <mav@FreeBSD.org>
Date:   Tue Aug 10 20:03:12 2021 -0400

    ntb_hw_intel(4): Add CTLFLAG_MPSAFE flags.

    I should have added those in 50f16247a1.

    MFC after:      2 weeks

    (cherry picked from commit 94feb1f1eb4c3527efdbd0b3f556eb3cb37c3318)


root@0xCFMX4:/usr/src # make clean; make buildkernel
(..)
cc -target x86_64-unknown-freebsd13.0 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin  -O2 -pipe -fno-common '-DKBUILD_MODNAME="linuxkpi_gplv2"' -DLINUXKPI_VERSION=50000 -DCONFIG_DRM_AMDGPU_CIK -DCONFIG_DRM_AMDGPU_SI -DCONFIG_DRM_AMD_DC -DCONFIG_DRM_AMD_DC_FBC -DCONFIG_DRM_AMD_POWERPLAY -DCONFIG_DRM_I915_ALPHA_SUPPORT -DCONFIG_DRM_I915_FORCE_PROBE='"*"' -DCONFIG_DRM_I915_CAPTURE_ERROR -DCONFIG_DRM_I915_SPIN_REQUEST=5 -DCONFIG_DRM_I915_USERFAULT_AUTOSUSPEND=250 -DCONFIG_DRM_LOAD_EDID_FIRMWARE -DCONFIG_DRM_MIPI_DSI -DCONFIG_DRM_PANEL_ORIENTATION_QUIRKS -DCONFIG_DRM_VMWGFX_FBCON -DCONFIG_DRM_FBDEV_EMULATION -DCONFIG_DRM_FBDEV_OVERALLOC=100 -DCONFIG_DRM_LEGACY -DCONFIG_DRM_VM -DCONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG -DCONFIG_BACKLIGHT_CLASS_DEVICE -DCONFIG_DMI -DCONFIG_FB -DCONFIG_MTRR -DCONFIG_PCI -DCONFIG_PM -DCONFIG_SMP -DCONFIG_ACPI -DCONFIG_ACPI_SLEEP -DCONFIG_AGP -DCONFIG_X86 -DCONFIG_X86_PAT -DCONFIG_64BIT -DCONFIG_AS_MOVNTDQA -DCONFIG_COMPAT -DCONFIG_X64_64 -DCONFIG_DRM_AMD_DC_DCN1_0 -DCONFIG_DRM_AMD_DC_DCN1_01 -DCONFIG_DRM_AMD_DC_DCN2_0 -DCONFIG_DRM_AMD_DC_DSC_SUPPORT  -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -DKLD_TIED -nostdinc  -I/usr/local/sys/modules/drm-fbsd13-kmod/include -I/usr/local/sys/modules/drm-fbsd13-kmod/linuxkpi/dummy/include -I/usr/local/sys/modules/drm-fbsd13-kmod/linuxkpi/gplv2/include -I/usr/src/sys/compat/linuxkpi/common/include -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/amd64.amd64/sys/GENERIC/opt_global.h -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common -g -O0 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -I/usr/obj/usr/src/amd64.amd64/sys/GENERIC     -MD  -MF.depend.linux_compat.o -MTlinux_compat.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error=tautological-compare -Wno-error=empty-body -Wno-error=parentheses-equality -Wno-error=unused-function -Wno-error=pointer-sign -Wno-error=shift-negative-value -Wno-address-of-packed-member -Wno-format-zero-length -Wno-pointer-arith   -mno-aes -mno-avx  -std=iso9899:1999 -c /usr/local/sys/modules/drm-fbsd13-kmod/linuxkpi/gplv2/src/linux_compat.c -o linux_compat.o
In file included from /usr/local/sys/modules/drm-fbsd13-kmod/linuxkpi/gplv2/src/linux_compat.c:10:
In file included from /usr/local/sys/modules/drm-fbsd13-kmod/linuxkpi/gplv2/include/linux/pci.h:10:
In file included from /usr/src/sys/compat/linuxkpi/common/include/linux/pci.h:55:
In file included from /usr/src/sys/compat/linuxkpi/common/include/linux/dmapool.h:37:
In file included from /usr/local/sys/modules/drm-fbsd13-kmod/linuxkpi/gplv2/include/linux/device.h:4:
In file included from /usr/src/sys/compat/linuxkpi/common/include/linux/device.h:36:
In file included from /usr/local/sys/modules/drm-fbsd13-kmod/linuxkpi/gplv2/include/linux/kobject.h:4:
In file included from /usr/src/sys/compat/linuxkpi/common/include/linux/kobject.h:37:
/usr/src/sys/compat/linuxkpi/common/include/linux/kref.h:118:2: error: implicit declaration of function '__stringify' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        WARN_ON(release == NULL);
        ^
/usr/src/sys/compat/linuxkpi/common/include/linux/kernel.h:128:7: note: expanded from macro 'WARN_ON'
                    __stringify(cond), __FILE__, __LINE__);     \
                    ^
In file included from /usr/local/sys/modules/drm-fbsd13-kmod/linuxkpi/gplv2/src/linux_compat.c:10:
In file included from /usr/local/sys/modules/drm-fbsd13-kmod/linuxkpi/gplv2/include/linux/pci.h:10:
In file included from /usr/src/sys/compat/linuxkpi/common/include/linux/pci.h:55:
In file included from /usr/src/sys/compat/linuxkpi/common/include/linux/dmapool.h:37:
In file included from /usr/local/sys/modules/drm-fbsd13-kmod/linuxkpi/gplv2/include/linux/device.h:4:
In file included from /usr/src/sys/compat/linuxkpi/common/include/linux/device.h:36:
In file included from /usr/local/sys/modules/drm-fbsd13-kmod/linuxkpi/gplv2/include/linux/kobject.h:4:
In file included from /usr/src/sys/compat/linuxkpi/common/include/linux/kobject.h:37:
/usr/src/sys/compat/linuxkpi/common/include/linux/kref.h:118:2: error: format specifies type 'char *' but the argument has type 'int' [-Werror,-Wformat]
        WARN_ON(release == NULL);
        ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/compat/linuxkpi/common/include/linux/kernel.h:128:7: note: expanded from macro 'WARN_ON'
                    __stringify(cond), __FILE__, __LINE__);     \
                    ^~~~~~~~~~~~~~~~~
2 errors generated.
*** Error code 1

Stop.
make[4]: stopped in /usr/local/sys/modules/drm-fbsd13-kmod/linuxkpi
*** Error code 1


This is why Linux Sux :-) :-) :-)
Comment 1 Miltiadis Margaronis 2021-09-14 13:41:23 UTC
Hi Tomasz,

Try to remove the DRM kernel module package and try again.
After that install the DRM port which is appropriate (most probably graphics/drm-devel-kmod).
Comment 2 Tomasz "CeDeROM" CEDRO 2021-09-15 02:33:19 UTC
That helped! Thank you Miltiadis :-)