Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 14809 - gentoo-sources linker breakage: undefined reference to sis_free
Summary: gentoo-sources linker breakage: undefined reference to sis_free
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Jay Pfeifer (RETIRED)
URL: http://forums.gentoo.org/viewtopic.ph...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-30 18:02 UTC by Per Cederberg
Modified: 2003-07-12 16:47 UTC (History)
1 user (show)

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


Attachments
doc fix for sis issue (905_sis_doc_fix.diff,727 bytes, patch)
2003-07-12 16:47 UTC, Jay Pfeifer (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Per Cederberg 2003-01-30 18:02:51 UTC
When installing Gentoo Linux 1.4.rc2 some week ago, I stumbled across a kernel
compilation breakage (gentoo-sources):

--- START LISTING ---

ld -m elf_i386 -T /usr/src/linux-2.4.19-gentoo-r10/arch/i386/vmlinux.lds -e
stext arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/main.o
init/version.o init/do_mounts.o \
        --start-group \
        arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o mm/mm.o
fs/fs.o ipc/ipc.o \
         drivers/char/char.o drivers/block/block.o drivers/misc/misc.o
drivers/net/net.o drivers/media/media.o drivers/char/agp/agp.o
drivers/char/drm/drm.o drivers/ide/idedriver.o drivers/scsi/scsidrv.o
drivers/cdrom/driver.o drivers/sound/sounddrivers.o drivers/pci/driver.o
drivers/pnp/pnp.o drivers/video/video.o drivers/usb/usbdrv.o \
        net/network.o \
        grsecurity/grsec.o \
        crypto/crypto.o \
        /usr/src/linux-2.4.19-gentoo-r10/arch/i386/lib/lib.a
/usr/src/linux-2.4.19-gentoo-r10/lib/lib.a
/usr/src/linux-2.4.19-gentoo-r10/arch/i386/lib/lib.a \
        --end-group \
        -o vmlinux
drivers/char/drm/drm.o(.text+0x5a34): In function `sis_fb_alloc':
: undefined reference to `sis_malloc'
drivers/char/drm/drm.o(.text+0x5abf): In function `sis_fb_alloc':
: undefined reference to `sis_free'
drivers/char/drm/drm.o(.text+0x5b09): In function `sis_fb_free':
: undefined reference to `sis_free'
drivers/char/drm/drm.o(.text+0x5e3d): In function `sis_final_context':
: undefined reference to `sis_free'
make: *** [vmlinux] Error 1 

--- END LISTING ---

The problem is related to the compilation of the kernel support for my SiS 651
graphics card. I have selected support for the card to be compiled directly into
the kernel through the following two options:

o Character Devices --> Generic SiS support (under /dev/agpgart)
o Character Devices --> SiS (under DRM 4.1 drivers)

The problem could be worked around by adding framebuffer support to the kernel
through by enabling the following options:

o Console drivers --> Frame-buffer support --> Support for frame buffer
o Console drivers --> Frame-buffer support --> SiS acceleration

Reading the make listing above, the error seems to come from the SiS DRM module
sharing code with the SiS framebuffer driver. I assume that this could be
resolved by modifying the appropriate Makefiles to include compilation and
linkage of the sis_main.c file. Alternatively there is some compilation flag
that hasn't been set properly that cause the method 'sis_fb_alloc' to be compiled.

At the very minimum, the help text for the SiS DRM module should mention that
framebuffer support for SiS must also be enabled (although that seems like an ad
hoc requirement).
Comment 1 Donnie Berkholz (RETIRED) gentoo-dev 2003-07-07 11:42:36 UTC
Please see bug #23804 and especially http://www.winischhofer.net/sisdri.shtml for some more info on what I assume this problem is. Also please use the xfree-drm package instead of the DRM in the kernel, as it doesn't work with xfree-4.3. Here's a guide on this: http://www.gentoo.org/doc/en/dri-howto.xml. I'll add a warning to the xfree-drm ebuild that sis framebuffer has to be enabled.
Comment 2 Per Cederberg 2003-07-12 06:33:54 UTC
Ok, so it seems that the framebuffer driver is required for the 
SiS DRI driver. Hence the compilation breakage.

It would be great if someone would create a build configuration 
patch to the 2.4.20 kernel (and 2.4.21 now I guess) to fix the 
help text and add a dependency. The SiS framebuffer support should
really be enabled automagically when someone selects the SiS DRI
driver.
Comment 3 Per Cederberg 2003-07-12 07:38:19 UTC
I'm no expert on kernel configuration, but it looks like options do not
generally get enabled automatically. So, I'll have to satisfy with the
following small documentation fix instead:


Old Documentation/Configure.help:

CONFIG_DRM_SIS
  Choose this option if you have a SIS graphics card. AGP support is
  required for this driver to work.


New Documentation/Configure.help:

CONFIG_DRM_SIS
  Choose this option if you have a SIS graphics card. AGP support is
  required for this driver to work.
 
  Note that support for the SiS framebuffer driver is REQUIRED for this 
  option to work.
Comment 4 Jay Pfeifer (RETIRED) gentoo-dev 2003-07-12 16:47:16 UTC
Created attachment 14418 [details, diff]
doc fix for sis issue

Ok - I added this patch to the current pfeifer-sources tree. This should apply
to past gentoo-sources still in portage. Nonetheless, this should be an
adequate fix.

Sample patch command:
patch -p1 -s -N -E -d /usr/src/linux/ < 905_sis_doc_fix.diff

Thanks,

Jay
Comment 5 Jay Pfeifer (RETIRED) gentoo-dev 2003-07-12 16:47:59 UTC
closing.