[Bug]: implicit declaration of function ‘drm_fb_helper_alloc_info’

未關閉
#974 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 6 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
48/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
c, linux
領域
backend

研究方向

The failure is reported in guest additions at /tmp/vbox.0/vbox_fb.c:337 while building against Ubuntu’s Linux 6.8 kernel; the issue also says the build succeeds with 5.15. Start by reading the corresponding vbox_fb.c code and the uploaded build logs, then compare the kernel interfaces used by both versions. Done means guest additions compile successfully against 6.8 without breaking the reported 5.15 build.

由索引模型根據 Issue 內容生成。

描述

bug
Version

7.2.22

Host OS Type

Windows

Host OS name + version

Version 10.0.19045.7846

Host Architecture

x86

Guest OS Type

Linux

Guest Architecture

x86

Guest OS name + version

Ubuntu 22.04.5 LTS

Component

Guest Additions/Other

What happened?

Compiling guest additions in the process of routine upgrade of the kernel to 6.8.0-149 in Ubuntu 22.04.5 LTS I am getting (via apt upgrade):

warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 
12.3.0-1ubuntu1~22.04.3) 12.3.0
  You are using:           gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04.3) 12.3.0

Why is that? They look quite identical to me!

This is fatal, though:

/tmp/vbox.0/vbox_fb.c:337:16: error: implicit declaration of function 
‘drm_fb_helper_alloc_info’; did you mean ‘drm_fb_helper_fill_info’? 
[-Werror=implicit-function-declaration]
  337 |         info = drm_fb_helper_alloc_info(helper);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~
      |                drm_fb_helper_fill_info
/tmp/vbox.0/vbox_fb.c:337:14: warning: assignment to ‘struct fb_info *’ 
from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  337 |         info = drm_fb_helper_alloc_info(helper);
      |              ^
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:243: /tmp/vbox.0/vbox_fb.o] Error 1
make[2]: *** Waiting for unfinished jobs....
# cmd_gen_objtooldep /tmp/vbox.0/vbox_drv.o

Meanwhile, kernel 5.15.0-203 (which comes in the same upgrade) compiled guest additions without any issues.

I'm using the most up to date VirtualBx 7.2.22-175245 with its current extension package of the same version (7.2.22)

How can we reproduce this?

I don't know how can "you" reproduce this, but it's obviously a compilation bug suggesting that some feature macros (such as for the kernel version number) were not placed around the pieces of code, which are version-dependent (because an earlier kernel 5.15.0-203 does not show the same problem).

Did you upload all of your necessary log files, screenshots, etc.?
  • Yes, I've uploaded all pertinent files to this issue.
主要語言
C
星號
1.4k
分支
219
PR 合併指標
30 天內沒有已合併 PR

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

VirtualBox/virtualbox 的其他 Issue

查看 VirtualBox/virtualbox 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。