-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8193017: Import freetype sources into OpenJDK source tree #318
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back gdams! A progress list of the required criteria for merging this PR into |
This backport pull request has now been updated with issue from the original commit. |
Webrevs
|
Good to see this being proposed. I was wondering what had happened to it. How close is this to JDK-8193017? Were other changes necessary on top? I'll do a comparison of the two patches when I get a chance. |
Mailing list message from Andrew Hughes on jdk8u-dev: On 20:03 Wed 31 May , Thorsten Glaser wrote:
Given 8u is a stable release, I don't intend for any defaults to This is primarily aimed at Windows, where FreeType is not readily Thanks, PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net) Please contact via e-mail, not proprietary chat networks |
it's reasonably close, the main difference is that the freetype source is located in |
@gdams This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
Please keep this open |
@gdams This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
@gdams This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
probably we should keep it open? |
/open |
@gdams This pull request is now open |
❗ This change is not yet ready to be integrated. |
@gdams this pull request can not be integrated into git checkout freetype
git fetch https://git.openjdk.org/jdk8u-dev.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
@gdams This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
@gdams do you have a chance to look at the merge-conflict? |
Yup @mrserb I'll try and get to it this week. I must stress that it would be good to make a decision on this as it's very painful to keep such a large changeset up to date |
@mrserb I've resolved the merge conflicts. I'm slightly worried about the changes to |
I had a similar issue some time ago #413 (comment), at that time I also run 2.69 on macos. Solved that by running autoconf on some linux hosts. |
that looks better, I've compiled it locally with the patch applied and the generated configure looks correct now |
I did a quick test on macOS. If the "libfreetype.dylib" is deleted from some old jdk8 build(or jdk-21) the next exception is occurred for the font demo:
But If I delete the "libfreetype.dylib" from the build after this patch the demo works fine. |
Using "DYLD_PRINT_LIBRARIES=YES" traced that the "Homebrew" version of freetype is loaded. it is unclear why this version is not loaded in case of jdk-21. @rpath looks the same. |
nevermind seems that in case of "macos+Homebrew" the jdk-21 is affected as well but only if I build jdk locally. |
jdk/src/share/legal/freetype.md
Outdated
@@ -0,0 +1,537 @@ | |||
## The FreeType Project: Freetype v2.9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "legal" folder is used in jdk9+, for jdk8 licenses should be placed in THIRD_PARTY_README file. We have several of them in jdk8, but after #557 integration there will be only one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've copied the entire contents of this file to the THIRD_PARTY_README file. Hopefully that's the correct way to do it.
common/autoconf/toolchain_windows.m4
Outdated
# (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', | ||
# 'v110' or 'v120' for VS 2010, 2012 or VS2013 | ||
eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change probably correct, but it is not part of the jdk11 commit, and this code still exists in the openjdk/jdk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good spot, I've pushed a commit to revert this and will see if a build still passes
@@ -405,9 +405,6 @@ happens, read more below in [the `configure` options](#configureoptions). | |||
|
|||
Some examples: | |||
|
|||
> **Windows 32bit build with freetype specified:** \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doc/building.html should be updated as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note that the documentation for freetype in jdk8 is outdated, in jdk9 it was reworked by this commit. We should update at least the freetype related part as a follow-up patch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that commit probably needs to be backported as a starting point and then further changes made, including the other FreeType changes in the original version of this commit and replacing Mercurial with git.
I think this patch should at least update doc/building.html
to match the building.md
changes being made.
common/autoconf/libraries.m4
Outdated
# First check if the files exists. | ||
if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then | ||
# We found an arbitrary include file. That's a good sign. | ||
# Assume we've found freetype to begin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from where this comment is come from? the jdk11 and openjdk/jdk use "# Let's start with an optimistic view of the world :-)" added by the "openjdk/jdk@6b1eac7"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good spot, I've updated the comment but this is only a partial backport of those changes
FREETYPE_TO_USE=bundled | ||
if test "x$OPENJDK_TARGET_OS" != "xwindows" && \ | ||
test "x$OPENJDK_TARGET_OS" != "xmacosx" && \ | ||
test "x$OPENJDK_TARGET_OS" != "xaix"; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure about "aix" do we want to use the bundled version on it?
it will be good to test it on solartis and aix. |
This one is outside the usual rules for 8u, which is closed for enhancements. For that reason, it must be accompanied by a very strong justification, and evidence that it carries no risk. |
I'm not sure I'd call this an enhancement. The lack of in-tree sources for FreeType means that there is no reference version of FreeType to build and test against, as there is with other libraries used by the AWT classes (libjpeg, libpng, giflib, LCMS). Historically, this is because Oracle did not use FreeType and its maintenance was largely left to others. There is evidence of this in this patch with the only JDK code changes being to allow FreeType to be used on non-OpenJDK builds (largely irrelevant to use I would expect) Yes, those on Windows & Mac likely have some way of building against FreeType in place, but it is an ongoing burden to maintain that version of FreeType, and it means every person building OpenJDK potentially uses some different version of FreeType. It's also an issue on the GNU/Linux side as there is no option not to use a system FreeType, which potentially reduces the portability of such builds. A build of OpenJDK may take place against one system installation of FreeType and then be used against a completely different one. The reason these issues have not been a bigger problem up to now is FreeType is a pretty stable library. I think the risk of introducing this now is still very low (as I say, there are very few code changes at all) and it improves the maintainability of 8u for everyone. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Patch looks good for comparison with the 11u version. My only real issue is with the doc updates. I thought at first we should update the other FreeType documentation here, but, after reading other comments, it seems better to follow up this work by trying to sync closer to later JDK versions first, then apply the changes from this changeset. This patch should at least update building.html
to match building.md
though by regenerating the HTML.
I'll try bundled and system builds with this patch while you work on that.
@gdams This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
Keep open. Would be good to get this in. |
@gdams This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
Imports the Freetype source to be consistent with JDK11+
As discussed in ibmruntimes/openj9-openjdk-jdk8#631 CC @gnu-andrew
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk8u-dev.git pull/318/head:pull/318
$ git checkout pull/318
Update a local copy of the PR:
$ git checkout pull/318
$ git pull https://git.openjdk.org/jdk8u-dev.git pull/318/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 318
View PR using the GUI difftool:
$ git pr show -t 318
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk8u-dev/pull/318.diff
Webrev
Link to Webrev Comment