WineHQ
Bug Tracking Database – Bug 31904

 Bugzilla

 

Last modified: 2013-07-05 05:14:25 CDT  

configure incorrectly detects OSMesa

Bug 31904 - configure incorrectly detects OSMesa
configure incorrectly detects OSMesa
Status: CLOSED NOTOURBUG
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: build-env
1.5.14
x86 Linux
: P2 normal
: ---
Assigned To: Mr. Bugs
:
: 32974 (view as bug list)
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2012-10-07 05:08 CDT by olelukoie
Modified: 2013-07-05 05:14 CDT (History)
6 users (show)

See Also:
Regression SHA1:
Fixed by SHA1:
Distribution: ---
Staged patchset:


Attachments
configure patched (448 bytes, patch)
2013-06-15 16:47 CDT, Roland Haeder
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description olelukoie 2012-10-07 05:08:14 CDT
When I run configure script for latest wine 1.5.x releases it always reports that it can not find OSMesa but I have it installed correctly.

Looking for a solution I've found several versions of patch that fixes this. For example this is the Gentoo version:

http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-emulation/wine/files/wine-1.5.10-osmesa-check.patch

and this is Fedora version:

http://pkgs.fedoraproject.org/cgit/wine.git/tree/wine-1.5.10-osmesa-check.patch?h=f17

I've tested Fedora version of the patch and it works well for me (I'm using mageia linux).
Comment 1 Henri Verbeet 2012-10-07 05:49:27 CDT
No. If OSMesa built with shared glapi depends on libGL, it's broken. This is supposed to be fixed in current versions of Mesa. (See also http://lists.freedesktop.org/archives/mesa-dev/2012-September/028019.html)
Comment 2 olelukoie 2012-10-07 09:39:07 CDT
I insist on fixing this issue in wine's configure as it's needed for building (backporting) current wine devel versions (1.5.x) on current stable linux distributions that ship mesa 8.0.

And please notice that there are two different problems:
- test for glAccum that is not part of OSmesa library (it is much better to test for something that belongs to OSmesa and is not part of the OpenGL standard);
- possible requirement of glapi library to correctly link (if glapi is a shared library then it should be explicitly used in link commands as the current linux distro policies are to get rid of *.la files completely).
Comment 3 Henri Verbeet 2012-10-07 09:45:45 CDT
This can't be fixed in Wine, configure fails because OSMesa is *broken*. You say you tested those patches, but I doubt you actually have an application that uses the functionality in question.
Comment 4 Béla Gyebrószki 2012-10-07 10:07:25 CDT
(In reply to comment #3)
> You say you tested those patches, but I doubt you actually have an application that
> uses the functionality in question.

It seems at least Civilization III: Complete (Steam version) tries to make some use of it. Wine prints the following error when the game is loading to the main menu. This is with Wine compiled without OSMesa support:
>err:dib:dibdrv_wine_get_wgl_driver OSMesa not compiled in, no OpenGL bitmap support

I tried the Fedora version of the patch, but it didn't make it better. The error message changed to
>err:dib:init_opengl Failed to load OSMesa: /lib/libOSMesa.so.8: undefined symbol: _glapi_Dispatch
when Wine was compiled with that patch.
Comment 5 olelukoie 2012-10-07 10:10:30 CDT
The only "app" (really game) that I can test is Civilization 3 (see
http://bugs.winehq.org/show_bug.cgi?id=30669 ). I've tested it on openSUSE 12.1
with mesa 8 and latest wine builds and it works if I install osmesa package.

If you wish I can test it once again on my current installation of Mageia 2
(that ships mesa 8 too) and my own builds of current wine git snapshots and
report the results.
Comment 6 olelukoie 2012-10-07 10:19:24 CDT
Oh sorry, openSUSE 12.1 comes with even older mesa 7 and it also provides osmesa and it is required for Civ3.
Comment 7 olelukoie 2012-10-07 12:55:57 CDT
Well... I've made some more testing and found that libosmesa is not really needed for Civ3 to work. At least it's not needed with current wine 1.5.14+.

So if you do not want to change the configure script you can close this bug with any resolution you like.
Comment 8 Alexandre Julliard 2012-10-08 03:53:24 CDT
The configure script is correct, we can't use shared glapi OSMesa.
Comment 9 Austin English 2012-10-09 12:56:11 CDT
(In reply to comment #1)
> No. If OSMesa built with shared glapi depends on libGL, it's broken. This is
> supposed to be fixed in current versions of Mesa. (See also
> http://lists.freedesktop.org/archives/mesa-dev/2012-September/028019.html)

UPSTREAM then.
Comment 10 Alexandre Julliard 2013-02-15 04:29:37 CST
*** Bug 32974 has been marked as a duplicate of this bug. ***
Comment 11 Ma Hsiao-chun 2013-06-11 00:45:19 CDT
Hi,

The upstream Mesa fix won't get distributions' libOSMesa right automatically.

It seems that libOSMesa need to be compiled without --enable-shared-glapi while other Mesa components need --enable-shared-glapi

Therefore, distributions need to build libOSMesa separately, which is not been done in Arch, Debian, Ubuntu currently.

Is this the right way to compile Mesa? Is there any distributions already do things right? Would you file bugs to distributions?

Thank you in advance.
Comment 12 Anssi Hannula 2013-06-13 16:54:55 CDT
(In reply to comment #11)
> Therefore, distributions need to build libOSMesa separately, which is not been
> done in Arch, Debian, Ubuntu currently.
> 
> Is this the right way to compile Mesa? Is there any distributions already do
> things right?

On Mageia we build Mesa twice (first the rest with shared-glapi, then OSMesa without it) for exactly this reason:
http://svnweb.mageia.org/packages/cauldron/mesa/current/SPECS/mesa.spec?revision=424801&view=markup

I wouldn't say this is the "right" way. It would be much better if Mesa was fixed so that a single build would be enough, but it seems to be non-trivial (at least to me), so this is what we ended up with.

There seems to be an upstream bug report about this issue:
https://bugs.freedesktop.org/show_bug.cgi?id=47824
Comment 13 Roland Haeder 2013-06-15 16:47:50 CDT
Created attachment 44820 [details]
configure patched

I had to patch configure a little to make OSMesa be detectable, see attached file.
Comment 14 Maarten Lankhorst 2013-07-05 05:14:25 CDT
I posted a patch on the upstream bug, which should make osmesa work correctly again with shared glapi, without building twice.


Hosted By CodeWeavers