Page 1 of 1

CentOS 6.5 - Building OpenGL support module ... failed

Posted: 2. Dec 2013, 12:11
by pau
Hello all.
I am using Windows 7 as a host system and VBox 4.3.4 r91027.
After updating from CentOS 6.4 to 6.5 I tried to reinstall VBox Guest Additions and faced a problem:

Code: Select all

...
Building OpenGL support module ... failed
...
Here is the end of /var/log/vboxadd-install.log:

Code: Select all

  gcc -Wp,-MD,/tmp/vbox.0/.vboxvideo_drm.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.4.7/include -Iinclude  -I/usr/src/kernels/2.6.32-431.el6.x86_64/include/uapi -I/usr/src/kernels/2.6.32-431.el6.x86_64/arch/x86/include -include /usr/src/kernels/2.6.32-431.el6.x86_64/include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m64 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_AVX=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=2048 -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -pg -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-dwarf2-cfi-asm -fconserve-stack -fshort-wchar -include /tmp/vbox.0/include/VBox/VBoxGuestMangling.h -I/lib/modules/2.6.32-431.el6.x86_64/build/include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -I/tmp/vbox.0/vboxvideo/ -I/tmp/vbox.0/vboxvideo/include -I/tmp/vbox.0/vboxvideo/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DVBOX_WITH_HGCM -DLOG_TO_BACKDOOR -DIN_MODULE -DIN_GUEST_R0 -DRT_NO_EXPORT_SYMBOL -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS  -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(vboxvideo_drm)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxvideo)" -D"DEBUG_HASH=7" -D"DEBUG_HASH2=50" -c -o /tmp/vbox.0/.tmp_vboxvideo_drm.o /tmp/vbox.0/vboxvideo_drm.c
In file included from /tmp/vbox.0/vboxvideo_drm.c:79:
include/drm/drmP.h:76:21: error: drm/drm.h: No such file or directory
include/drm/drmP.h:77:27: error: drm/drm_sarea.h: No such file or directory
In file included from /tmp/vbox.0/vboxvideo_drm.c:79:
include/drm/drmP.h:438: error: expected specifier-qualifier-list before ‘drm_magic_t’
include/drm/drmP.h:484: error: field ‘flags’ has incomplete type
include/drm/drmP.h:509: error: ‘DRM_MAX_ORDER’ undeclared here (not in a function)
include/drm/drmP.h:577: error: field ‘type’ has incomplete type
include/drm/drmP.h:578: error: field ‘flags’ has incomplete type
include/drm/drmP.h:603: error: expected specifier-qualifier-list before ‘drm_context_t’
In file included from include/drm/drmP.h:693,
                 from /tmp/vbox.0/vboxvideo_drm.c:79:
include/drm/drm_crtc.h:35:26: error: drm/drm_mode.h: No such file or directory
include/drm/drm_crtc.h:37:28: error: drm/drm_fourcc.h: No such file or directory
In file included from include/drm/drmP.h:693,
                 from /tmp/vbox.0/vboxvideo_drm.c:79:
include/drm/drm_crtc.h:135: error: ‘DRM_DISPLAY_MODE_LEN’ undeclared here (not in a function)
include/drm/drm_crtc.h:206: error: ‘DRM_DISPLAY_INFO_LEN’ undeclared here (not in a function)
include/drm/drm_crtc.h:291: error: ‘DRM_PROP_NAME_LEN’ undeclared here (not in a function)
include/drm/drm_crtc.h:732: warning: ‘struct drm_mode_fb_cmd2’ declared inside parameter list
include/drm/drm_crtc.h:732: warning: its scope is only this definition or declaration, which is probably not what you want
In file included from /tmp/vbox.0/vboxvideo_drm.c:79:
include/drm/drmP.h:741: warning: ‘struct drm_unique’ declared inside parameter list
include/drm/drmP.h:742: warning: ‘struct drm_irq_busid’ declared inside parameter list
include/drm/drmP.h:894: warning: ‘struct drm_set_version’ declared inside parameter list
include/drm/drmP.h:951: warning: ‘struct drm_mode_create_dumb’ declared inside parameter list
include/drm/drmP.h:1073: error: field ‘event’ has incomplete type
include/drm/drmP.h:1103: error: array type has incomplete element type
In file included from /tmp/vbox.0/vboxvideo_drm.c:79:
include/drm/drmP.h:1394: error: expected declaration specifiers or ‘...’ before ‘drm_magic_t’
include/drm/drmP.h:1418: warning: ‘struct drm_buf_desc’ declared inside parameter list
include/drm/drmP.h:1419: warning: ‘struct drm_buf_desc’ declared inside parameter list
include/drm/drmP.h:1506: warning: ‘struct drm_agp_mode’ declared inside parameter list
include/drm/drmP.h:1509: warning: ‘struct drm_agp_info’ declared inside parameter list
include/drm/drmP.h:1512: warning: ‘struct drm_agp_buffer’ declared inside parameter list
include/drm/drmP.h:1515: warning: ‘struct drm_agp_buffer’ declared inside parameter list
include/drm/drmP.h:1518: warning: ‘struct drm_agp_binding’ declared inside parameter list
include/drm/drmP.h:1521: warning: ‘struct drm_agp_binding’ declared inside parameter list
include/drm/drmP.h:1614: warning: ‘struct drm_scatter_gather’ declared inside parameter list
make[2]: *** [/tmp/vbox.0/vboxvideo_drm.o] Error 1
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxvideo] Error 2
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.
But:

Code: Select all

$ yum whatprovides "*drm/drm.h"
kernel-devel installed
kernel-headers installed
libdrm-devel installed
Any ideas what can be a reason?
Thanks in advance.

Re: CentOS 6.5 - Building OpenGL support module ... failed

Posted: 2. Dec 2013, 22:43
by dmischa
same problem with 4.2.20. Such problems occured already in the past, when RedHat backported features of newer kernels (you can find the discussions in this forum). Hopefully the dev's will find time to provide new patched guest additions.

a workaround can be found at https://forums.oracle.com/message/11282251

Re: CentOS 6.5 - Building OpenGL support module ... failed

Posted: 3. Dec 2013, 17:53
by pau
Thank you very much!

Code: Select all

# cd /usr/src/kernels/2.6.32-431.el6.i686/include/drm/  
# ln -s /usr/include/drm/drm.h drm.h  
# ln -s /usr/include/drm/drm_sarea.h drm_sarea.h  
# ln -s /usr/include/drm/drm_mode.h drm_mode.h  
# ln -s /usr/include/drm/drm_fourcc.h drm_fourcc.h
Everything works!

Re: CentOS 6.5 - Building OpenGL support module ... failed

Posted: 22. Jan 2014, 20:35
by edrandall
THANK YOU!
I've been jumping through hoops all day to get these guest additions running, following various sets of instructions including:
http://www.if-not-true-then-false.com/2 ... -hat-rhel/
but this was the answer to the final hurdle and it worked :)
Guest: CentOS 6.5 / Kernel 2.6.32-431.3.1.el6.x86_64
Host: Windows 7 x64

Re: CentOS 6.5 - Building OpenGL support module ... failed

Posted: 9. Apr 2014, 14:07
by casantos
This was considered a bug in the VirtialBox guest additions on RHEL 6.5, according to RHBZ#1037777
drm is not kabi. Trying to pretend it is, is asking for trouble. That said, I'd recommend to vbox folks.. firstly, get your driver upstream so this is not a problem in the future. But until then, you'll have better luck pretending (from drm perspective) that rhel6 kernel is newer upstream kernel. (For rhel65, pretend it is 3.9).