Closed
Bug 517566
Opened 15 years ago
Closed 15 years ago
Need a configure test for glx
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.9.3a1
People
(Reporter: cjones, Assigned: jimb)
References
Details
Attachments
(2 files, 1 obsolete file)
563 bytes,
patch
|
Details | Diff | Splinter Review | |
2.26 KB,
patch
|
vlad
:
review+
dbaron
:
review+
|
Details | Diff | Splinter Review |
I'm running Ubuntu 9.04 on a machine without hardware accelerated graphics, and hence without glx. When trying to build m-c (rev 4aa5a9aadcad), I get the following build errors:
ccache g++ -o nsHTMLDocument.o -c -I../../../../dist/system_wrappers -include /home/cjones/mozilla/mozilla-central/config/gcc_hidden.h -DMOZILLA_INTERNAL_API -DOSTYPE=\"Linux2.6\" -DOSARCH=Linux -D_IMPL_NS_LAYOUT -I/home/cjones/mozilla/mozilla-central/content/html/document/src -I. -I../../../../dist/include -I../../../../dist/include/nsprpub -I/home/cjones/mozilla/ff-dbg/dist/include/nspr -I/home/cjones/mozilla/ff-dbg/dist/include/nss -I/home/cjones/mozilla/mozilla-central/content/html/document/src/../../../base/src -I/home/cjones/mozilla/mozilla-central/content/html/document/src/../../../events/src -I/home/cjones/mozilla/mozilla-central/content/html/document/src/../../content/src -I/home/cjones/mozilla/mozilla-central/content/html/document/src/../../../../layout/style -I/home/cjones/mozilla/mozilla-central/content/html/document/src/../../../../dom/base -fPIC -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-long-long -pedantic -fno-strict-aliasing -fshort-wchar -pthread -pipe -DDEBUG -D_DEBUG -DDEBUG_cjones -DTRACING -g -fno-inline -DMOZILLA_CLIENT -include ../../../../mozilla-config.h -Wp,-MD,.deps/nsHTMLDocument.pp /home/cjones/mozilla/mozilla-central/content/html/document/src/nsHTMLDocument.cpp
In file included from /home/cjones/mozilla/mozilla-central/content/canvas/src/WebGLContext.h:59,
from /home/cjones/mozilla/mozilla-central/content/canvas/src/WebGLContext.cpp:2:
/home/cjones/mozilla/mozilla-central/content/canvas/src/nsGLPbuffer.h:61:20: error: GL/glx.h: No such file or directory
ccache g++ -o nsAttrAndChildArray.o -c -I../../../dist/system_wrappers -include /home/cjones/mozilla/mozilla-central/config/gcc_hidden.h -DMOZILLA_INTERNAL_API -DOSTYPE=\"Linux2.6\" -DOSARCH=Linux -D_IMPL_NS_LAYOUT -I/home/cjones/mozilla/mozilla-central/content/base/src -I. -I../../../dist/include -I../../../dist/include/nsprpub -I/home/cjones/mozilla/ff-dbg/dist/include/nspr -I/home/cjones/mozilla/ff-dbg/dist/include/nss -I/home/cjones/mozilla/mozilla-central/content/base/src/../../events/src -I/home/cjones/mozilla/mozilla-central/content/base/src/../../xml/content/src -I/home/cjones/mozilla/mozilla-central/content/base/src/../../xul/base/src -I/home/cjones/mozilla/mozilla-central/content/base/src/../../xul/content/src -I/home/cjones/mozilla/mozilla-central/content/base/src/../../html/content/src -I/home/cjones/mozilla/mozilla-central/content/base/src/../../base/src -I/home/cjones/mozilla/mozilla-central/content/base/src/../../xbl/src -I/home/cjones/mozilla/mozilla-central/content/base/src/../../../layout/generic -I/home/cjones/mozilla/mozilla-central/content/base/src/../../../layout/style -I/home/cjones/mozilla/mozilla-central/content/base/src/../../../dom/base -I/home/cjones/mozilla/mozilla-central/content/base/src/../../xml/document/src -I/home/cjones/mozilla/mozilla-central/xpcom/io -fPIC -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-long-long -pedantic -fno-strict-aliasing -fshort-wchar -pthread -pipe -DDEBUG -D_DEBUG -DDEBUG_cjones -DTRACING -g -fno-inline -DMOZILLA_CLIENT -include ../../../mozilla-config.h -Wp,-MD,.deps/nsAttrAndChildArray.pp /home/cjones/mozilla/mozilla-central/content/base/src/nsAttrAndChildArray.cpp
In file included from /home/cjones/mozilla/mozilla-central/content/canvas/src/WebGLContext.h:59,
from /home/cjones/mozilla/mozilla-central/content/canvas/src/WebGLContext.cpp:2:
/home/cjones/mozilla/mozilla-central/content/canvas/src/nsGLPbuffer.h:183: error: ISO C++ forbids declaration of ‘Display’ with no type
/home/cjones/mozilla/mozilla-central/content/canvas/src/nsGLPbuffer.h:183: error: expected ‘;’ before ‘*’ token
/home/cjones/mozilla/mozilla-central/content/canvas/src/nsGLPbuffer.h:184: error: ‘GLXFBConfig’ does not name a type
/home/cjones/mozilla/mozilla-central/content/canvas/src/nsGLPbuffer.h:185: error: ‘GLXPbuffer’ does not name a type
/home/cjones/mozilla/mozilla-central/content/canvas/src/nsGLPbuffer.h:186: error: ‘GLXContext’ does not name a type
I worked around this problem by installing libglitz-glx1-dev, and one of its dependencies ended up providing GL/glx.h.
We need a configure test for GL/glx.h. It'd be nice to provide an error message like that shown when iwlib.h is missing: "Go install package ..."
Reporter | ||
Comment 1•15 years ago
|
||
On second thought, this should probably live in Build Config.
Component: Graphics → Build Config
QA Contact: thebes → build-config
Ah yeah, I thought that was a core dependency on the X11 dev packages, but I guess not. We need to add this.
Updated•15 years ago
|
mesa-common-dev seems to be the package that's needed on Ubuntu 9.04 (for the headers at least; haven't linked yet)
Comment 6•15 years ago
|
||
I think these are the right packages.
Comment 7•15 years ago
|
||
This is probably going to need an additional check for Maemo. I actually think you should pull the existing Makefile test for supported platforms:
http://mxr.mozilla.org/mozilla-central/source/content/canvas/src/Makefile.in#58
up into configure, and set DISABLE_WEBGL there, so then you can run this test only if !DISABLE_WEBGL.
Assignee | ||
Comment 8•15 years ago
|
||
I'd like to second Ted's suggestion that you pull the Makefile test into configure.
Comment 9•15 years ago
|
||
I think the Debian/Ubuntu package that's required is actually libgl1-mesa-dev; mesa-common-dev appears to be only part of the GL headers.
Assignee | ||
Updated•15 years ago
|
Assignee: nobody → jim
Assignee | ||
Comment 10•15 years ago
|
||
I've submitted this to the try server; if it seems to work, I'll ask for review.
Automatically changing the build configuration based on what headers are available is a bad idea; then you can't figure out the configuration built from what options were given, and builds become less reproducable (if you happen to have installed a package for some other reason, you'll suddenly get a different build doing things the same way).
You want to make failure to have required headers an error: that error can have useful suggestions, like:
* what option to pass to disable the thing that requires the header
* how to install the necessary headers
but it should be an error rather than a warning.
Assignee | ||
Updated•15 years ago
|
Attachment #407551 -
Flags: review?(vladimir)
Assignee | ||
Comment 12•15 years ago
|
||
Comment on attachment 407551 [details] [diff] [review]
Use configure script to enable WebGL.
Seems to be working, and properly choosing between WebGLContext and the fallback on the right platforms.
Comment on attachment 407551 [details] [diff] [review]
Use configure script to enable WebGL.
See comment 11.
Attachment #407551 -
Flags: review?(vladimir) → review-
Assignee | ||
Comment 14•15 years ago
|
||
Revised to produce an error when the requisite headers are not available, instead of disabling WebGL.
Attachment #407551 -
Attachment is obsolete: true
Attachment #407773 -
Flags: review?(dbaron)
Attachment #407773 -
Flags: review?(vladimir)
Attachment #407773 -
Flags: review?(dbaron)
Attachment #407773 -
Flags: review+
Comment on attachment 407773 [details] [diff] [review]
Enable WebGL in configure.in, and check for requisite headers.
Yeah, that's probably fine.
Attachment #407773 -
Flags: review?(vladimir) → review+
Comment 16•15 years ago
|
||
> that error can have useful suggestions, like:
> * what option to pass to disable the thing that requires the header
> * how to install the necessary headers
That's very good. Please do implement both of that.
The current patch says:
> Can't find header GL/glx.h for WebGL (install libgl1-mesa-dev
> (Ubuntu) or mesa-libGL-devel (Fedora));
which does the second point, but not the first. In fact, there is no switch at all to disable WebGL.
But that makes it impossible to compile Gecko on a system without 3D / 3D libraries installed. I don't think 3D should be required for building Mozilla. Please provide an way to compile it without. Thanks!
Assignee | ||
Comment 17•15 years ago
|
||
(In reply to comment #16)
> The current patch says:
> > Can't find header GL/glx.h for WebGL (install libgl1-mesa-dev
> > (Ubuntu) or mesa-libGL-devel (Fedora));
>
> which does the second point, but not the first. In fact, there is no switch at
> all to disable WebGL.
>
> But that makes it impossible to compile Gecko on a system without 3D / 3D
> libraries installed. I don't think 3D should be required for building Mozilla.
> Please provide an way to compile it without. Thanks!
Filed as bug 523986.
Comment 18•15 years ago
|
||
There seems to be some confusion over whether GL libraries are required for building.
It looks to me like nsGLPbufferGLX loads libGL.so.1 dynamically and I can't see it referenced in the dynamic sections Mozilla's objects.
http://hg.mozilla.org/mozilla-central/annotate/be5eeaf56443/content/canvas/src/nsGLPbufferGLX.cpp#l140
This should mean that only the headers are required for a build (as correctly tested in this patch to configure.in).
However the Debian package that provides the headers is mesa-common-dev, so that seems the appropriate package to recommend for building.
http://packages.debian.org/lenny/mesa-common-dev
libgl1-mesa-dev provides a dependency on libgl1-mesa-glx for the libGL.so.1 library (for run-time) and provides the libGL.so sym link for link-time (which we don't use).
http://packages.debian.org/lenny/libgl1-mesa-dev
Comment 19•15 years ago
|
||
Thanks, Karl.
On SuSE, package Mesa (which also contains the libs, not Mesa-devel) contains GL/glx.h
Assignee | ||
Comment 20•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/67641f9e226d
I changed the package recommended for Ubuntu to mesa-common-dev.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Flags: in-testsuite-
Target Milestone: --- → mozilla1.9.3a1
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•