Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 820713 - sys-kernel/gentoo-sources-5.14.14: a lot of undefined references
Summary: sys-kernel/gentoo-sources-5.14.14: a lot of undefined references
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL: https://git.kernel.org/pub/scm/linux/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-29 13:43 UTC by Raymond Jennings
Modified: 2021-11-19 20:10 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (einfo.txt,6.20 KB, text/plain)
2021-10-29 13:44 UTC, Raymond Jennings
Details
kernel config where it builds successfully (goodconfig,144.68 KB, text/plain)
2021-10-29 13:45 UTC, Raymond Jennings
Details
kernel config where it chokes on a link error (badconfig,144.65 KB, text/plain)
2021-10-29 13:51 UTC, Raymond Jennings
Details
Patch to fix CONFIG_FB dependency (fb_helper_fox_CONFIG_FB_dependency.patch,1.46 KB, patch)
2021-10-30 14:56 UTC, Mike Pagano
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Raymond Jennings 2021-10-29 13:43:43 UTC
Attemting to compile drm_i915 as built in instead of a module causes the following stream of link errors:

x86_64-pc-linux-gnu-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_set_suspend':
(.text+0x2a8): undefined reference to `fb_set_suspend'
x86_64-pc-linux-gnu-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_resume_worker':
drm_fb_helper.c:(.text+0x2c5): undefined reference to `fb_set_suspend'
x86_64-pc-linux-gnu-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_unregister_fbi':
(.text+0x2e4): undefined reference to `unregister_framebuffer'
x86_64-pc-linux-gnu-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_sys_read':
(.text+0x2f6): undefined reference to `fb_sys_read'
x86_64-pc-linux-gnu-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_fini':
(.text+0x8b5): undefined reference to `framebuffer_release'
x86_64-pc-linux-gnu-ld: (.text+0x954): undefined reference to `fb_dealloc_cmap'
x86_64-pc-linux-gnu-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_alloc_fbi':
(.text+0xaf0): undefined reference to `framebuffer_alloc'
x86_64-pc-linux-gnu-ld: (.text+0xb0e): undefined reference to `fb_alloc_cmap'
x86_64-pc-linux-gnu-ld: (.text+0xb1d): undefined reference to `framebuffer_release'
x86_64-pc-linux-gnu-ld: (.text+0xb81): undefined reference to `fb_dealloc_cmap'
x86_64-pc-linux-gnu-ld: drivers/gpu/drm/drm_fb_helper.o: in function `__drm_fb_helper_initial_config_and_unlock':
drm_fb_helper.c:(.text+0xef2): undefined reference to `register_framebuffer'
x86_64-pc-linux-gnu-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_generic_probe':
drm_fb_helper.c:(.text+0x1178): undefined reference to `fb_deferred_io_init'
x86_64-pc-linux-gnu-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_set_suspend_unlocked':
(.text+0x125a): undefined reference to `fb_set_suspend'
x86_64-pc-linux-gnu-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_cfb_imageblit':
(.text+0x18de): undefined reference to `cfb_imageblit'
x86_64-pc-linux-gnu-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_cfb_copyarea':
(.text+0x190e): undefined reference to `cfb_copyarea'
x86_64-pc-linux-gnu-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_cfb_fillrect':
(.text+0x193e): undefined reference to `cfb_fillrect'
x86_64-pc-linux-gnu-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_sys_imageblit':
(.text+0x196e): undefined reference to `sys_imageblit'
x86_64-pc-linux-gnu-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_sys_copyarea':
(.text+0x199e): undefined reference to `sys_copyarea'
x86_64-pc-linux-gnu-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_sys_fillrect':
(.text+0x19ce): undefined reference to `sys_fillrect'
x86_64-pc-linux-gnu-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_sys_write':
(.text+0x19fe): undefined reference to `fb_sys_write'
x86_64-pc-linux-gnu-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fbdev_fb_fillrect':
drm_fb_helper.c:(.text+0x1ae4): undefined reference to `cfb_fillrect'
x86_64-pc-linux-gnu-ld: drm_fb_helper.c:(.text+0x1b03): undefined reference to `sys_fillrect'
x86_64-pc-linux-gnu-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fbdev_fb_imageblit':
drm_fb_helper.c:(.text+0x1b34): undefined reference to `cfb_imageblit'
x86_64-pc-linux-gnu-ld: drm_fb_helper.c:(.text+0x1b53): undefined reference to `sys_imageblit'
x86_64-pc-linux-gnu-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fbdev_fb_copyarea':
drm_fb_helper.c:(.text+0x1b84): undefined reference to `cfb_copyarea'
x86_64-pc-linux-gnu-ld: drm_fb_helper.c:(.text+0x1ba3): undefined reference to `sys_copyarea'
x86_64-pc-linux-gnu-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fbdev_cleanup':
drm_fb_helper.c:(.text+0x1bde): undefined reference to `fb_deferred_io_cleanup'
x86_64-pc-linux-gnu-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fbdev_client_unregister':
drm_fb_helper.c:(.text+0x1c79): undefined reference to `unregister_framebuffer'
make: *** [Makefile:1183: vmlinux] Error 1


Reproducible: Always

Steps to Reproduce:
1.  Use genkernel
2.  Try to compile i915 as built in
Actual Results:  
link error

Expected Results:  
A built kernel

I suspect some sort of dependency glitch in the kernel's module information.
Comment 1 Raymond Jennings 2021-10-29 13:44:26 UTC
Created attachment 747270 [details]
emerge --info
Comment 2 Raymond Jennings 2021-10-29 13:45:35 UTC
Created attachment 747273 [details]
kernel config where it builds successfully
Comment 3 Raymond Jennings 2021-10-29 13:51:00 UTC
Created attachment 747276 [details]
kernel config where it chokes on a link error

Also, this may be a bug in genkernel itself, but when I used "--no-clean" to minimize rebuild work to test the bad config again, the failed compilation didn't cause genkernel to stop.

make: *** [Makefile:1183: vmlinux] Error 1
* Shall copy new kernel image, symlinks not being handled by genkernel.
* Actual image file '/boot/vmlinuz-5.14.14-gentoo-x86_64' does exist.
* Actual old image file '/boot/vmlinuz-5.14.14-gentoo-x86_64.old' does NOT exist.
* Same base version (vmlinuz-5.14.14-gentoo-x86_64).
* Moving '/boot/vmlinuz-5.14.14-gentoo-x86_64' to '/boot/vmlinuz-5.14.14-gentoo-x86_64.old' ...
* Copying '/usr/src/linux/arch/x86_64/boot/bzImage' to '/boot/vmlinuz-5.14.14-gentoo-x86_64' ...
* Shall copy new System.map image, symlinks not being handled by genkernel.
* Actual image file '/boot/System.map-5.14.14-gentoo-x86_64' does exist.
* Actual old image file '/boot/System.map-5.14.14-gentoo-x86_64.old' does NOT exist.
* Same base version (System.map-5.14.14-gentoo-x86_64).
* Moving '/boot/System.map-5.14.14-gentoo-x86_64' to '/boot/System.map-5.14.14-gentoo-x86_64.old' ...
* Copying '/usr/src/linux/System.map' to '/boot/System.map-5.14.14-gentoo-x86_64' ...
*         >> Compiling 5.14.14-gentoo-x86_64 modules ...
Comment 4 Raymond Jennings 2021-10-29 13:58:56 UTC
I was able to fix this by setting CONFIG_FB to Y instead of M
Comment 5 Mike Pagano gentoo-dev 2021-10-30 14:56:51 UTC
Created attachment 747495 [details, diff]
Patch to fix CONFIG_FB dependency

Can you apply this patch and report back ?
Comment 6 Raymond Jennings 2021-10-30 16:04:41 UTC
It works
Comment 7 Raymond Jennings 2021-10-30 17:02:15 UTC
Uh, jumped the gun.

The patch makes it compile, but leaving CONFIG_FB as a module causes a complete blackout on the screen on boot.
Comment 8 Mike Pagano gentoo-dev 2021-11-03 18:41:29 UTC
(In reply to Raymond Jennings from comment #7)
> Uh, jumped the gun.
> 
> The patch makes it compile, but leaving CONFIG_FB as a module causes a
> complete blackout on the screen on boot.

no console ?

Anything in dmesg ? or are you booting into a window manager?
Comment 9 Mike Pagano gentoo-dev 2021-11-19 20:07:20 UTC
This patch is in 5.14.19 and 5.15.3
Comment 10 Raymond Jennings 2021-11-19 20:10:08 UTC
(In reply to Mike Pagano from comment #8)
> (In reply to Raymond Jennings from comment #7)
> > Uh, jumped the gun.
> > 
> > The patch makes it compile, but leaving CONFIG_FB as a module causes a
> > complete blackout on the screen on boot.
> 
> no console ?
> 
> Anything in dmesg ? or are you booting into a window manager?

Early in the boot process, before the window manager even starts.

Timing seems to be right when the framebuffer activates and takes over for the vga console