Configure script should take a --enable-webgl flag

RESOLVED WONTFIX

Status

Firefox Build System
General
--
major
RESOLVED WONTFIX
9 years ago
3 months ago

People

(Reporter: jimb, Unassigned)

Tracking

Trunk
x86_64
Linux

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

9 years ago
+++ This bug was initially created as a clone of Bug #517566 +++

As Ben Bucksch notes:
> 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!
The WebGL implementation has no dependency on runtime or link time 3D libraries.  The only thing that it depends on is the GLX header files, when building under X11 -- and that dependency could be removed by just copying in the relevant parts of the GLX headers (as the symbols are part of a core X library already).
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → WONTFIX

Comment 2

9 years ago
> (as the symbols are part of a core X library already).

This was filed as split-off from bug 517566, and configure will say:

> Can't find header GL/glx.h for WebGL (install libgl1-mesa-dev
> (Ubuntu) or mesa-libGL-devel (Fedora));

libgl1-mesa-dev will naturally depend on mesa. In other words, that forces 3D libs to be installed.

If there's another way, e.g. by copying as you say, can you please suggest concrete instructions to include in this configure message?
(In reply to comment #2)
> > (as the symbols are part of a core X library already).
> 
> This was filed as split-off from bug 517566, and configure will say:
> 
> > Can't find header GL/glx.h for WebGL (install libgl1-mesa-dev
> > (Ubuntu) or mesa-libGL-devel (Fedora));
> 
> libgl1-mesa-dev will naturally depend on mesa. In other words, that forces 3D
> libs to be installed.

I thought mesa-common-dev was enough when I last built on Ubuntu.
That includes headers and docs (but not the object files).

I don't know why bug 517566 comment 9 suggested libgl1-mesa-dev.
(In reply to comment #3)
> I don't know why bug 517566 comment 9 suggested libgl1-mesa-dev.

I had been under the impression that we needed libGL.so (in libgl1-mesa-dev) as well as the headers (in mesa-common-dev).
We might; the glX symbols are there, I thought they were in Xlib.  That can be fixed in the code by dynamically loading them (like it's currently done for windows and for EGL).

Comment 6

9 years ago
So, given that there do seem to be dependencies, why not just allow it to not be compiled in via a configure flag?
It's part of the platform we're building -- adding the option means that people will want us to maintain the code to support turning it off, and that seems like a misinvestment of time versus spending that energy on actually improving what users get.

Comment 8

9 years ago
> It's part of the platform we're building

"we"?

> maintain the code to support turning it off

You already have to do that: MOZ_WEBGL=0.
So, all we need is a configure flag to turn MOZ_WEBGL=0.

(And probably will always have to, because Gecko is used on platforms like Kiosks, small devices etc. that don't have 3D. As computing moves on, there are small platforms moving up that now can run Gecko, but have no 3D.
Also, I don't have 3D on any VM.)
(In reply to comment #8)
> > It's part of the platform we're building
> 
> "we"?

The Mozilla project's leaders.  The layout module owners.  The people who are developing, maintaining, and supporting the code.

> You already have to do that: MOZ_WEBGL=0.
> So, all we need is a configure flag to turn MOZ_WEBGL=0.

by the same argument, MOZ_WEBGL should suffice.  We would want to add --enable-webgl if we wanted to make it more convenient to disable it; I don't think there's a lot of value in it.

> (And probably will always have to, because Gecko is used on platforms like
> Kiosks, small devices etc. that don't have 3D. As computing moves on, there are
> small platforms moving up that now can run Gecko, but have no 3D.
> Also, I don't have 3D on any VM.)

that's what mesa is for, just like software fallback for future accelerated graphics support.

if "I need to disable 3D because it's the only thing keeping Gecko from working on my little platform" becomes a common request, we can figure out how to deal with it.  in general, though, if you're on a small device like that, I think disabling the relatively well-isolated GL stuff is going to be minor relative to the other changes you'll want to make.
(And it's fine to not have GL work where you *run*, this is about build time; see comment 5 for making sure that a GL-enabled build works in the absence of the GL runtime libraries.

I don't know of any VM that doesn't let you _install_ those packages, even if there's no working hardware support for it.)

Updated

3 months ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.