[OpenJDK 2D-Dev] RFR: Allow using a system-installed lcms2
gnu.andrew at redhat.com
Fri Feb 21 15:36:13 UTC 2014
----- Original Message -----
> On 2014-02-20 23:40, Omair Majid wrote:
> > Hi,
> > The following is a preliminary webrev that allows OpenJDK to build and
> > run against a system-installed copy of lcms2 rather than the copy
> > bundled with OpenJDK:
> > root: http://cr.openjdk.java.net/~omajid/webrevs/system-lcms/00/
> > jdk: http://cr.openjdk.java.net/~omajid/webrevs/system-lcms/00-jdk/
> > The goal is to add a new option `--with-lcms=` with possible values
> > `bundled` or `system`. Using `--with-lcms=system` builds using the
> > system-installed copy of lcms2 while `--with-lcms=bundled` builds with
> > the bundled copy of lcms2 in OpenJDK.
> > This patch is quite a bit more invasive than the libpng one . There
> > are a few issues that came up:
> > 1. The sources for the bundled library are contained next to
> > OpenJDK-specific sources. This is not true for the bundled copies of
> > zlib, libpng and giflib. On the other hand, the jpeg code in OpenJDK
> > also mixes OpenJDK-specific code with bundled libjpeg code. To make it
> > easier to see (and compile) only non-lcms2 code, I moved the
> > lcms2-specific code into a separate directory. There are no code changes
> > there.
> The only OpenJDK-specific file here is LCMS.c, right?
Yes. At least, it was true in 7:
I don't know why we didn't move it to a sub-directory then, like we did with
JPEG. I suspect simply because LCMS was done first.
> > I made changes which made sense to me, but I am not sure how this fits
> > in with existing conventions. Perhaps people here have suggestions on
> > how to make this less invasive and still achieve the goal while keep
> > things separate and distinct?
> I think it makes sense in separating our own code and an imported library.
So do I. It makes deleting the bundled copy more maintainable.
> I think the "j2" convention is reasonable.
This is where we disagree. I may have agreed if this was new, but we've been
using libjavalcms.so for the lifetime of 7 and I see no reason to change this.
Also, "j2" seems pretty meaningless.
> I think the --with-lcms option is reasonable.
In keeping with convention, yes. I'd still like to change these to --enable
in the long run.
> So, the parts seems to work out fine. Still there's something bothering
> me with this fix, that I can't really put my finger on. Let's hear what
> the 2D people are saying. If they don't object, I won't object.
This is pretty much the same as we've been carrying since 2011, but modified
for the new build, so I don't see any reason for objection.
> But I like the way you're working on cleaning up our relationship to our
> bundled libraries!
It's necessary for us and we've had this work since 2007. Of course, this
new build system broke most of it and meant it had to be rewritten :(
Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07
More information about the 2d-dev