[OpenJDK 2D-Dev] RFR: Allow using a system-installed lcms2
philip.race at oracle.com
Fri Feb 28 21:39:10 UTC 2014
The moving of most of these files will cause me some significant pain.
I am not convinced why its necessary. And if done wrong we lose the
history. Even if done *right* the history is harder to get at.
Plus the jigsaw people are very likely to move this code *again*.
I need to look at this more, but I have no time right now.
If we aren't using a system library I am not sure what purpose a little
stub will serve, so I need to think about that.
And this needs to be built and tested on all platforms to be approved.
And open & closed builds need to work. I'm not sure they will.
That suggests I'd need to run it through JPRT.
On 02/28/2014 01:27 PM, Omair Majid wrote:
> * Omair Majid <omajid at redhat.com> [2014-02-20 17:43]:
>> 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
>> 2. The library name. The current library name for the combined library
>> containing lcms and OpenJDK code (that goes under jre/lib/$(ARCH)/) is
>> currently `liblcms.so` (on my Linux platform). When linked against the
>> system library, this new `liblcms.so` links to the system-wide
>> `liblcms2.so`. This looks a little bizarre. I am also afraid of some
>> distribution packaging the upstream lcms2 as `liblcms.so` which would
>> cause a name conflict. Following the convention of `libj2gss.so`, I
>> renamed it to `libj2lcms.so`.
>> 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?
> Anyone else have any comments on this? I would like to hear from 2d
> folks who would probably be the ones most impacted by this change. Is
> the moving of lcms files around okay?
More information about the 2d-dev