[OpenJDK 2D-Dev] RFR: Allow using a system-installed lcms2

Omair Majid omajid at redhat.com
Fri Feb 28 23:24:43 UTC 2014

* Phil Race <philip.race at oracle.com> [2014-02-28 16:46]:
> The moving of most of these files will cause me some significant pain.

Oh. Sorry :(

Is there anything I (or possibly the jigsaw folks) can do to minimize

> I am not convinced why its necessary.

Basically, there is one file there (LCMS.c) that I want to make sure
that does not get compiled against the headers located in the same
directory. One way to be absolutely certain is to move the files out of
that directory into another. `#include <..>` rather than `#include
"..."` might also be sufficient but seems less of a guarantee
(especially because then I have to filter things so the compiler
invocation only includes LCMS.c and not the bundled lcms code). It seems
the patch would be more complex (from a Makefile point) to test.

I also figured it's a nice cleanup, separating code that is maintained
in OpenJDK from code that isn't.

> And if done wrong we lose the history.

I am not sure if it's present in the webrev, but I did record the rename
explicitly in mercurial. An `hg diff` locally shows me (among others):

    rename from src/share/native/sun/java2d/cmm/lcms/lcms2.h
    rename to src/share/native/sun/java2d/cmm/lcms/lcms2/lcms2.h

> Even if done *right* the history is harder to get at.

Fair enough, but 'hg log --follow' is fairly obvious, no?

> Plus the jigsaw people are very likely to move this code *again*.

Is there anything I can do to help? Can we move it just once to the
final location?

> I need to look at this more, but I have no time right now.

Fair enough. I don't mind waiting for a few weeks. Any idea when you
might have some time?

> 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.

I am not sure I follow. Do you mean the stub built from LCMS.c? It's
basically a Java<->lcms2 binding. If we are using the system library,
the `libj2lcms.so` will sit between the VM and the system lcms2 library.
If we are not using the system library, all of the bundled lcms2 code in
OpenJDK is built and contained in that library too.

> 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.

If there is a way for non-Oracle folks to access JPRT, I will be happy
to run this patch through it myself.


PGP Key: 66484681 (http://pgp.mit.edu/)
Fingerprint = F072 555B 0A17 3957 4E95  0056 F286 F14F 6648 4681

More information about the 2d-dev mailing list