Bug 3470 - vga/generic.c will not link if XF1Bpp or XF4Bpp is undefined
Summary: vga/generic.c will not link if XF1Bpp or XF4Bpp is undefined
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/VGA (show other bugs)
Version: git
Hardware: All All
: high normal
Assignee: Xorg Project Team
QA Contact:
Keywords: patch
Depends on:
Reported: 2005-06-04 20:41 UTC by Bill Randle
Modified: 2006-06-03 02:38 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

diff to fix 1bpp and 4bpp problem (935 bytes, patch)
2005-06-04 20:43 UTC, Bill Randle
no flags Details | Splinter Review

Description Bill Randle 2005-06-04 20:41:16 UTC
In the generic vga code it always references xf1bppScreenInit() and
xf4bppScreenInit(). This will cause link errors if XF1Bpp or XF4Bpp is
not defined, as those functions will not be available. I noticed this
when building a striped down server without 1bpp or 4bpp support.

A patch is attached. The line numbers match 6.8.2, but the problem
still exists in cvs head.
Comment 1 Bill Randle 2005-06-04 20:43:06 UTC
Created attachment 2829 [details] [review]
diff to fix 1bpp and 4bpp problem
Comment 2 Adam Jackson 2005-06-07 16:19:22 UTC
this shouldn't be an issue.  the drivers do not link against anything else, so
those functions are almost always undefined, and in particular they'll only be
defined if the appropriate depth is selected and the associated module loaded.

i suspect you're doing something weird with your build system...
Comment 3 Bill Randle 2005-06-07 16:44:49 UTC
That's true, it is undefined in the driver itself. It may be this is only an
issue when building a statically linked X server (which is what I'm doing) with
all needed drivers and modules linked into one executable. In that case, since
XF1Bpp and XF4Bpp are not defined, that cfb/mfb code is not compiled or linked
into the server, so when the vga driver is linked in, it will get an undefined
symbol error.  So, I still think this is a valid bug.
Comment 4 Adam Jackson 2005-06-07 16:57:38 UTC
ah!  right, static server would definitely have this problem.

this will be a much more general problem than just the vga driver, but i'll take
a look.
Comment 5 Bill Randle 2005-06-07 17:30:14 UTC
The 1bpp and 4bpp defines are used in other parts of the server code, and
although I did not link in all the available drivers, the generic vga file was
the only one I had a problem with.
Comment 6 Daniel Stone 2006-06-03 02:38:31 UTC
closing, as we no longer support pure-static servers

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.