[Ubuntu] unknown field ‘dri_library_name’ when making VIA chrome9 driver
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
[Ubuntu] unknown field ‘dri_library_name’ when making VIA chrome9 driver
I have a VIA pc3500g mainborad with C7 CPU. It has a VIA Chrome9 video chip , VIA CN896 North Bridge and VIA 8237A or VT8237S South Bridge.
I run Ubuntu and try to install the VIA propriatary driver.
$ cd via-xserver-86a-50283_src/DRM/H5DRM_Independent_2.6.27_28/
$ make
make -C /lib/modules/2.6.32-23-generic/build M=/home/media/via-xserver-86a-50283_src/DRM/H5DRM_Independent_2.6.27_28 modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-23-generic'
CC [M] /home/media/via-xserver-86a-50283_src/DRM/H5DRM_Independent_2.6.27_28/via_chrome9_drv.o
/home/media/via-xserver-86a-50283_src/DRM/H5DRM_Independent_2.6.27_28/via_chrome9_drv.c:220: error: unknown field ‘dri_library_name’ specified in initializer
/home/media/via-xserver-86a-50283_src/DRM/H5DRM_Independent_2.6.27_28/via_chrome9_drv.c:220: warning: initialization from incompatible pointer type
/home/media/via-xserver-86a-50283_src/DRM/H5DRM_Independent_2.6.27_28/via_chrome9_drv.c:233: warning: initialization from incompatible pointer type
make[2]: *** [/home/media/via-xserver-86a-50283_src/DRM/H5DRM_Independent_2.6.27_28/via_chrome9_drv.o] Error 1
make[1]: *** [_module_/home/media/via-xserver-86a-50283_src/DRM/H5DRM_Independent_2.6.27_28] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-23-generic'
make: *** [default] Error 2
I found some more threads about this error but no fix at all. The only hint I could discover is that the sources might be created for older kernel sources.
Is anybody else able to perform "make" on the 2d/DRM files and verify the error or can tell me how to fix my problem?
Am I correct in thinking your driver tried to compile a driver version for kernel 2.6.27_28 in a kernel source 2.6.32-23?
I thought the whole point of giving these things numbers was because when guys changed them and added stuff they gave it a new number. I'd suggest a driver source and kernel source with the same kernel version.
The problem is that there are not any newer source files from VIA. I think going back to an old kernel is no option, is it? The question is whether there is any other way to compile the source files for the present kernel.
OK, I'm far from being a programming head, so take this with a health warning.
Quote:
/home/media/via-xserver-86a-50283_src/DRM/H5DRM_Independent_2.6.27_28/via_chrome9_drv.c:220: error: unknown field ‘dri_library_name’ specified in initializer
Is that defined anywhere? It may be as simple as that. If you cd to /home/media/via-xserver-86a-50283_src/DRM/H5DRM_Independent_2.6.27_28 & run
grep -rC3 dri_library_name * |less
You will see how that is used, and maybr get an idea of how to sort this. It looks like a small error. Have you tried via's linux forum?
Where the error coming from line 220 as shown in the error message is as follows:
Code:
$ sed -n "220p" /home/media/via-xserver-86a-50283_src/DRM/H5DRM_Independent_2.6.27_28/via_chrome9_drv.c
.dri_library_name = dri_library_name,
I have some programming background by the way but I have to admit that I am more into Java than into C. I am not rather sure what line 220 is supposed to do. The whole section around line 220 is a struct:
In the VIA forum users are a bit lost. Their answer is to ask VIA support personally for a new driver. I will do so of course but I do not expect very much of it. Linux drivers do not seem to have a very high priority for VIA.
Yeah, Via are crap. I'll tell how what you have to do. Post on their most highly visible windows/general/new stuff Forum. Write a well argued diatribe against Via and their linux support. They will whip your post off that forum and shove it onto the least used linux forum, but you will get the attention of a (not very bright) developer to shut you up :-D.
static int dri_library_name(struct drm_device *dev, char *buf)
That passes for a definition. But the blindingly obvious has finally struck me
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-23-generic'
/lib/modules/<version>/bujild should point at the kernel source, whereas you are building in linux-headers. What happens when you have the headers but not the source is that the build symlink is pointed by distros at them. Try this
bash-3.1$ cd /usr/src
bash-3.1$ du -sh linux-2.6.32*
616M linux-2.6.32
That's a kernel - built and it's over 600 megs. An exploded tarball is 400 Megs or bigger. Headers are 20 Megs. Have you got the source? If not, get it, copy in the .config of the kernel you are running, and make it. It's usually stored as /boot/config-version. FYI My source has directories
~/drivers/gpu/drm/via
~drivers/video/via
$ ls /usr/src/linux-source-2.6.32*
/usr/src/linux-source-2.6.32.tar.bz2
Normally I compile my kernels from my home directory (where the untared source files are located now). I did not completely understand what you are suggesting. Shall I compile my kernel again? I did that in the last days as I am optimizng my system but it had no effect on the link.
We do not offer direct support for PC3500 products from here. We offer support for for ViA embedded boards and systems.
Nevertheless you will find all up to date drivers on our Linux portal. http://linux.via.com.tw/support/downloadFiles.action
For further support concerning this product please contact your dealer.
They nearly completely ignored what I wrote them. I mentioned that their drivers on exactly the link they are proposing are outdated. Furthermore I told them that I purchased the board from a private person. Alltogether this answer was quite useless.
The symlink seems to point at the headers indeed:
I did not completely understand what you are suggesting. Shall I compile my kernel again? I did that in the last days as I am optimizng my system but it had no effect on the link.
I would change the /lib/modules/2.6.32.whatever/build sumlink to point at the kermnel source. Then try compiling the driver, which will enter a different directory if you do that
$ make
make: *** No targets specified and no makefile found. Stop.
media@media:~/via-xserver-86a-50283_src$ cd DRM/H5DRM_Independent_2.6.27_28/
media@media:~/via-xserver-86a-50283_src/DRM/H5DRM_Independent_2.6.27_28$ make
make -C /lib/modules/2.6.32-23-generic/build M=/home/media/via-xserver-86a-50283_src/DRM/H5DRM_Independent_2.6.27_28 modules
make[1]: Entering directory `/home/media/src/linux-source-2.6.32'
CC [M] /home/media/via-xserver-86a-50283_src/DRM/H5DRM_Independent_2.6.27_28/via_chrome9_drv.o
/home/media/via-xserver-86a-50283_src/DRM/H5DRM_Independent_2.6.27_28/via_chrome9_drv.c:220: error: unknown field ‘dri_library_name’ specified in initializer
/home/media/via-xserver-86a-50283_src/DRM/H5DRM_Independent_2.6.27_28/via_chrome9_drv.c:220: warning: initialization from incompatible pointer type
/home/media/via-xserver-86a-50283_src/DRM/H5DRM_Independent_2.6.27_28/via_chrome9_drv.c:233: warning: initialization from incompatible pointer type
make[2]: *** [/home/media/via-xserver-86a-50283_src/DRM/H5DRM_Independent_2.6.27_28/via_chrome9_drv.o] Error 1
make[1]: *** [_module_/home/media/via-xserver-86a-50283_src/DRM/H5DRM_Independent_2.6.27_28] Error 2
make[1]: Leaving directory `/home/media/src/linux-source-2.6.32'
make: *** [default] Error 2
One week ago I asked for the driver for a supported board with the same chipset. Today VIA was able to answer that the driver for Ubuntu 10.04 has not been released yet (surprise) and that they don't know when it will be released. I was advised to visit their website regularly for updates...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.