Hi All
Any idea when they are going to fix the problems with OpenGL failing to build on Linux systems, particularly CentOS and RHEL.
I have encountered the problems on version CentOS 6.7, kernel 2.6.32-573.18.1.el6, VirtualBox 5.0.14
There are two problems I had to fix to get OpenGL to build.
1) some drm header files not found, have to add them to kernel headers every time the kernel is updated.
2) vboxvideo_drm.c fails to compile because drm_mmap is not available
Fix for 1
mkdir -p /usr/src/kernels/2.6.32-573.18.1.el6.x86_64/include/uapi/drm
cd /usr/src/kernels/2.6.32-573.18.1.el6.x86_64/include/uapi/drm
ln -s /usr/include/drm/drm_fourcc.h .
ln -s /usr/include/drm/drm.h .
ln -s /usr/include/drm/drm_mode.h .
ln -s /usr/include/drm/drm_sarea.h .
Fix for 2 not sure of the exact fix but the check for drm_mmap based on kernel version and RHEL version is incorrect in vboxvideo_drm.c
on my system I commented out the defines for DRM_HAVE_DRM_MAP around line 205
if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
# ifdef RHEL_RELEASE_CODE
# if RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7, 2)
//# define DRM_HAVE_DRM_MAP
# endif
# else
//# define DRM_HAVE_DRM_MAP
# endif
#endif
Not sure, but might even have to do a #undef DRM_HAVE_DRM_MAP, indicating it is set somewhere else as well.
The second change to this file involves the use of this flag. drm_mmap is used twice in this file, but only one of the uses checks this flag.
around line 116
I changed
.mmap = drm_mmap,
to
# ifdef DRM_HAVE_DRM_MAP
/* This shouldn't be necessary even for old kernels as there is
* nothing sensible to mmap. But we play safe and keep it for
* legacy reasons. */
.mmap = drm_mmap,
# endif
OpenGL failing to build.
-
jwythe@epicor.com
- Posts: 14
- Joined: 27. Sep 2011, 13:34
- Primary OS: Linux other
- VBox Version: OSE other
- Guest OSses: XP, W2K, RHEL3,RHEL6,W7,RHEL7
Re: OpenGL failing to build.
Hi JWythe,
Many thanks for this post - now I know that I am not the only one who has this problem
. Yes, It is exactly the same on my RHEL 6.7, kernel 2.6.32-573.18.1.el6.x86_64, VirtualBox 5.0.14 (on Windows 7).
I am at the moment stuck with your "Fix for 2" (Fix for 1 works nice) so I would like to ask you a 'stupid' question: How to proceed after editing vboxvideo_drm.c (it is in /usr/src/vboxguest-5.0.14/vboxvideo/, isn't it?) ? I mean, what I have to do to rebuild OpenGL? (Sorry for this ignorant question
)
Also, can you clarify how you have changed .mmap = drm_mmap around line 116?
Last block of lines in your post is exactly what I have in the vboxvideo_drm.c file so I cannot see any change.
Many thanks in advance,
Goran
Many thanks for this post - now I know that I am not the only one who has this problem
I am at the moment stuck with your "Fix for 2" (Fix for 1 works nice) so I would like to ask you a 'stupid' question: How to proceed after editing vboxvideo_drm.c (it is in /usr/src/vboxguest-5.0.14/vboxvideo/, isn't it?) ? I mean, what I have to do to rebuild OpenGL? (Sorry for this ignorant question
Also, can you clarify how you have changed .mmap = drm_mmap around line 116?
Last block of lines in your post is exactly what I have in the vboxvideo_drm.c file so I cannot see any change.
Many thanks in advance,
Goran
-
jwythe@epicor.com
- Posts: 14
- Joined: 27. Sep 2011, 13:34
- Primary OS: Linux other
- VBox Version: OSE other
- Guest OSses: XP, W2K, RHEL3,RHEL6,W7,RHEL7
Re: OpenGL failing to build.
Hi Goran
Not a stupid question. I meant to include the steps below, but forgot.
There are two places in that file where drm_mmap is used. Locate both and ensure the lines around it match what I have listed.
It is possible they have already included that change, but not the correct fix for checking the OS and setting the flag.
Here are the steps I used to extract the files, make the change, build and install.
The highlighted parts will be different depending on the version of VirtualBox and the OS you are installing on. I grabbed these steps from another post.
cd /media/VBOXADDITIONS_4.1.8_75467/
./VBoxLinuxAdditions.run --noexec --target ~/TMP/
cd ~/TMP/
mkdir ../TMP2
tar jxvf VBoxGuestAdditions-amd64.tar.bz2 -C ../TMP2/
cd ../TMP2/src/vboxguest-4.1.8/vboxvideo/
# Make editing changes to file.
cd ~/TMP2/
tar jcvf ../TMP/VBoxGuestAdditions-amd64.tar.bz2 *
cd ~/TMP
./install.sh
Not a stupid question. I meant to include the steps below, but forgot.
There are two places in that file where drm_mmap is used. Locate both and ensure the lines around it match what I have listed.
It is possible they have already included that change, but not the correct fix for checking the OS and setting the flag.
Here are the steps I used to extract the files, make the change, build and install.
The highlighted parts will be different depending on the version of VirtualBox and the OS you are installing on. I grabbed these steps from another post.
cd /media/VBOXADDITIONS_4.1.8_75467/
./VBoxLinuxAdditions.run --noexec --target ~/TMP/
cd ~/TMP/
mkdir ../TMP2
tar jxvf VBoxGuestAdditions-amd64.tar.bz2 -C ../TMP2/
cd ../TMP2/src/vboxguest-4.1.8/vboxvideo/
# Make editing changes to file.
cd ~/TMP2/
tar jcvf ../TMP/VBoxGuestAdditions-amd64.tar.bz2 *
cd ~/TMP
./install.sh
Re: OpenGL failing to build.
Hi JWythe,
Many thanks for this. It works, of course
Sorry for my late reply. I have implemented your recipe and (after your fixes sorted out my first problem perfectly) I have also hoped that this will solve my main issue as well.
Unfortunately, it is still there: whenever I try to run any code that needs graphic libraries I get error messages like:
1) libGL error: core dri or dri2 extension not found
or
2) libGL error: failed to load driver: vboxvideo (error message for RHEL 6.7 - VirtualBox 5.0.14)
or
3) XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0" after 34 requests (34 known processed) with 5 events remaining.
The number 3 is real pain; I have it on both of my laptops. First one is CentOS 6.7 and second one is RHEL 6.7 under VirtualBox 5.0.14 (kernel 2.6.32-573.18.1.el6 in both cases).
The problem started after my system administrators updated my both OS to the latest kernel version.
This topic is probably not the perfect place to ask about this issue but I would be really grateful if you can offer any advice (especially about the problem number 3).
Anyway, many thanks again for your help,
Goran
Many thanks for this. It works, of course
Sorry for my late reply. I have implemented your recipe and (after your fixes sorted out my first problem perfectly) I have also hoped that this will solve my main issue as well.
Unfortunately, it is still there: whenever I try to run any code that needs graphic libraries I get error messages like:
1) libGL error: core dri or dri2 extension not found
or
2) libGL error: failed to load driver: vboxvideo (error message for RHEL 6.7 - VirtualBox 5.0.14)
or
3) XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0" after 34 requests (34 known processed) with 5 events remaining.
The number 3 is real pain; I have it on both of my laptops. First one is CentOS 6.7 and second one is RHEL 6.7 under VirtualBox 5.0.14 (kernel 2.6.32-573.18.1.el6 in both cases).
The problem started after my system administrators updated my both OS to the latest kernel version.
This topic is probably not the perfect place to ask about this issue but I would be really grateful if you can offer any advice (especially about the problem number 3).
Anyway, many thanks again for your help,
Goran